Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-21 Thread Andrey Wagin
2013/1/21 Andrew Vagin : > On Sun, Jan 20, 2013 at 09:33:41PM +0100, Michael Kerrisk (man-pages) wrote: >> Hi Oleg, >> >> On Sun, Jan 20, 2013 at 8:55 PM, Oleg Nesterov wrote: >> > On 01/20, Andrew Vagin wrote: >> >> >> >> > SFD_RAW >> >> > SFD_SHARED_QUEUE -- reads will be from process-wide share

Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-21 Thread Andrew Vagin
On Sun, Jan 20, 2013 at 09:33:41PM +0100, Michael Kerrisk (man-pages) wrote: > Hi Oleg, > > On Sun, Jan 20, 2013 at 8:55 PM, Oleg Nesterov wrote: > > On 01/20, Andrew Vagin wrote: > >> > >> > SFD_RAW > >> > SFD_SHARED_QUEUE -- reads will be from process-wide shared signal queue > >> > SFD_PER_THR

Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-20 Thread Michael Kerrisk (man-pages)
Hi Oleg, On Sun, Jan 20, 2013 at 8:55 PM, Oleg Nesterov wrote: > On 01/20, Andrew Vagin wrote: >> >> > SFD_RAW >> > SFD_SHARED_QUEUE -- reads will be from process-wide shared signal queue >> > SFD_PER_THREAD_QUEUE --reads will be from per-thread signal queue >> >> I suggested this variant in the

Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-20 Thread Oleg Nesterov
On 01/20, Andrew Vagin wrote: > > > SFD_RAW > > SFD_SHARED_QUEUE -- reads will be from process-wide shared signal queue > > SFD_PER_THREAD_QUEUE --reads will be from per-thread signal queue > > I suggested this variant in the initial series, but then we decided to > avoid adding new flags. Yes, be

Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-20 Thread Michael Kerrisk (man-pages)
Hi Andrey, On Sun, Jan 20, 2013 at 6:41 PM, Andrew Vagin wrote: > >> > signalfd is a special descriptor, so I think it >> > is not a big deal, that it works a bit strange. >> >> Sure, but the more we special case things, the uglier the ABI as a >> whole becomes. So special casing should be avoide

Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-20 Thread Andrew Vagin
> > signalfd is a special descriptor, so I think it > > is not a big deal, that it works a bit strange. > > Sure, but the more we special case things, the uglier the ABI as a > whole becomes. So special casing should be avoided as far as we can. > > > If all other would > > decides, that a new s

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-19 Thread Michael Kerrisk (man-pages)
Hello Andrey, On Sat, Jan 19, 2013 at 11:50 AM, Andrey Wagin wrote: > 2013/1/19 Michael Kerrisk (man-pages) : >>> As SFD_RAW is being added to the kernel API we should document it. >>> Please keep Michael cc'ed and work with him on getting the manpages >>> updated. >> >> The API is certainly no t

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-19 Thread Andrey Wagin
2013/1/19 Michael Kerrisk (man-pages) : >> As SFD_RAW is being added to the kernel API we should document it. >> Please keep Michael cc'ed and work with him on getting the manpages >> updated. > > The API is certainly no thing of beauty, as I already remarked here: > http://thread.gmane.org/gmane.l

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-18 Thread Michael Kerrisk (man-pages)
> As SFD_RAW is being added to the kernel API we should document it. > Please keep Michael cc'ed and work with him on getting the manpages > updated. The API is certainly no thing of beauty, as I already remarked here: http://thread.gmane.org/gmane.linux.file-systems/70420/focus=1420228 A descrip

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-17 Thread Andrew Vagin
On Wed, Jan 16, 2013 at 12:35:02PM -0800, Andrew Morton wrote: > > --- a/include/uapi/linux/signalfd.h > > +++ b/include/uapi/linux/signalfd.h > > @@ -15,6 +15,7 @@ > > /* Flags for signalfd4. */ > > #define SFD_CLOEXEC O_CLOEXEC > > #define SFD_NONBLOCK O_NONBLOCK > > +#define SFD_RAW O_DIRECT

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-16 Thread Andrew Morton
On Mon, 14 Jan 2013 20:53:54 +0400 Andrey Vagin wrote: > signalfd should be called with the flag SFD_RAW for that. > > signalfd_siginfo is not full for siginfo with a negative si_code. > copy_siginfo_to_user() is copied a full siginfo to user-space, if > si_code is negative. signalfd_copyinfo()

[PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-14 Thread Andrey Vagin
signalfd should be called with the flag SFD_RAW for that. signalfd_siginfo is not full for siginfo with a negative si_code. copy_siginfo_to_user() is copied a full siginfo to user-space, if si_code is negative. signalfd_copyinfo() doesn't do that and can't be expanded, because it has not compatib

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-12 Thread Oleg Nesterov
On 01/10, Andrey Wagin wrote: > > 2012/12/28 Oleg Nesterov : > >> > >> This functionality is required for checkpointing pending signals. > > > > And this should be used along with pread(). > > > > I won't argue, but perhaps we should simply postulate that pread() > > always dumps siginfo in raw for

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-10 Thread Michael Kerrisk (man-pages)
On Thu, Jan 10, 2013 at 10:47 AM, Andrey Wagin wrote: > 2012/12/28 Oleg Nesterov : >> On 12/28, Andrey Vagin wrote: >>> >>> signalfd should be called with the flag SFD_RAW for that. >>> >>> signalfd_siginfo is not full for siginfo with a negative si_code. >>> copy_siginfo_to_user() is copied a ful

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2013-01-10 Thread Andrey Wagin
2012/12/28 Oleg Nesterov : > On 12/28, Andrey Vagin wrote: >> >> signalfd should be called with the flag SFD_RAW for that. >> >> signalfd_siginfo is not full for siginfo with a negative si_code. >> copy_siginfo_to_user() is copied a full siginfo to user-space, if >> si_code is negative. signalfd_c

Re: [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2012-12-28 Thread Oleg Nesterov
On 12/28, Andrey Vagin wrote: > > signalfd should be called with the flag SFD_RAW for that. > > signalfd_siginfo is not full for siginfo with a negative si_code. > copy_siginfo_to_user() is copied a full siginfo to user-space, if > si_code is negative. signalfd_copyinfo() doesn't do that and can't

[PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)

2012-12-28 Thread Andrey Vagin
signalfd should be called with the flag SFD_RAW for that. signalfd_siginfo is not full for siginfo with a negative si_code. copy_siginfo_to_user() is copied a full siginfo to user-space, if si_code is negative. signalfd_copyinfo() doesn't do that and can't be expanded, because it has not compatib