William L. Jones
2001-Jul-22 16:47 UTC
Patches for Cray T3Es running Unicossmk and SV1s running Unicos
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: craypatch Type: application/octet-stream Size: 20377 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010722/d27d7870/attachment.obj
mouring at etoh.eviladmin.org
2001-Jul-22 18:45 UTC
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 + 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. 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? =) 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. - 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 >
Kevin Steves
2001-Jul-24 17:47 UTC
Patches for Cray T3Es running Unicossmk and SV1s running Unicos
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 i don't know the issues, but you can drop Brian Gladman <brg at gladman.plus.com> a line, as it's his implementation. note that openssh doesn't use his latest version. http://fp.gladman.plus.com/cryptography_technology/rijndael/index.htm :2) Crays don't have setitimer so I changed scp.c to use alarm which : should work on all systems. i can see if something like this makes sense to go into the openbsd tree. :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. does cray have sigaction()? i think we should be using mysignal() in the protocol 1 loop now that the signal handlers have converged. can you try the patch below? :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 another possible change to sync with openbsd. :6) Cray gets pty differently so getpty.c has a few more levels of ifdef's, : sigh. i need to look at that closer. :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. Index: serverloop.c ==================================================================RCS file: /var/cvs/openssh/serverloop.c,v retrieving revision 1.74 diff -u -r1.74 serverloop.c --- serverloop.c 2001/07/18 16:01:48 1.74 +++ serverloop.c 2001/07/24 17:35:35 @@ -448,7 +448,7 @@ /* Initialize the SIGCHLD kludge. */ child_terminated = 0; - signal(SIGCHLD, sigchld_handler); + mysignal(SIGCHLD, sigchld_handler); /* Initialize our global variables. */ fdin = fdin_arg; @@ -621,7 +621,7 @@ channel_free_all(); /* We no longer want our SIGCHLD handler to be called. */ - signal(SIGCHLD, SIG_DFL); + mysignal(SIGCHLD, SIG_DFL); wait_pid = waitpid(-1, &wait_status, child_terminated ? WNOHANG : 0); if (wait_pid == -1) @@ -710,7 +710,7 @@ if (writeset) xfree(writeset); - signal(SIGCHLD, SIG_DFL); + mysignal(SIGCHLD, SIG_DFL); while ((pid = waitpid(-1, &status, WNOHANG)) > 0) session_close_by_pid(pid, status);
Maybe Matching Threads
- [Bug 100] serverloop.c modifications for correct UNICOS behavior
- [Bug 100] serverloop.c modifications for correct UNICOS behavior
- [Bug 102] defines.h modifications for proper UNICOS behavior
- [Bug 96] bsd-cray.h modifications to allow correct UNICOS execution
- [Bug 99] auth2.c modifications for correct UNICOS behavior