mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Rene Herman <rene.herman@gmail.com>
Cc: Zachary Amsden <zach@vmware.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] romsignature/checksum cleanup
Date: Sun, 07 Jan 2007 10:07:08 -0800	[thread overview]
Message-ID: <45A136CC.60007@goop.org> (raw)
In-Reply-To: <45A0CFC6.3030707@gmail.com>

Rene Herman wrote:
> Doing the set_fs() and pagefault_{disable,enable} calls for every
> single byte during the checksum seems rather silly.

Why?  It's a bit of a performance hit, but that doesn't matter here. 
probe_kernel_address() is semantically the right thing to be using;
open-coding its contents to avoid a few fairly cheap operations is a
backwards step.

> I disagree I'm afraid. Given what __get_user compiles to (nothing more
> than a .fixup entry, basically) they're largely "free" and it makes
> the code completely obvious: "If you're touching this, do so via
> __get_user and not directly" and frees it from any assumptions,
> however reasonable or unreasonable.

My point is that "__get_user" doesn't make much semantic sense here:
we're not talking about usermode pages.  We used to use it quite often
for cases where an access may or may not fault, but now we spell that
"probe_kernel_address()".

> Would you _mind_ if I submit it? If not, if you could comment on
> whether or not these pagefault calls are still useful, that would be
> great.

I don't strongly object to using probe_kernel_address() for all ROM
memory accesses if it makes you feel happier, but I think putting an
open-coded implementation in here is definitely the wrong thing to do.

    J

  reply	other threads:[~2007-01-07 18:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-24 21:15 Rene Herman
2006-12-25  0:53 ` Rene Herman
2006-12-27  0:31   ` Rusty Russell
2006-12-27  0:45     ` Rene Herman
2006-12-28  0:32     ` Zachary Amsden
2007-01-02 20:01       ` Rene Herman
2007-01-05 23:22         ` Jeremy Fitzhardinge
2007-01-06  3:46           ` Rene Herman
2007-01-07  8:59             ` Jeremy Fitzhardinge
2007-01-07  9:02               ` Rene Herman
2007-01-07 10:20                 ` Jeremy Fitzhardinge
2007-01-07 10:47                   ` Rene Herman
2007-01-07 18:07                     ` Jeremy Fitzhardinge [this message]
2007-01-08  2:48                       ` Rene Herman

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=45A136CC.60007@goop.org \
    --to=jeremy@goop.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@gmail.com \
    --cc=rusty@rustcorp.com.au \
    --cc=zach@vmware.com \
    /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

Powered by JetHome