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
| ||
|
Message-ID: <fdcf70aaf53b4d3040bed95535846edc0120bfea.camel@fb.com> Date: Tue, 22 Feb 2022 10:52:17 +0000 From: Dylan Yudaken <dylany@...com> To: "haoxu@...ux.alibaba.com" <haoxu@...ux.alibaba.com>, "axboe@...nel.dk" <axboe@...nel.dk>, "asml.silence@...il.com" <asml.silence@...il.com>, "io-uring@...r.kernel.org" <io-uring@...r.kernel.org> CC: Kernel Team <Kernel-team@...com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v2 4/4] io_uring: pre-increment f_pos on rw On Tue, 2022-02-22 at 15:34 +0800, Hao Xu wrote: > > On 2/21/22 22:16, Dylan Yudaken wrote: > > In read/write ops, preincrement f_pos when no offset is specified, > > and > > then attempt fix up the position after IO completes if it completed > > less > > than expected. This fixes the problem where multiple queued up IO > > will all > > obtain the same f_pos, and so perform the same read/write. > > > > This is still not as consistent as sync r/w, as it is able to > > advance the > > file offset past the end of the file. It seems it would be quite a > > performance hit to work around this limitation - such as by keeping > > track > > of concurrent operations - and the downside does not seem to be too > > problematic. > > > > The attempt to fix up the f_pos after will at least mean that in > > situations > > where a single operation is run, then the position will be > > consistent. > > > It's a little bit weird, when a read req returns x bytes read while > f_pos > > moves ahead y bytes where x isn't equal to y. Don't know if this > causes > > problems.. > It seems to be ok - as in nothing crashes when f_pos is past the end of the file - but I really am not an expert on these things so am happy to receive feedback on this.
Powered by blists - more mailing lists