Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Christoph Hellwig
On Mon, Jul 27, 2020 at 04:54:53PM +0100, Al Viro wrote: > On Mon, Jul 27, 2020 at 08:48:28AM +0200, Christoph Hellwig wrote: > > On Mon, Jul 27, 2020 at 07:03:22AM +0100, Al Viro wrote: > > > On Mon, Jul 27, 2020 at 07:46:25AM +0200, Christoph Hellwig wrote: > > > > On Mon, Jul 27, 2020 at

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Al Viro
On Mon, Jul 27, 2020 at 08:48:28AM +0200, Christoph Hellwig wrote: > On Mon, Jul 27, 2020 at 07:03:22AM +0100, Al Viro wrote: > > On Mon, Jul 27, 2020 at 07:46:25AM +0200, Christoph Hellwig wrote: > > > On Mon, Jul 27, 2020 at 04:05:34AM +0100, Al Viro wrote: > > > > On Tue, Jul 14, 2020 at

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Christoph Hellwig
On Sun, Jul 26, 2020 at 11:36:15PM -0700, h...@zytor.com wrote: > >Err, why? The changes have been pretty simple, and I'd rather not come > >up with new crazy ways just to make things complicated. > > Why? To avoid this neverending avalanche of special interfaces and layering > violations.

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Christoph Hellwig
On Mon, Jul 27, 2020 at 07:03:22AM +0100, Al Viro wrote: > On Mon, Jul 27, 2020 at 07:46:25AM +0200, Christoph Hellwig wrote: > > On Mon, Jul 27, 2020 at 04:05:34AM +0100, Al Viro wrote: > > > On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: > > > > Don't rely on the implicit

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread hpa
On July 26, 2020 11:24:25 PM PDT, Christoph Hellwig wrote: >On Sun, Jul 26, 2020 at 11:20:41PM -0700, h...@zytor.com wrote: >> On July 26, 2020 8:05:34 PM PDT, Al Viro >wrote: >> >On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: >> >> Don't rely on the implicit

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Christoph Hellwig
On Sun, Jul 26, 2020 at 11:20:41PM -0700, h...@zytor.com wrote: > On July 26, 2020 8:05:34 PM PDT, Al Viro wrote: > >On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: > >> Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, > >but > >> instead open a struct file

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread hpa
On July 26, 2020 8:05:34 PM PDT, Al Viro wrote: >On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: >> Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, >but >> instead open a struct file for /dev/console and then install it as FD >> 0/1/2 manually. > >I really

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-27 Thread Al Viro
On Mon, Jul 27, 2020 at 07:46:25AM +0200, Christoph Hellwig wrote: > On Mon, Jul 27, 2020 at 04:05:34AM +0100, Al Viro wrote: > > On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: > > > Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but > > > instead open a

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-26 Thread Christoph Hellwig
On Mon, Jul 27, 2020 at 04:05:34AM +0100, Al Viro wrote: > On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: > > Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but > > instead open a struct file for /dev/console and then install it as FD > > 0/1/2 manually. >

Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-26 Thread Al Viro
On Tue, Jul 14, 2020 at 09:04:22PM +0200, Christoph Hellwig wrote: > Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but > instead open a struct file for /dev/console and then install it as FD > 0/1/2 manually. I really hate that one. Every time we exposed the internal

[PATCH 18/23] init: open code setting up stdin/stdout/stderr

2020-07-14 Thread Christoph Hellwig
Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but instead open a struct file for /dev/console and then install it as FD 0/1/2 manually. Signed-off-by: Christoph Hellwig --- init/main.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git