|
Message-ID: <CAPXgP1258BjQ8vsdpicq0oxS0Onva9DYu5se6dmQKsT+-He-UQ@mail.gmail.com> Date: Thu, 4 Aug 2011 03:15:51 +0200 From: Kay Sievers <kay.sievers@...y.org> To: Linus Torvalds <torvalds@...ux-foundation.org> Cc: Andrew Morton <akpm@...ux-foundation.org>, Marc Zyngier <marc.zyngier@....com>, Vasiliy Kulikov <segoon@...nwall.com>, Manuel Lauss <manuel.lauss@...glemail.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Richard Weinberger <richard@....at>, Ingo Molnar <mingo@...e.hu>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, "Paul E. McKenney" <paul.mckenney@...aro.org>, Greg KH <greg@...ah.com> Subject: Re: [PATCH] shm: fix a race between shm_exit() and shm_init() On Thu, Aug 4, 2011 at 03:01, Linus Torvalds <torvalds@...ux-foundation.org> wrote: > On Wed, Aug 3, 2011 at 2:50 PM, Andrew Morton <akpm@...ux-foundation.org> wrote: >> >> Well, it's still a workaround. We'll still have driver_init() trying >> to run userspace helpers at an inappropriate time, and failing to do >> so. Either something will break or it should not be attempting >> attempting to do this at all. > > Well, it has never worked before either, so I wouldn't call it a > "workaround", more of a "insane subsystems do user-mode helpers for > crazy small things, and at crazy times. Stop them from wasting our > time and effort at those crazy times when we know they would fail > anyway". > >> Perhaps Kay and Greg can suggest how we can fix all this up? > > I think just not calling user-mode when user-mode isn't ready is a real fix. Yes, we should default to off, and probably only enable it just right before we start /sbin/init from the mounted root or in initramfs. There should be no useful use of /sbin/hotplug before we mounted root, or unpacked initramfs. > The fact that the device models send an absolutely *insane* amount of > events for everything, and don't track "this is the bootup device > scan" on their own is kind of sad, but it's how they roll. This fixes > it at a core level, so that the device layer doesn't have to track the > "am I booting, or is this a dynamic event?" at all. It is insane, and the entire uevent hookup with /sbin/hotplug should just be removed. We send from 1000 to many 1000s of events at bootup, and forking a binary here makes not much sense these days. All distros default to CONFIG_UEVENT_HELPER_PATH="" because nothing else really works anymore, some boxes don't even boot up. /sbin/hotplug worked fine when we all had one USB mouse connected and needed to load like 5 drivers for the system, but not today. It's a broken concept today, at least in the way we plug it into the driver core makes no sense today, it is just a heritage from the old days. Kay
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.