[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] update parisc to use generic strncpy_from_user()

On Sat, May 26, 2012 at 4:48 AM, James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> 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.

To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Photo]     [Yosemite]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux