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: <70e4869e-1ab8-9838-5af8-8cd41a536f2b@kernel.dk>
Date:   Mon, 16 Jan 2023 09:06:28 -0700
From:   Jens Axboe <axboe@...nel.dk>
To:     Christoph Hellwig <hch@...radead.org>,
        David Howells <dhowells@...hat.com>
Cc:     linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: Is there a reason why REQ_OP_READ has to be 0?

On 1/16/23 9:04?AM, Christoph Hellwig wrote:
> On Mon, Jan 16, 2023 at 04:01:50PM +0000, David Howells wrote:
>> Hi Jens, Christoph,
>>
>> Do you know if there's a reason why REQ_OP_READ has to be 0?  I'm seeing a
>> circumstance where a direct I/O write on a blockdev is BUG'ing in my modified
>> iov_iter code because the iterator says it's a source iterator (correct), but
>> the bio->bi_opf == REQ_OP_READ (which should be wrong).
>>
>> I thought I'd move REQ_OP_READ to, say, 4 so that I could try and see if it's
>> just undefined but the kernel BUGs and then panics during boot.
> 
> There's all kind of assumptions of that from basically day 1 of
> Linux.  The most obvious one is in op_is_write, but I'm pretty sure
> there are more hidden somewhere.

I didn't get this original email...

I would not change this frivilously, as Christoph says we've used 0/1
for basic read/write data direction since basically forever. So for all
intents and purposes, yes that is basically hardwired.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ