[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

glibc-2.3 vs kernel 2.2



There is a bug in the handling of llseek() with 2.2 kernels that causes
them to interact badly with some new versions of glibc.  Upgrading to
glibc 2.3 while running an old kernel may make your machine unusable, so
be careful out there, kids.  If you are not able to upgrade to a newer
(2.4) kernel, the small patch below ought to correct the problem in 2.2.

p.

Index: calls.S
===================================================================
RCS file: /cvs/pub/kernel/armlinux/arch/arm/kernel/calls.S,v
retrieving revision 1.1.1.1.2.2
diff -u -r1.1.1.1.2.2 calls.S
--- calls.S	1999/08/29 19:20:02	1.1.1.1.2.2
+++ calls.S	2003/01/08 15:37:42
@@ -149,7 +149,7 @@
 		.long	SYMBOL_NAME(sys_ni_syscall)		/* .long	_sys_afs_syscall */
 		.long	SYMBOL_NAME(sys_setfsuid)
 		.long	SYMBOL_NAME(sys_setfsgid)
-/* 140 */	.long	SYMBOL_NAME(sys_llseek_wrapper)
+/* 140 */	.long	SYMBOL_NAME(sys_llseek)
 		.long	SYMBOL_NAME(sys_getdents)
 		.long	SYMBOL_NAME(sys_select)
 		.long	SYMBOL_NAME(sys_flock)
Index: sys_arm.c
===================================================================
RCS file: /cvs/pub/kernel/armlinux/arch/arm/kernel/sys_arm.c,v
retrieving revision 1.1.1.1.2.3
diff -u -r1.1.1.1.2.3 sys_arm.c
--- sys_arm.c	2001/04/14 12:18:28	1.1.1.1.2.3
+++ sys_arm.c	2003/01/08 15:37:42
@@ -270,24 +270,6 @@
 	return (!get_user (instr, pcv) && instr == 0xe1a0300d);
 }
 
-/* Compatability functions - we used to pass 5 parameters as r0, r1,
r2, *r3, *(r3+4)
- * We now use r0 - r4, and return an error if the old style calling
standard is used.
- * Eventually these functions will disappear.
- */
-asmlinkage int
-sys_compat_llseek (unsigned int fd, unsigned long offset_high, unsigned
long offset_low,
-		loff_t *result, unsigned int origin, struct pt_regs *regs)
-{
-	extern int sys_llseek (unsigned int, unsigned long, unsigned long,
loff_t *, unsigned int);
-
-	if (old_calling_standard (regs)) {
-		printk (KERN_NOTICE "%s (%d): unsupported llseek call standard\n",
-			current->comm, current->pid);
-		return -EINVAL;
-	}
-	return sys_llseek (fd, offset_high, offset_low, result, origin);
-}
-
 asmlinkage int
 sys_compat_mount (char *devname, char *dirname, char *type, unsigned
long flags, void *data,
 		  struct pt_regs *regs)





Reply to: