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] [day] [month] [year] [list]
Date:   Wed, 22 Sep 2021 02:21:21 +0000
From:   "liujian (CE)" <liujian56@...wei.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
CC:     John Fastabend <john.fastabend@...il.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Jakub Sitnicki <jakub@...udflare.com>,
        Lorenz Bauer <lmb@...udflare.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>
Subject: RE: [PATCH v2] skmsg: lose offset info in sk_psock_skb_ingress



> -----Original Message-----
> From: Cong Wang [mailto:xiyou.wangcong@...il.com]
> Sent: Monday, September 20, 2021 9:14 AM
> To: liujian (CE) <liujian56@...wei.com>
> Cc: John Fastabend <john.fastabend@...il.com>; Daniel Borkmann
> <daniel@...earbox.net>; Jakub Sitnicki <jakub@...udflare.com>; Lorenz
> Bauer <lmb@...udflare.com>; David Miller <davem@...emloft.net>; Jakub
> Kicinski <kuba@...nel.org>; Linux Kernel Network Developers
> <netdev@...r.kernel.org>; bpf <bpf@...r.kernel.org>
> Subject: Re: [PATCH v2] skmsg: lose offset info in sk_psock_skb_ingress
> 
> On Fri, Sep 17, 2021 at 3:05 AM Liu Jian <liujian56@...wei.com> wrote:
> > @@ -624,6 +635,13 @@ static void sk_psock_backlog(struct work_struct
> *work)
> >         while ((skb = skb_dequeue(&psock->ingress_skb))) {
> >                 len = skb->len;
> >                 off = 0;
> > +#if IS_ENABLED(CONFIG_BPF_STREAM_PARSER)
> > +               if (psock->sk->sk_data_ready == sk_psock_strp_data_ready) {
> > +                       stm = strp_msg(skb);
> > +                       off = stm->offset;
> > +                       len = stm->full_len;
> > +               }
> > +#endif
> 
> How does this work? You are testing psock->sk->sk_data_ready here but it is
> already the dest sock here, so, if we redirect a strp_msg() from strp socket to
> non-strp socket, this does not work at all?
> 
Yes, it is not work in this case, I did not consider this case.

> And this code looks ugly itself. If you want to distinguish this type of packet
> from others, you can add a bit in, for example skb->_sk_redir.
It looks better this way. 
I will send v3 later. Thank you~
> 
> Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ