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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Mar 2014 13:52:13 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	George Spelvin <linux@...izon.com>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Update of file offset on write() etc. is non-atomic with I/O

On Mon, Mar 3, 2014 at 1:26 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Mon, Mar 03, 2014 at 04:03:59PM -0500, George Spelvin wrote:
>>
>> (If you want to use bits, why not use the two lsbits of the file pointer
>> for the purpose?  That would save a lot of space.)
>
> Most of the cases have it kept separately in registers, actually - there's
> a reason why fdget() and friends are inlined.

Yes. And bit test and set ops on registers are actually cheaper than
playing around with bytes.

That said, the "fget_light()" interface sucks - exactly because it
doesn't do the "return structure in two registers" thing. We should
get rid of it - there's just one remaining user in networking code,
and it should be rewritten in terms of fdget().

That's a separate issue, though.

Oh, and George, your email setup is broken. Gmail thinks your emails
are spam. I'm not sure why (the usual spf problems do not apply), but
it's possibly because your name and email looks made up.

              Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ