[lkml]   [2015]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] compat: fix possible out-of-bound accesses in compat_get_bitmap() and compat_put_bitmap()
On Fri, Jun 5, 2015 at 11:24 AM, Al Viro <> wrote:
> Yes, but... if we decrement that sucker at all, why do we need to play with
> i at all? We need exactly nr_compat_longs get_user(), so why not make _that_
> the condition in the single-level loop?

Yeah, I think that code could be clarified further, no argument there.

And wee could just do it the copy in compat_long_t directly on
little-endian and get rid of the complications entirely, but then we'd
have the worry of separate code for big-endian, so I guess that's not
worth it (it's not like this should be hugely performance-sensitive).

I think most of that code falls under "don't touch it if it ain't
broke", with the corollary being "touch it as little as possible even
when it is broke"


 \ /
  Last update: 2015-06-06 18:21    [W:0.038 / U:2.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site