Patches for Cray T3Es running Unicossmk and SV1s running Unicos
William L. Jones
jones at mail.utexas.edu
Mon Jul 23 06:24:51 EST 2001
> -----Original Message-----
> From: owner-openssh-unix-dev at mindrot.org
> [mailto:owner-openssh-unix-dev at mindrot.org]On Behalf Of
> mouring at etoh.eviladmin.org
> Sent: Sunday, July 22, 2001 1:46 PM
> To: William L. Jones
> Cc: openssh-unix-dev at mindrot.org
> Subject: Re: Patches for Cray T3Es running Unicossmk and SV1s running
> Unicos
>
>
>
> I'll commit the sections that are non distruptive soon.. I think there are
> things that will need to be discussed on list before the whole patch gets
> applied.
>
> But let deal with the easy issues. =)
>
> 1) Where is openbsd-compat/bsd-cray.h ?
> It should house all the stuff like this (from session.c)
>
> +#ifdef _CRAY
> +void cray_init_job(struct passwd *); /* init cray job */
> +void cray_job_termination_handler(int); /* process end of
> job signal */
> +void cray_setup(); /* set cray limits */
> +extern char cray_tmpdir[]; /* cray tmpdir */
> +#endif
> +
>
Easy enough!
> And it should be included in the openbsd-compat.h
>
> 2) In deattack.c
>
> +#ifdef _CRAY
> + for (i=0; i<n; i++) h[i] = HASH_UNUSED;
> +#else
> memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE);
> +#endif
>
> I'd rather see bsd-cray.c have a memset() function that mimic what
> we expect from memset(). It makes is easier when it comes to syncing
> between portable and OpenBSD.
>
Unforintally I did not make enough changes here I should have looked
closer at the ssh-1.2.27 cray mod set. In order
to make deattack.c work on cray and all other system. You have to
1) Change set HASH_ENTRYSIZE to explicly to 2.
2) Every were their is a malloc using HASH_ENTRYSIZE it must be changed
to use sizeof(u_int16_t).
3) Change
memset(h, HASH_UNUSEDCHAR, n * HASH_ENTRYSIZE);
to
for (i=0; i<n; i++) h[i] = HASH_UNUSED;
This will work for all systems and cray's too.
The problem cray have is they don't have 16bit shorts or byte addressing.
The code in deattack wants a hash of two byte things. The changes
out lined above allows the use of 128 bit, 64 bit, 32 bit and 16
bits storage types for its hash table.
I though about changing memset to do.
memset(h, HASH_UNUSEDCHAR, n*sizeof(u_int16_t))
But it would require more changes to the code.
deattach assume that HASH_ENTRYSIZE is two. It has to be that
for it to work but the hash table can be any storage type as long
as it is it is at least 2 bytes in size with the above changes.
I will post just the patch to deattach.c the way it should be so
you can take a look at it. We may have to go around about this
serveral times. But that just part of the processes.
> will the following OpenBSD code run and work right under Cray? If so
> I'll be happy to import it and then we can detect of memset() exists
> and fall back to the below code if it's not.
>
> http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/memset.c
>
> Better question is why the hackery around that memset() and not the one in
> openssh/openbsd-compat/rresvport.c ??
>
> 3) Is this a typo in ssh_prng_cmds.in ?
>
> +
> +"sar -d" @PROG_SAR[@ 0.04
>
> Is the ] really supose to be there? =)
Yes! Sigh
>
>
> Damien, I think we should consider renaming openbsd-compat/bindresvport.c
> to openbsd-compat/bsd-bindresvport.c if we accept the cray proposed
> changes. The code will be very hard to resync with the OpenBSD's version
> after this patch.
>
Un fortunately your right. Like the deattach changes the bindresvport.c
changes have to do with the lack of byte address and the locak of 16
bit shorts on Cray SV1s.
> - Ben
>
> On Sun, 22 Jul 2001, William L. Jones wrote:
>
> > This patch is against Cray patch against openssh-SNAP-20010710. Here
> > a few notes about them:
> >
> > 1) rijndael does not work on cray due to the fact it is rooted
> in 32 bits.
> > I looking for a fix, it may come form Wendy Palam. For now the cray
> > default to the following cihpers for ssh version 2 ssh are:
> > 3des-cbc,blowfish-cbc,cast128-cbc,arcfour
> >
> > 2) Crays don't have setitimer so I changed scp.c to use alarm which
> > should work on all systems.
> >
> > 3) Created bsd-cray.c in openbsd-compat. This mainly supports
> cray TMPDIR
> > environment variable, jid, and setting job and process
> limits form cray's
> > udb. I could have put them in seesion.c but I think
> session.c is getting
> > to loaded with speicalied system codes. The same is true for pty.c.
> > Maby it time to split out the code int seperate system modules in
> > the openbsd-compat directiry.
> >
> > 4) Fixed a few minor issues with resetting SIGCHLD. If you permanently
> > install
> > a signal with mysingnal for SIGCHLD you don't need to reset it in the
> > sigchld handler. You can get into a infinite signal loop if
> the sigchld
> > handler does not reap the child win it is called if it reset
> the sigchld
> > handler, it is a cray thing.
> >
> > 5) It is possible to get an EINTR on a waitpid call on a cray,
> it has to do
> > with the job termination signal. Loop on waitpid if errno
> is EINTR in
> > serverloop.c
> >
> > 6) Cray gets pty differently so getpty.c has a few more levels
> of ifdef's,
> > sigh.
> >
> > 7) Add some more cray specific prng commands. Needed more entropy!
> >
> > Let me know if you have any questions or need any changes to this set
> > of patches.
> >
> > This is the third posting. I think the others went into the bit bucket
> > do to a domain change.
> >
> > William L Jones
> >
>
>
>
More information about the openssh-unix-dev
mailing list