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: <20191219070836.GA496264@light.dominikbrodowski.net>
Date:   Thu, 19 Dec 2019 08:08:36 +0100
From:   Dominik Brodowski <linux@...inikbrodowski.net>
To:     youling 257 <youling257@...il.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rafael Wysocki <rafael@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] init: unify opening /dev/console as
 stdin/stdout/stderr

On Thu, Dec 19, 2019 at 05:50:19AM +0800, youling 257 wrote:
> 2019-12-18 5:14 GMT+08:00, Linus Torvalds <torvalds@...ux-foundation.org>:
> > This should be fixed by 2d3145f8d280 ("early init: fix error handling
> > when opening /dev/console")
> 
> this fix no help for me.
> 
> > I'm not sure what you did to trigger that bug, but it was a bug.
> 
> alt+f1, type bash command,
> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
> bash: no job control in this shell

Could you test this patch, please? And if it does not work: What is the
content of /proc/1/fd/ and /proc/1/fdinfo/* for the working and non-working
case? That are the only changes visible to userspace...

Thanks,
	Dominik

diff --git a/init/main.c b/init/main.c
index 1ecfd43ed464..8886530e9dec 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1162,7 +1162,7 @@ void console_on_rootfs(void)
 	unsigned int i;
 
 	/* Open /dev/console in kernelspace, this should never fail */
-	file = filp_open("/dev/console", O_RDWR, 0);
+	file = filp_open("/dev/console", force_o_largefile() ? O_LARGEFILE | O_RDWR : O_RDWR, 0);
 	if (IS_ERR(file))
 		goto err_out;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ