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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 20 Sep 2014 22:20:27 +0900 From: Roman Peniaev <r.peniaev@...il.com> To: Oleg Nesterov <oleg@...hat.com> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Ming Lei <ming.lei@...onical.com>, Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org Subject: Re: [v4 PATCH 1/1] init: fix race between rootfs mount and firmware loading Thanks, Oleg, for the review. -- Roman On Sat, Sep 20, 2014 at 4:45 AM, Oleg Nesterov <oleg@...hat.com> wrote: > On 09/19, Roman Pen wrote: >> >> +void wait_for_rootfs(void) >> +{ >> + /* Here we try to protect from a few things: >> + * 1. Avoid waiting for ourselves, when init thread has not >> + * mounted rootfs yet. >> + * 2. Avoid warning if call chain was initiated from userspace >> + * /sbin/init. For example when /sbin/init loads the driver, >> + * which, in turn, wants to access rootfs (e.g. firmware loading), >> + * thus it has to be sure, that rootfs has been successfully >> + * mounted. >> + */ >> + if (rootfs_mounted || WARN_ON(is_global_init(current))) >> + return; >> + else >> + wait_event(rootfs_waitq, rootfs_mounted); >> +} > > Well, in this case __wait_event() makes more sense, we already checked > rootfs_mounted, but this is minor. > > Reviewed-by: Oleg Nesterov <oleg@...hat.com> > > > But I hope that Greg can take a look too. I do not understand the problem > space enough, so I am not sure this is the "right" fix. Say, perhaps we > should change the drivers which abuse request_firmware(), or do something > else. > > Oleg. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists