Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1738126
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ingo Molnar <mingo@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized |
| Date | Sun, 24 Sep 2017 11:20:02 +0200 |
| Message-ID | <utbeW-6SD-5@gated-at.bofh.it> (permalink) |
| References | <uqZhT-3xJ-1@gated-at.bofh.it> <usQkb-22V-41@gated-at.bofh.it> <usUxr-4MR-11@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T+3j2+d+s+GsW8CUUjvHidXb1XHg61eHF5eai4CFn5Q=; b=BgINaDiLr6ZVJt0EgMzfO5D6tswg+vA/JIAY8BbfOIF3MslmPL47IpP+B4WRu8bwoi hMDJq1a35IBtGZbfRFvE7DYyQ00HknA/8tY2bqT4TtHQxmZ3P4K+udznMYRMcOv1TYMo mTYVhwTG7+lh7m1cI4E1zZ9vTP2u5YYPSooRRXx8Gf22evC1eSXyrVi9FiGrsLOaAmE8 TMUCbVFjX3KYOLOoGapRsCTWun+5cJHY5Wixwq1bwwuEXyZv8jrqpDsD2xtvDeFqPQVe g+7h7+sj/0n4ZtGFsbsKdD9yzNM/4ccSZbNU/COQkx+lTkdNRHcIJc8WuIRCoYE51d9Z /JpA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=T+3j2+d+s+GsW8CUUjvHidXb1XHg61eHF5eai4CFn5Q=; b=f71iuga5hu4yFzqclrOBCo0T2FLiPJTY5HLO5/svMpp1ettIUc/Sf1RXJ21ixAIoxy BP4ZLp2zFJ3ZLpDDAeRN3KXWXovQiQLmZ+xh5nMQ27tXd2WA33qmUNgr0xGgHfPUQQ2r IrLQJGDOM3tjhDHCRWstKeGKGdTH/27rQWbMNXBtiU1j35ttwemhN3nEYvigWb8uXhyz IuJmtwZlxuYttRD+xMzzTBvBM6+WWTUhsmQCJbycpdIkuTL4s4PrgdzDdasPnBRmSgX+ LgSmqmZ+102E7rORivpCRuQrMW2YH4GZ+JJESGNV/76JcgkGuBqcaG5WWQ3lqpdosZc7 tOBg== |
| X-Gm-Message-State | AHPjjUiWn/8oQL53w2LGhj6Bm/8uYP81Lu2LvAMnHDsI4uTFEKK64Udj LbaFxS1LL/YZkd8aybSkMLs= |
| X-Google-SMTP-Source | AOwi7QBvfdkgHA28ldHfEWpYDLcE/Gm0IdUCE4yRHcOHdeGehYPN2pwITmSegxU9Ib6gnpTFF1hayA== |
| X-Received | by 10.28.226.84 with SMTP id z81mr7256707wmg.108.1506244588661; Sun, 24 Sep 2017 02:16:28 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | NeoMutt/20170113 (1.7.2) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 94 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | LKML <linux-kernel@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>, "H. Peter Anvin" <hpa@zytor.com>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Linus Torvalds <torvalds@linux-foundation.org>, Andrew Morton <akpm@linux-foundation.org> |
| X-Original-Date | Sun, 24 Sep 2017 11:16:25 +0200 |
| X-Original-Message-ID | <20170924091625.qgudix2viua2cpkm@gmail.com> |
| X-Original-References | <20170918100551.4c3feea6@endymion> <20170923105031.xd6qslfn3sgingn6@gmail.com> <20170923172920.75f73e05@endymion> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1738126 |
Show key headers only | View raw
* Jean Delvare <jdelvare@suse.de> wrote: > Hi Ingo, > > On Sat, 23 Sep 2017 12:50:31 +0200, Ingo Molnar wrote: > > * Jean Delvare <jdelvare@suse.de> wrote: > > > > > I don't think it makes sense to check for a possible bad > > > initialization order at run time on every system when it is all > > > decided at build time. > > > > > > A more efficient way to make sure developers do not introduce new > > > calls to dmi_check_system() too early in the initialization sequence > > > is to simply document the expected call order. That way, developers > > > have a chance to get it right immediately, without having to > > > test-boot their kernel, wonder why it does not work, and parse the > > > kernel logs for a warning message. And we get rid of the run-time > > > performance penalty as a nice side effect. > > > > Huh? Initialization ordering requirements are very opaque, > > They were. Now they are very documented. > > > and by removing the debug check any such bugs are actively hidden. How > > is documentation supposed to uncover such bugs once they happen? > > You are looking at it the wrong way around. Documentation is how they > do not happen in the first place. That expectation, as a general statement, is very naive and contrary to experience: documentation is fine for one layer of defense to prevent bugs, but _when_ they happen and a bug slips through, documentation does not help anymore, because the dependencies in the _code_ are opaque and non-obvious ... For example during the early SMP efforts of Linux we used to document lock dependencies as well, but once the kernel had more than a dozen spinlocks we periodically ran into deadlocks and the whole design became unmaintainable quickly. So we have lockdep in addition to documentation. > You hit this problem once, 9 years ago. You thought it would have been easier to > debug if there was a warning, and you added it. I did not just 'think' it would have been easier to debug, I wasted time on that bug and a warning would have helped so I added it. That was and remains objectively true. While I expect most such warnings to never see any public email lists (because once a developer triggers it it gets fixed without the bug ever getting triggered by others), yet searching for "dmi check: not initialized yet" still finds a couple of incidents where real or potential bugs were found by this init dependency check, such as: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-September/289347.html or this: https://www.spinics.net/lists/linux-acpi/msg28698.html ... so this warning actually helped a number of kernel developers to not waste time on the opaque dependency. This is a warning that was added due to an _actual category of bugs_, which has been triggered subsequently as well, so it's not a frivolous warning by any meaning. > [...] It was one way to solve the problem but I claim it was not the best. > > What I expect from developers calling a function they aren't familiar > with is to read its documentation first. That's the very reason why we > spend time writing the documentation. They should not just call the > function, boot and see if it works or not. Software engineering vs. > trial and error. This statement is breathtaking in its ignorance :-( > > So NAK. > > This was FYI. I maintain this subsystem, and you did not convince me. I also > can't see a general trend of implementing what you suggest in the rest of the > kernel. Thankfully. I find the arrogance displayed here breathtaking as well - the last thing we need is for firmware interfacing kernel code to become _more_ fragile. This was and continues to be a useful warning - but what worries me even more is not just the removal of the warning, but the false and technically invalid justifications under which it is removed... For those reasons I maintain my NAK: Nacked-by: Ingo Molnar <mingo@kernel.org> Thanks, Ingo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] firmware: dmi_scan: Drop dmi_initialized Jean Delvare <jdelvare@suse.de> - 2017-09-18 10:10 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Ingo Molnar <mingo@kernel.org> - 2017-09-23 13:00 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Jean Delvare <jdelvare@suse.de> - 2017-09-23 17:30 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Ingo Molnar <mingo@kernel.org> - 2017-09-24 11:20 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Jean Delvare <jdelvare@suse.de> - 2017-09-25 11:10 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Peter Zijlstra <peterz@infradead.org> - 2017-09-25 11:30 +0200
Re: [PATCH] firmware: dmi_scan: Drop dmi_initialized Peter Zijlstra <peterz@infradead.org> - 2017-09-25 11:30 +0200
csiph-web