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  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]
Date:   Fri, 21 Aug 2020 19:13:20 -0700
From:   Luke Hsiao <lukehsiao@...gle.com>
To:     Jens Axboe <axboe@...nel.dk>
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

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.

--
Luke

Powered by blists - more mailing lists