Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-25 Thread Karol Lewandowski
On 09/22/2012 02:07 PM, Blue Swirl wrote: Hi! >> +static int sys_capget(struct __user_cap_header_struct *hdr, struct >> __user_cap_data_struct *data) >> +{ >> + return (capget(hdr, data)); > > This is not correct. The structure needs to be converted field by > field to host native format, espe

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-24 Thread Peter Maydell
On 23 September 2012 17:02, Blue Swirl wrote: > On Sat, Sep 22, 2012 at 11:23 PM, Erik de Castro Lopo > wrote: >> I'm working in a similar syscall implementation (POSIX timers) and >> I'm currently testing it in an debian armhf chroot running on my >> x86-64 laptop. After quite a bit of debugging

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-23 Thread Blue Swirl
On Sat, Sep 22, 2012 at 11:23 PM, Erik de Castro Lopo wrote: > Blue Swirl wrote: > >> This is not correct. The structure needs to be converted field by >> field to host native format, especially endianness. > > I'm working in a similar syscall implementation (POSIX timers) and > I'm currently test

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-22 Thread Erik de Castro Lopo
Blue Swirl wrote: > This is not correct. The structure needs to be converted field by > field to host native format, especially endianness. I'm working in a similar syscall implementation (POSIX timers) and I'm currently testing it in an debian armhf chroot running on my x86-64 laptop. After quit

Re: [Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-22 Thread Blue Swirl
On Wed, Sep 19, 2012 at 3:09 PM, Karol Lewandowski wrote: > libcap, library used to manipulate posix file capabilities uses > getcap() to query version of capabilities supported by running > kernel. Information obtained from this syscall is then used to > initialize data structures that can be use

[Qemu-devel] [PATCH] linux-user: Add naive implementation of capget() syscall

2012-09-19 Thread Karol Lewandowski
libcap, library used to manipulate posix file capabilities uses getcap() to query version of capabilities supported by running kernel. Information obtained from this syscall is then used to initialize data structures that can be used to set process or/and file capabilities. Providing capget() alon