[PATCH] libc: do not rely upon ulimit kernel syscall.

Carmelo AMOROSO carmelo.amoroso at st.com
Tue Nov 29 10:32:49 UTC 2011


On 27/11/2011 1.30, Mike Frysinger wrote:
> On Wednesday 23 November 2011 11:22:04 Carmelo AMOROSO wrote:
>> On 17/11/2011 17.14, Mike Frysinger wrote:
>>> On Friday 04 November 2011 08:50:02 Bernhard Reutner-Fischer
>>> wrote:
>>>> On 3 November 2011 09:31, Carmelo AMOROSO wrote:
>>>>> On several architectures __NR_ulimit syscall number is 
>>>>> currently defined but it is remapped onto sys_ni_syscall,
>>>>> while on other architectures they are not longer defined.
>>>>> So use {get,set}rlimit only to implement ulimit interface.
>>>>> 
>>>>> It fixes LTP ulimit01 test case.
>>>> 
>>>> What about fixing the kernel instead to not define numbers
>>>> for the unavailable stuff?
>>> 
>>> yeah, that makes more sense to me.  if your headers say you
>>> have the ulimit syscall, we shouldn't bother trying to emulate
>>> it in userspace.  fix the kernel and be done. -mike
>> 
>> you are lucky because blackfin is one of the few arch that have
>> a cleaned syscall table lists (all ni are commented in
>> unistd.h).
>> 
>> In my case, SH4, I hit the problem, and as in my case all other
>> archs with "dirty" syscall table are affected as well.
> 
> if the syscall is dead in your arch, then delete it from
> asm/unistd.h.  the __NR_ table is not an immutable list. -mike

yes,
I'll post a patch to linux-sh ML.

carmelo


More information about the uClibc mailing list