lkml.org 
[lkml]   [2020]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 10/10] powerpc: remove address space overrides using set_fs()
Date
From: Christoph Hellwig
> Sent: 02 September 2020 13:37
>
> On Wed, Sep 02, 2020 at 08:15:12AM +0200, Christophe Leroy wrote:
> >> - return 0;
> >> - return (size == 0 || size - 1 <= seg.seg - addr);
> >> + if (addr >= TASK_SIZE_MAX)
> >> + return false;
> >> + if (size == 0)
> >> + return false;
> >
> > __access_ok() was returning true when size == 0 up to now. Any reason to
> > return false now ?
>
> No, this is accidental and broken. Can you re-run your benchmark with
> this fixed?

Is TASK_SIZE_MASK defined such that you can do:

return (addr | size) < TASK_SIZE_MAX) || !size;

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

\
 
 \ /
  Last update: 2020-09-02 15:24    [W:0.075 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site