BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002064 [uClibc] Other minor always 02-07-08 19:30 03-20-08 23:59
Reporter michael_d View Status public  
Assigned To uClibc
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0002064: Library assumes presence of several syscalls
Description When compiled against unmodified Linux-2.0.40 headers, uClibc fails to compile because it assumes several 2.2+ syscalls are present.

The syscalls in question are __NR_lchown, __NR_prctl, __NR_sendfile, __NR_setresuid, __NR_setresgid, __NR_sched_getaffinity, and __NR_sched_setaffinity.

(I'm aware there's already a patch in buildroot for the last two.)

It looks like there was an attempt to conditionally include setresuid() and setresgid(). But it doesn't work, as compilation fails with "'__EI_setresuid' aliased to undefined symbol '__GI_setresuid'".

I've worked around the problem by modifying <asm/unistd.h> before building uClibc. For all syscalls except lchown(), letting them fail with ENOSYS produces results no more broken than glibc on the same kernel. lchown() wasn't a problem for me, as I've privately backported syscall 182 to my kernel.

Note that problem 0001874 also needs to be fixed before compilation on Linux 2.0.40 can complete.
Additional Information
Attached Files  uClibc-0.9.29-condcalls.diff [^] (3,341 bytes) 03-13-08 05:09

- Relationships

- Notes
(0004914)
vapier
02-15-08 15:35

ive updated the FAQ to cover our policy for things older than linux-2.4 is: we dont care

that is to say, we arent going to fix it ourselves. if you can post a nice patch that works for you, we'll look at merging it.
 
(0005694)
michael_d
03-13-08 05:14

I've uploaded a patch to make most of the syscalls conditional.

Left out are lchown(), which I've addressed locally at the kernel side, and sched_*(), which are already handled in a buildroot patch.

Note that this patch isn't enough to make a threaded build on a setresuid()-less platform -- there are functions in libpthread that use setresuid() and setresgid() unconditionally.
 
(0005814)
vapier
03-20-08 23:59

thanks, added your fix to svn
 

- Issue History
Date Modified Username Field Change
02-07-08 19:30 michael_d New Issue
02-07-08 19:30 michael_d Status new => assigned
02-07-08 19:30 michael_d Assigned To  => uClibc
02-15-08 15:35 vapier Note Added: 0004914
03-13-08 05:09 michael_d File Added: uClibc-0.9.29-condcalls.diff
03-13-08 05:14 michael_d Note Added: 0005694
03-20-08 23:59 vapier Note Added: 0005814
03-20-08 23:59 vapier Status assigned => closed
03-20-08 23:59 vapier Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker