From: Borislav Petkov <bp@alien8.de>
To: Dave Hansen <dave@sr71.net>
Cc: hpa@linux.intel.com, linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH 4/5] break up slow_virt_to_phys()
Date: Thu, 11 Apr 2013 19:12:46 +0200 [thread overview]
Message-ID: <20130411171246.GF27062@pd.tnic> (raw)
In-Reply-To: <5166E4CB.2060700@sr71.net>
On Thu, Apr 11, 2013 at 09:28:59AM -0700, Dave Hansen wrote:
> It's harsh for the cases where __pa()'s result never gets used
> directly, like for checking against 'high_memory'. If it gets used
> (like in /dev/mem's case) the kernel really is doing something it does
> not intend to do. It's essentially reading or writing garbage.
>
> On the other hand, I guess if we've been letting it do that bad thing
> for years, we might as well continue. We're not causing any _more_
> damage.
Well, if it wasn't an already used interface I'd say we forbid accesses
which are void of sense and issue a WARN_ON but who knows who'll come
screaming if we did that.
> I'm leaning toward making it a WARN_ON() at the moment. :)
Right, well, yeah, people would still be able to shoot themselves in the
foot over /dev/mem but now they'll at least be warned about it. Kernel's
job's done. :)
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-04-11 17:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 23:32 [PATCH 0/5] [RFC] rework /dev/mem code vs. highmem and DEBUG_VIRTUAL Dave Hansen
2013-04-10 23:32 ` [PATCH 1/5] clean up checks against "high_memory" variable Dave Hansen
2013-04-11 0:44 ` Borislav Petkov
2013-04-10 23:32 ` [PATCH 2/5] make /dev/kmem return error for highmem Dave Hansen
2013-04-11 9:58 ` Borislav Petkov
2013-04-10 23:32 ` [PATCH 3/5] avoid /dev/kmem oopses with DEBUG_VIRTUAL Dave Hansen
2013-04-10 23:32 ` [PATCH 4/5] break up slow_virt_to_phys() Dave Hansen
2013-04-11 12:29 ` Borislav Petkov
2013-04-11 16:28 ` Dave Hansen
2013-04-11 17:12 ` Borislav Petkov [this message]
2013-04-10 23:32 ` [PATCH 5/5] keep /dev/kmem from triggering BUG_ON() with DEBUG_VIRTUAL Dave Hansen
2013-04-11 12:37 ` Borislav Petkov
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=20130411171246.GF27062@pd.tnic \
--to=bp@alien8.de \
--cc=dave@sr71.net \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).