lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f7ba1dbbc4749f09ae44aafc6ada284@AcuMS.aculab.com>
Date:   Wed, 27 Jan 2021 16:28:38 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Pavel Begunkov' <asml.silence@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>
CC:     "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "Jens Axboe" <axboe@...nel.dk>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] iov_iter: optimise iter type checking

From: Pavel Begunkov
> Sent: 27 January 2021 15:48
> 
> On 16/01/2021 05:18, Al Viro wrote:
> > On Sat, Jan 09, 2021 at 10:11:09PM +0000, Pavel Begunkov wrote:
> >
> >>> Does any code actually look at the fields as a pair?
> >>> Would it even be better to use separate bytes?
> >>> Even growing the on-stack structure by a word won't really matter.
> >>
> >> u8 type, rw;
> >>
> >> That won't bloat the struct. I like the idea. If used together compilers
> >> can treat it as u16.
> >
> > Reasonable, and from what I remember from looking through the users,
> > no readers will bother with looking at both at the same time.
> 
> Al, are you going turn it into a patch, or prefer me to take over?

I'd definitely leave the type as a bitmap.

It may be useful to add ITER_IOVEC_SINGLE to optimise some
very common paths for user iovec with only a single buffer.
But you'd probably want to keep the full version for
more unusual (or already expensive) cases.

	David

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ