Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278604
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory |
| Date | 2015-11-27 09:10 +0100 |
| Message-ID | <qzmgq-eI-13@gated-at.bofh.it> (permalink) |
| References | <qyttF-59Z-27@gated-at.bofh.it> <qz1vk-3q9-5@gated-at.bofh.it> <qz2hH-3Y1-3@gated-at.bofh.it> <qz3GO-51Y-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* PaX Team <pageexec@freemail.hu> wrote: > On 26 Nov 2015 at 11:42, Ingo Molnar wrote: > > > * PaX Team <pageexec@freemail.hu> wrote: > > > > > On 26 Nov 2015 at 9:54, Ingo Molnar wrote: > > > > > e.g., imagine that the write was to a function pointer (even an entire ops > > > structure) or a boolean that controls some important feature for after-init > > > code. ignoring/dropping such writes could cause all kinds of logic bugs (if not > > > worse). > > > > Well, the typical case is that it's a logic bug to _do_ the write: the structure > > was marked readonly for a reason but some init code re-runs during suspend or so. > > that's actually not the typical case in my experience, but rather these two: > > 1. initial mistake: someone didn't actually check whether the given object can > be __read_only > > 2. code evolution: an object that was once written by __init code only (and > thus proactively subjected to __read_only) gets modified by non-init code > due to later changes > > what you described above is a third case where there's a latent bug to begin > (unintended write) with that __read_only merely exposes but doesn't create > itself, unlike the two cases above (intended writes getting caught by wrong use > of __read_only). You are right, I concede this part of the argument - what you describe is probably the most typical way to get ro-faults. I do maintain the (sub-)argument that oopsing or relying on tooling help years down the line is vastly inferior to fixing up the problem and generating a one-time stack dump so that kernel developers have a chance to fix the bug. The sooner we detect and dump such information the more likely it is that such bugs don't get into end user kernel versions. > my proposal would produce the exact same reports, the difference is in letting > the write attempt succeed vs. skipping it. this latter step is what is wrong > since it introduces at least a logic bug the same way the constprop optimization > created a logic bug. Yes, you are right and I agree. Does anyone want to submit such a patch for upstream? Looks like a good change. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-24 22:40 +0100
[PATCH 1/2] x86: introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-24 22:40 +0100
Re: [PATCH 1/2] x86: introduce post-init read-only memory Andy Lutomirski <luto@amacapital.net> - 2015-11-25 01:40 +0100
Re: [PATCH 1/2] x86: introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-25 01:50 +0100
Re: [kernel-hardening] Re: [PATCH 1/2] x86: introduce post-init read-only memory Michael Ellerman <mpe@ellerman.id.au> - 2015-11-25 02:00 +0100
Re: [kernel-hardening] Re: [PATCH 1/2] x86: introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-25 16:10 +0100
Re: [kernel-hardening] Re: [PATCH 1/2] x86: introduce post-init read-only memory Michael Ellerman <mpe@ellerman.id.au> - 2015-11-26 00:10 +0100
Re: [kernel-hardening] Re: [PATCH 1/2] x86: introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-26 00:40 +0100
[PATCH 2/2] x86, vdso: mark vDSO read-only after init Kees Cook <keescook@chromium.org> - 2015-11-24 22:50 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Mathias Krause <minipli@googlemail.com> - 2015-11-25 10:20 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Clemens Ladisch <clemens@ladisch.de> - 2015-11-25 11:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-25 12:20 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-25 12:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-26 10:00 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-26 11:00 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-26 11:50 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-26 13:20 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-27 09:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-27 16:40 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Andy Lutomirski <luto@amacapital.net> - 2015-11-27 17:40 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-29 09:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "PaX Team" <pageexec@freemail.hu> - 2015-11-29 12:20 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-29 16:40 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Mathias Krause <minipli@googlemail.com> - 2015-11-29 19:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-30 09:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Andy Lutomirski <luto@amacapital.net> - 2015-11-26 17:20 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-27 09:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-27 19:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-27 19:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-27 21:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Andy Lutomirski <luto@amacapital.net> - 2015-11-27 21:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Ingo Molnar <mingo@kernel.org> - 2015-11-29 09:10 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-25 18:30 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "H. Peter Anvin" <hpa@zytor.com> - 2015-11-25 18:40 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory Kees Cook <keescook@chromium.org> - 2015-11-25 20:00 +0100
Re: [kernel-hardening] [PATCH 0/2] introduce post-init read-only memory "H. Peter Anvin" <hpa@zytor.com> - 2015-11-25 20:10 +0100
csiph-web