lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727155829.GA7225@lst.de>
Date:   Mon, 27 Jul 2020 17:58:29 +0200
From:   Christoph Hellwig <hch@....de>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
        "H. Peter Anvin" <hpa@...or.com>, Song Liu <song@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-raid@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 18/23] init: open code setting up stdin/stdout/stderr

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 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.
> > > > > 
> > > > > I really hate that one.  Every time we exposed the internal details to
> > > > > the fucking early init code, we paid for that afterwards.  And this
> > > > > goes over the top wrt the level of details being exposed.
> > > > > 
> > > > > _IF_ you want to keep that thing, move it to fs/file.c, with dire comment
> > > > > re that being very special shite for init and likely cause of subsequent
> > > > > trouble whenever anything gets changed, a gnat farts somewhere, etc.
> > > > 
> > > > Err, while I'm all for keeping internals internal, fd_install and
> > > > get_unused_fd_flags are exported routines with tons of users of this
> > > > pattern all over.
> > > 
> > > get_file_rcu_many()?  All over the place?  Besides, that's _not_ the normal
> > > pattern for get_unused_fd() - there's a very special reason we don't expect
> > > an error from it here.
> > 
> > Oh well.  I can add an init_dup2, but that should probably go after
> > the series adding fs/for-init.c or fs/init.c.  I'll skip it for the
> > current set of fixups and will send it once we have a stable branch for
> > that.
> 
> OK.  The really serious ones are around f_pos uses and d_genocide() one.
> FWIW, cleanup_rootfs() should probably be removed - it looks rather
> pointless.

I've got all that in a series I've tested this morning, and which
I really should post now..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ