Re: [1/2,v2] fdmap(2)

2017-10-26 Thread Andy Lutomirski
> On Oct 19, 2017, at 5:34 PM, Alexey Dobriyan wrote: > > On 10/18/17, Andy Lutomirski wrote: >>> fdmap() is standalone thing. >>> >>> Next step is to design fdinfo(2) (?) which uses descriptors from >>> fdmap(2). Extending structures is done as usual: but version, >>> add new fields to the end.

Re: [PATCH 1/2 v2] fdmap(2)

2017-10-25 Thread Pavel Machek
On Wed 2017-10-25 14:45:31, Alexey Dobriyan wrote: > On 10/23/17, Pavel Machek wrote: > > > Binary fdmap looks... quite ugly to me. But close_all(from, to) > > syscall kindof makes sense to me... and is not that ugly. > > > > Given that openbsd has something similar... perhaps we can take that? >

Re: [1/2,v2] fdmap(2)

2017-10-25 Thread Alexey Dobriyan
On 10/20/17, Greg KH wrote: > On Thu, Oct 19, 2017 at 05:34:35PM +0200, Alexey Dobriyan wrote: >> So the answer it not to fix /proc, the answer it to leave /proc alone. > > No, because: > >> The answer is make Unix shell people move their lazy asses and >> implement minimal type system and a way t

Re: [PATCH 1/2 v2] fdmap(2)

2017-10-25 Thread Alexey Dobriyan
On 10/23/17, Pavel Machek wrote: > Binary fdmap looks... quite ugly to me. But close_all(from, to) > syscall kindof makes sense to me... and is not that ugly. > > Given that openbsd has something similar... perhaps we can take that? closefrom() can be implemented on top of fdmap(). fdmap as is i

Re: [PATCH 1/2 v2] fdmap(2)

2017-10-23 Thread Pavel Machek
Hi! > > From: Aliaksandr Patseyenak > > > > Implement system call for bulk retrieveing of opened descriptors > > in binary form. > > > > Some daemons could use it to reliably close file descriptors > > before starting. Currently they close everything upto some number > > which formally is not r

Re: [1/2,v2] fdmap(2)

2017-10-20 Thread Greg KH
On Thu, Oct 19, 2017 at 05:34:35PM +0200, Alexey Dobriyan wrote: > So the answer it not to fix /proc, the answer it to leave /proc alone. No, because: > The answer is make Unix shell people move their lazy asses and > implement minimal type system and a way to execute raw system calls > like all

Re: [1/2,v2] fdmap(2)

2017-10-19 Thread Alexey Dobriyan
On 10/18/17, Andy Lutomirski wrote: >> fdmap() is standalone thing. >> >> Next step is to design fdinfo(2) (?) which uses descriptors from >> fdmap(2). Extending structures is done as usual: but version, >> add new fields to the end. > > I very strongly disagree. If you really want a new interfac

Re: [1/2,v2] fdmap(2)

2017-10-18 Thread Andy Lutomirski
> On Oct 18, 2017, at 4:35 AM, Alexey Dobriyan wrote: > >> On 10/12/17, Andrei Vagin wrote: >> >> I'm agree with your points, but I think you choose a wrong set of data >> to make an example of a new approach. >> >> You are talking a lot about statx, but for me it is unclear how fdmap >> follows

Re: [1/2,v2] fdmap(2)

2017-10-18 Thread Alexey Dobriyan
On 10/12/17, Andrei Vagin wrote: > I'm agree with your points, but I think you choose a wrong set of data > to make an example of a new approach. > > You are talking a lot about statx, but for me it is unclear how fdmap > follows the idea of statx. Let's imagine that I want to extend fdmap to > r

Re: [1/2,v2] fdmap(2)

2017-10-12 Thread Andrei Vagin
On Wed, Oct 11, 2017 at 09:12:34PM +0300, Alexey Dobriyan wrote: > On Tue, Oct 10, 2017 at 03:08:06PM -0700, Andrei Vagin wrote: > > On Sun, Sep 24, 2017 at 11:06:20PM +0300, Alexey Dobriyan wrote: > > > From: Aliaksandr Patseyenak > > > > > > Implement system call for bulk retrieveing of opened

Re: [1/2,v2] fdmap(2)

2017-10-11 Thread Alexey Dobriyan
On Tue, Oct 10, 2017 at 03:08:06PM -0700, Andrei Vagin wrote: > On Sun, Sep 24, 2017 at 11:06:20PM +0300, Alexey Dobriyan wrote: > > From: Aliaksandr Patseyenak > > > > Implement system call for bulk retrieveing of opened descriptors > > in binary form. > > > > Some daemons could use it to relia

Re: [PATCH 1/2 v2] fdmap(2)

2017-10-11 Thread Alexey Dobriyan
On Thu, Sep 28, 2017 at 08:02:23AM -0700, Andy Lutomirski wrote: > On Thu, Sep 28, 2017 at 3:55 AM, Alexey Dobriyan wrote: > > On 9/28/17, Michael Kerrisk (man-pages) wrote: > >> On 27 September 2017 at 17:03, Andy Lutomirski wrote: > > > The idea is to start process. In ideal world, only b

Re: [1/2,v2] fdmap(2)

2017-10-10 Thread Andrei Vagin
On Sun, Sep 24, 2017 at 11:06:20PM +0300, Alexey Dobriyan wrote: > From: Aliaksandr Patseyenak > > Implement system call for bulk retrieveing of opened descriptors > in binary form. > > Some daemons could use it to reliably close file descriptors > before starting. Currently they close everythin

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-28 Thread Andy Lutomirski
On Thu, Sep 28, 2017 at 3:55 AM, Alexey Dobriyan wrote: > On 9/28/17, Michael Kerrisk (man-pages) wrote: >> On 27 September 2017 at 17:03, Andy Lutomirski wrote: > The idea is to start process. In ideal world, only bynary system calls would exist and shells could emulate /proc/* same w

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-28 Thread Alexey Dobriyan
On 9/28/17, Michael Kerrisk (man-pages) wrote: > On 27 September 2017 at 17:03, Andy Lutomirski wrote: >>> The idea is to start process. In ideal world, only bynary system calls >>> would exist and shells could emulate /proc/* same way bash implement >>> /dev/tcp >> >> Then start the process by

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-28 Thread Alexey Dobriyan
On 9/27/17, Andy Lutomirski wrote: > On Tue, Sep 26, 2017 at 12:00 PM, Alexey Dobriyan > wrote: >> On Mon, Sep 25, 2017 at 09:42:58AM +0200, Michael Kerrisk (man-pages) >> wrote: >>> [Not sure why original author is not in CC; added] >>> >>> Hello Alexey, >>> >>> On 09/24/2017 10:06 PM, Alexey Do

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-28 Thread Michael Kerrisk (man-pages)
On 27 September 2017 at 17:03, Andy Lutomirski wrote: > On Tue, Sep 26, 2017 at 12:00 PM, Alexey Dobriyan wrote: >> On Mon, Sep 25, 2017 at 09:42:58AM +0200, Michael Kerrisk (man-pages) wrote: >>> [Not sure why original author is not in CC; added] >>> >>> Hello Alexey, >>> >>> On 09/24/2017 10:06

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-27 Thread Andy Lutomirski
On Tue, Sep 26, 2017 at 12:00 PM, Alexey Dobriyan wrote: > On Mon, Sep 25, 2017 at 09:42:58AM +0200, Michael Kerrisk (man-pages) wrote: >> [Not sure why original author is not in CC; added] >> >> Hello Alexey, >> >> On 09/24/2017 10:06 PM, Alexey Dobriyan wrote: >> > From: Aliaksandr Patseyenak >

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-26 Thread Alexey Dobriyan
On Mon, Sep 25, 2017 at 09:42:58AM +0200, Michael Kerrisk (man-pages) wrote: > [Not sure why original author is not in CC; added] > > Hello Alexey, > > On 09/24/2017 10:06 PM, Alexey Dobriyan wrote: > > From: Aliaksandr Patseyenak > > > > Implement system call for bulk retrieveing of opened des

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-26 Thread Alexey Dobriyan
On Sun, Sep 24, 2017 at 02:31:23PM -0700, Andy Lutomirski wrote: > On Sun, Sep 24, 2017 at 1:06 PM, Alexey Dobriyan wrote: > > From: Aliaksandr Patseyenak > > > > Implement system call for bulk retrieveing of opened descriptors > > in binary form. > > > > Some daemons could use it to reliably clo

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-25 Thread kbuild test robot
Hi Aliaksandr, [auto build test WARNING on linus/master] [also build test WARNING on v4.14-rc2 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Alexey-Dobriyan/fdmap-2/20170926-1051

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-25 Thread Michael Kerrisk (man-pages)
[Not sure why original author is not in CC; added] Hello Alexey, On 09/24/2017 10:06 PM, Alexey Dobriyan wrote: > From: Aliaksandr Patseyenak > > Implement system call for bulk retrieveing of opened descriptors > in binary form. > > Some daemons could use it to reliably close file descriptors

Re: [PATCH 1/2 v2] fdmap(2)

2017-09-24 Thread Andy Lutomirski
On Sun, Sep 24, 2017 at 1:06 PM, Alexey Dobriyan wrote: > From: Aliaksandr Patseyenak > > Implement system call for bulk retrieveing of opened descriptors > in binary form. > > Some daemons could use it to reliably close file descriptors > before starting. Currently they close everything upto som

[PATCH 1/2 v2] fdmap(2)

2017-09-24 Thread Alexey Dobriyan
From: Aliaksandr Patseyenak Implement system call for bulk retrieveing of opened descriptors in binary form. Some daemons could use it to reliably close file descriptors before starting. Currently they close everything upto some number which formally is not reliable. Other natural users are lsof