From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Lutomirski <luto@mit.edu>
Cc: Ingo Molnar <mingo@elte.hu>,
Rakib Mullick <rakib.mullick@gmail.com>,
hpa@zytor.com, tglx@linutronix.de, x86@kernel.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] x86, vsyscall: Fix build warning in vsyscall_64.c
Date: Wed, 15 Jun 2011 12:32:42 -0700 [thread overview]
Message-ID: <BANLkTinJimOb4CMQeDm+Ob60N5v4QAMWwg@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinxKV-Kprm+ezfbt2a=C1fz+-7wrg@mail.gmail.com>
On Wed, Jun 15, 2011 at 12:24 PM, Andrew Lutomirski <luto@mit.edu> wrote:
>
> Well, let's say that my logic is wrong and this particular BUG can be
> hit because some kernel bug allows some user program to trigger it.
Christ, we already check the particular address. And if a user can
generate the buggy situation, THEN THE BUG_ON() SURE AS HELL ISN'T
HELPING ANYTHING!
Guys, if that BUG_ON can ever be triggered, IT IS A SECURITY HOLE IN
ITSELF! What's so hard to understand about that?
BUG_ON's are not "good ways to figure out something went wrong". They
are an absolute last-case situation. They are NOT "let's fix that
security hole by halting the whole machine" kind of valid.
If you're really worried about it ever triggering, then dammit, HANDLE THE CASE.
Don't add a BUG_ON() for something you're afraid of. That is NEVER the
right thing to do. If you're worried that that situation can trigger,
then do the right code for that situation. Don't throw your hands in
the air and say "that's a bug".
Linus
next prev parent reply other threads:[~2011-06-15 19:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 7:31 Rakib Mullick
2011-06-11 11:01 ` Andrew Lutomirski
2011-06-12 5:12 ` Rakib Mullick
2011-06-13 2:52 ` Andrew Lutomirski
2011-06-13 4:54 ` Rakib Mullick
2011-06-13 8:45 ` Rakib Mullick
2011-06-13 18:06 ` Andrew Lutomirski
2011-06-14 17:43 ` Rakib Mullick
2011-06-14 18:03 ` Andy Lutomirski
2011-06-14 21:16 ` Ingo Molnar
2011-06-14 21:24 ` Linus Torvalds
2011-06-14 21:31 ` Ingo Molnar
2011-06-14 21:33 ` Andrew Lutomirski
2011-06-15 5:59 ` Rakib Mullick
2011-06-15 7:25 ` Ingo Molnar
2011-06-15 18:49 ` Linus Torvalds
2011-06-15 19:24 ` Andrew Lutomirski
2011-06-15 19:32 ` Linus Torvalds [this message]
2011-06-15 19:51 ` Andrew Lutomirski
2011-06-13 9:29 ` Ingo Molnar
2011-06-13 13:03 ` Andrew Lutomirski
2011-06-13 14:14 ` Ingo Molnar
2011-06-13 14:18 ` Andrew Lutomirski
2011-06-13 17:05 ` Rakib Mullick
2011-06-13 17:06 ` Andrew Lutomirski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTinJimOb4CMQeDm+Ob60N5v4QAMWwg@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@mit.edu \
--cc=mingo@elte.hu \
--cc=rakib.mullick@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®