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: <0bc6cc65-e764-6fe0-9b0a-431015835770@kernel.dk>
Date:   Fri, 21 Aug 2020 20:16:32 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Luke Hsiao <lukehsiao@...gle.com>
Cc:     Luke Hsiao <luke.w.hsiao@...il.com>,
        David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>,
        Arjun Roy <arjunroy@...gle.com>,
        Soheil Hassas Yeganeh <soheil@...gle.com>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next v2 2/2] io_uring: ignore POLLIN for recvmsg on
 MSG_ERRQUEUE

On 8/21/20 8:13 PM, Luke Hsiao wrote:
> Hi Jens,
> 
> On Fri, Aug 21, 2020 at 7:09 PM Jens Axboe <axboe@...nel.dk> wrote:
>>
>> On 8/21/20 8:04 PM, Luke Hsiao wrote:
>>>
>> Sorry, one more minor thing to fix up:
>>
>>> @@ -4932,6 +4934,11 @@ static bool io_arm_poll_handler(struct io_kiocb *req)
>>>               mask |= POLLIN | POLLRDNORM;
>>>       if (def->pollout)
>>>               mask |= POLLOUT | POLLWRNORM;
>>> +
>>> +     /* If reading from MSG_ERRQUEUE using recvmsg, ignore POLLIN */
>>> +     if (req->opcode == IORING_OP_RECVMSG && (sqe->msg_flags & MSG_ERRQUEUE))
>>> +             mask &= ~POLLIN;
>>> +
>>
>> Don't pass in the sqe here, but use req->sr_msg.msg_flags for this check. This
>> is actually really important, as you don't want to re-read anything from the
>> sqe.
>>
>> I'm actually surprised this one got past Jann :-)
> 
> Got it, I will make the change and send v3. In Jann's defense, he
> reviewed the previous commit, but not this one :). Thanks for your
> detailed feedback.

Ah right you are, I guess it was the previous patch that had his
review! Thanks for taking care of this.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ