Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread fykc...@gmail.com
2011/4/21 David Daney : > On 04/20/2011 06:02 PM, fykc...@gmail.com wrote: >> >> 2011/4/21 David Daney: Any comment whether this will break non-MIPS 32bit archs, like x86? >>> >>> It would break the MIPS n32 ABI userspace. >>> >>> On MIPS n32 we are still __LP64__, but 64-bit values are p

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 06:18 PM, fykc...@gmail.com wrote: 2011/4/21 Eric Paris: I am pretty arch stupid, and I have no idea at all if it is related, but I'm looking at kernel commit 5e844b31c2ace282ab8bea630b63e0212d9532d4 which wires up the fanotify syscalls for mips. I see that it used a u64 for a3 an

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread fykc...@gmail.com
2011/4/21 Eric Paris : > I am pretty arch stupid, and I have no idea at all if it is related, but > I'm looking at kernel commit 5e844b31c2ace282ab8bea630b63e0212d9532d4 > which wires up the fanotify syscalls for mips.  I see that it used a u64 > for a3 and a4 when these are only going to be 32 val

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 06:08 PM, fykc...@gmail.com wrote: 2011/4/21 David Daney: On 04/20/2011 11:09 AM, Lennart Poettering wrote: On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: You would have to do something like this (untested): int foo_fanotify_mark(int fanotify_fd, unsign

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread fykc...@gmail.com
2011/4/21 David Daney : > On 04/20/2011 11:09 AM, Lennart Poettering wrote: >> >> On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: >> >>> You would have to do something like this (untested): >>> >>> int foo_fanotify_mark(int fanotify_fd, unsigned int flags, u64 mask, >>> int d

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 06:02 PM, fykc...@gmail.com wrote: 2011/4/21 David Daney: Any comment whether this will break non-MIPS 32bit archs, like x86? It would break the MIPS n32 ABI userspace. On MIPS n32 we are still __LP64__, but 64-bit values are passed in a single register. It isn't a problem. n32

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread fykc...@gmail.com
2011/4/21 David Daney : >> Any comment whether this will break non-MIPS 32bit archs, like x86? > > It would break the MIPS n32 ABI userspace. > > On MIPS n32 we are still __LP64__, but 64-bit values are passed in a single > register. It isn't a problem. n32 syscall supports 64bit registers, and 64-

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Lennart Poettering
On Wed, 20.04.11 15:20, David Daney (dda...@caviumnetworks.com) wrote: > >Hmm, OK. Do you happen to know which predefined userspace macro we > >should check against for the o32 ABI? > > > >There seems to be __mips__, but that probably covers both ABIs? > > How about (untested): > > #if defined(_

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 12:55 PM, Lennart Poettering wrote: On Wed, 20.04.11 11:43, David Daney (dda...@caviumnetworks.com) wrote: On 04/20/2011 11:34 AM, Lennart Poettering wrote: On Wed, 20.04.11 11:19, David Daney (dda...@caviumnetworks.com) wrote: On 04/20/2011 11:09 AM, Lennart Poettering wrote

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Lennart Poettering
On Wed, 20.04.11 11:43, David Daney (dda...@caviumnetworks.com) wrote: > > On 04/20/2011 11:34 AM, Lennart Poettering wrote: > >On Wed, 20.04.11 11:19, David Daney (dda...@caviumnetworks.com) wrote: > > > >> > >>On 04/20/2011 11:09 AM, Lennart Poettering wrote: > >>>On Wed, 20.04.11 10:36, David

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 11:34 AM, Lennart Poettering wrote: On Wed, 20.04.11 11:19, David Daney (dda...@caviumnetworks.com) wrote: On 04/20/2011 11:09 AM, Lennart Poettering wrote: On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: You would have to do something like this (unteste

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Lennart Poettering
On Wed, 20.04.11 11:19, David Daney (dda...@caviumnetworks.com) wrote: > > On 04/20/2011 11:09 AM, Lennart Poettering wrote: > >On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: > > > >>You would have to do something like this (untested): > >> > >>int foo_fanotify_mark(int fa

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 11:09 AM, Lennart Poettering wrote: On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: You would have to do something like this (untested): int foo_fanotify_mark(int fanotify_fd, unsigned int flags, u64 mask, int dfd, const char __user * pathname) { u

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Lennart Poettering
On Wed, 20.04.11 10:36, David Daney (dda...@caviumnetworks.com) wrote: > You would have to do something like this (untested): > > int foo_fanotify_mark(int fanotify_fd, unsigned int flags, u64 mask, > int dfd, const char __user * pathname) > { > u32 mask_low = (u32)mask; > u32 mask_h

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread David Daney
On 04/20/2011 09:14 AM, Eric Paris wrote: On Wed, 2011-04-20 at 12:16 +0200, Aurelien Jarno wrote: On Wed, Apr 20, 2011 at 03:22:08AM +0200, Lennart Poettering wrote: On Wed, 20.04.11 09:15, fykc...@gmail.com (fykc...@gmail.com) wrote: 2011/4/20 Lennart Poettering On Thu, 14.04.11 17:34, f

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Eric Paris
On Wed, 2011-04-20 at 12:16 +0200, Aurelien Jarno wrote: > On Wed, Apr 20, 2011 at 03:22:08AM +0200, Lennart Poettering wrote: > > On Wed, 20.04.11 09:15, fykc...@gmail.com (fykc...@gmail.com) wrote: > > > > > > > > 2011/4/20 Lennart Poettering > > > > > > > > On Thu, 14.04.11 17:34, fykc...@gma

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-20 Thread Aurelien Jarno
On Wed, Apr 20, 2011 at 03:22:08AM +0200, Lennart Poettering wrote: > On Wed, 20.04.11 09:15, fykc...@gmail.com (fykc...@gmail.com) wrote: > > > > > 2011/4/20 Lennart Poettering > > > > > > On Thu, 14.04.11 17:34, fykc...@gmail.com (fykc...@gmail.com) wrote: > > > > > > > diff --git a/src/missin

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-19 Thread fykc...@gmail.com
2011/4/20 Lennart Poettering : > On Wed, 20.04.11 09:15, fykc...@gmail.com (fykc...@gmail.com) wrote: > >> >> 2011/4/20 Lennart Poettering >> > >> > On Thu, 14.04.11 17:34, fykc...@gmail.com (fykc...@gmail.com) wrote: >> > >> > > diff --git a/src/missing.h b/src/missing.h >> > > index 35e209f..b36

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-19 Thread Lennart Poettering
On Wed, 20.04.11 09:15, fykc...@gmail.com (fykc...@gmail.com) wrote: > > 2011/4/20 Lennart Poettering > > > > On Thu, 14.04.11 17:34, fykc...@gmail.com (fykc...@gmail.com) wrote: > > > > > diff --git a/src/missing.h b/src/missing.h > > > index 35e209f..b367831 100644 > > > --- a/src/missing.h >

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-19 Thread fykc...@gmail.com
2011/4/20 Lennart Poettering > > On Thu, 14.04.11 17:34, fykc...@gmail.com (fykc...@gmail.com) wrote: > > > diff --git a/src/missing.h b/src/missing.h > > index 35e209f..b367831 100644 > > --- a/src/missing.h > > +++ b/src/missing.h > > @@ -125,7 +125,12 @@ static inline int fanotify_init(unsigned

Re: [systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-19 Thread Lennart Poettering
On Thu, 14.04.11 17:34, fykc...@gmail.com (fykc...@gmail.com) wrote: > diff --git a/src/missing.h b/src/missing.h > index 35e209f..b367831 100644 > --- a/src/missing.h > +++ b/src/missing.h > @@ -125,7 +125,12 @@ static inline int fanotify_init(unsigned int flags, > unsigned int event_f_flags) >

[systemd-devel] [PATCH] Fix broken syscall(__NR_fanotify_mark... on 32bit mips.

2011-04-14 Thread fykc...@gmail.com
Hi all, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23618562 MIPS ABI enforces that 64bit arguments should be 64bit-aligned, and the third argument of syscall(__NR_fanotify_mark, ...) is 64bit and not 64bit-aligned on 32bit mips platform, thus extra padding is inserted before it. The syscal