[CRIU] [RFC] criu: Drop prlimit compat layer

Cyrill Gorcunov gorcunov at gmail.com
Mon Apr 4 03:43:16 PDT 2016


On Mon, Apr 04, 2016 at 01:33:53PM +0300, Pavel Emelyanov wrote:
> On 04/02/2016 10:21 PM, Cyrill Gorcunov wrote:
> > Previously when we've been on early stage we
> > tried to workaround lack of prlimit libc call
> > simply providing own implementation,  but it
> > cause problems on some libc configurations so
> > simply use rlimit64 and __NR_prlimit64 syscall
> > directly.
> > 
> > The kernel must support __NR_prlimit64 syscall
> > and provide rlimit64 structure as well.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> > 
> > Guys, take a look please, I think this would be better
> > than emulating prlimit libc's function. I run on x86
> > only, so help from other arch people would be appreciated.
> 
> We've already tried smth similar and ended up with the
> #ifndef __NR_foo
> #define __NR_foo 123
> #endif
> stuff hanging around. I think we should have the same here.

https://github.com/torvalds/linux/blob/6e4664525b1db28f8c4e1130957f70a94c19213e/arch%2Fx86%2Fsyscalls%2Fsyscall_64.tbl

sys_prlimit64 has been in 3.11 already. So it must be defined.

	Cyrill


More information about the CRIU mailing list