This patch fixes some critical bugs in copy_user exception handler found by Xavier. The fixes are all in the exception handler and there are no changes in the main "copy" body. I have tested with both gcc2.96 and gcc3.1 compiler. Please report issues to me if there are any. Thanks. - Ken -----Original Message----- From: Xavier Bru [mailto:Xavier.Bru@bull.net] Sent: Thursday, July 04, 2002 6:42 AM To: davidm@hpl.hp.com; Chen, Kenneth W Cc: Jacky.Malcles@bull.net; linux-ia64@linuxia64.org Subject: RE: kernel update (relative to 2.4.18) Thanks for your answers. Kernel is compiled with gcc 3.1 (that should explain the problem of missing ex-handler in the bundle). If you need more infos about ltp test suite, you can ask Jacky Malcles(Jacky.Malcles@bull.net). Thanks Xavier ------------------------------------------------------------------ test for Problem 1 (missing EX handler) #include #include #include #include #include main() { int s, sinlen; s = socket(PF_INET, SOCK_STREAM, 0); if (s <0) perror("socket"); getsockname(s, (struct sockaddr *)0, &sinlen); perror("getsockname"); } ------------------------------------------------------------------ test for Problem 2(recursive call to __copy_user) # include # include # include main() { int rc, semid; if ((semid=semget(IPC_PRIVATE, 10, IPC_CREAT | IPC_EXCL | 0600 )) == -1) { perror("semget"); exit(2); } rc=semctl(semid, 0x0, 0xd, 0xffffffffUL); perror("semctl"); } ------------------------------------------------------------------