Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: Parisc List <linux-parisc@vger.kernel.org>,
	linux-arch@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH v2] update parisc to use generic strncpy_from_user()
Date: Thu, 31 May 2012 11:11:49 +0100	[thread overview]
Message-ID: <1338459109.3073.13.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <CADZpyiyZX8QNDzWhpJfQS4YWYh24uG37AZYEP4gW63uqCW+W_A@mail.gmail.com>

On Mon, 2012-05-28 at 13:57 -0400, Carlos O'Donell wrote:
> On Sat, May 26, 2012 at 4:48 AM, James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > I'll queue this patch in our git repo.  It seems to work fine for us,
> > thanks, Dave!
> >
> > v2: use test_thread_flag() for max addr determination instead of
> > tsk->thread.task_size
> >
> 
> Doesn't this seems like wasted instructions on the hot path? I fully
> agree with you that on PA, where the stack grows up, there isn't
> anything to run into up there.
> 
> On PA the failure case is still likely going to be one where you copy
> all the way through the stack (which would appear valid to the kernel)
> and fault on the first unmapped page and return -EFAULT.
> 
> I'd rather see a compile-time constant like you originally suggested.

OK, I'll modify it just to be ~0UL.

James



  reply	other threads:[~2012-05-31 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-26  8:48 [PATCH v2] update parisc to use generic strncpy_from_user() James Bottomley
2012-05-26  8:48 ` James Bottomley
2012-05-28 17:57 ` Carlos O'Donell
2012-05-31 10:11   ` James Bottomley [this message]
2012-05-31 10:11     ` James Bottomley

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=1338459109.3073.13.camel@dabdike.int.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=carlos@systemhalted.org \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-parisc@vger.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