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: <ed0a3ac9-41eb-8826-9758-b1e7f1831e0e@kaspersky.com>
Date:   Wed, 30 Jun 2021 20:47:25 +0300
From:   Arseny Krasnov <arseny.krasnov@...persky.com>
To:     Stefano Garzarella <sgarzare@...hat.com>
CC:     Stefan Hajnoczi <stefanha@...hat.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Norbert Slusarek <nslusarek@....net>,
        Colin Ian King <colin.king@...onical.com>,
        Andra Paraschiv <andraprs@...zon.com>,
        kvm <kvm@...r.kernel.org>,
        Linux Virtualization <virtualization@...ts.linux-foundation.org>,
        netdev <netdev@...r.kernel.org>,
        kernel list <linux-kernel@...r.kernel.org>,
        Krasnov Arseniy <oxffffaa@...il.com>
Subject: Re: [MASSMAIL KLMS] Re: [RFC PATCH v1 05/16] af_vsock: use
 SOCK_STREAM function to check data


On 30.06.2021 15:10, Stefano Garzarella wrote:
> On Mon, Jun 28, 2021 at 01:02:47PM +0300, Arseny Krasnov wrote:
>> Also remove 'seqpacket_has_data' callback from transport.
>>
>> Signed-off-by: Arseny Krasnov <arseny.krasnov@...persky.com>
>> ---
>> include/net/af_vsock.h   |  1 -
>> net/vmw_vsock/af_vsock.c | 12 +-----------
>> 2 files changed, 1 insertion(+), 12 deletions(-)
> In order to avoid issues while bisecting the kernel, we should have
> commit that doesn't break the build or the runtime, so please take this
> in mind also for other commits.
>
> For example here we removed the seqpacket_has_data callbacks assignment
> before to remove where we use the callback, with a potential fault at
> runtime.
>
> I think you can simply put patches from 1 to 5 together in a single
> patch.
>
> In addition, we should move these changes after we don't need
> vsock_connectible_has_data() anymore, for example, where we replace the
> receive loop logic.
>
> Thanks,
> Stefano
Ack
>
>> diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
>> index ab207677e0a8..bf5ea1873e6f 100644
>> --- a/include/net/af_vsock.h
>> +++ b/include/net/af_vsock.h
>> @@ -141,7 +141,6 @@ struct vsock_transport {
>>       int (*seqpacket_enqueue)(struct vsock_sock *vsk, struct msghdr *msg,
>>                                size_t len);
>>       bool (*seqpacket_allow)(u32 remote_cid);
>> -      u32 (*seqpacket_has_data)(struct vsock_sock *vsk);
>>
>>       /* Notification. */
>>       int (*notify_poll_in)(struct vsock_sock *, size_t, bool *);
>> diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
>> index 21ccf450e249..59ce35da2e5b 100644
>> --- a/net/vmw_vsock/af_vsock.c
>> +++ b/net/vmw_vsock/af_vsock.c
>> @@ -860,16 +860,6 @@ s64 vsock_stream_has_data(struct vsock_sock *vsk)
>> }
>> EXPORT_SYMBOL_GPL(vsock_stream_has_data);
>>
>> -static s64 vsock_connectible_has_data(struct vsock_sock *vsk)
>> -{
>> -      struct sock *sk = sk_vsock(vsk);
>> -
>> -      if (sk->sk_type == SOCK_SEQPACKET)
>> -              return vsk->transport->seqpacket_has_data(vsk);
>> -      else
>> -              return vsock_stream_has_data(vsk);
>> -}
>> -
>> s64 vsock_stream_has_space(struct vsock_sock *vsk)
>> {
>>       return vsk->transport->stream_has_space(vsk);
>> @@ -1881,7 +1871,7 @@ static int vsock_connectible_wait_data(struct
>> sock *sk,
>>       err = 0;
>>       transport = vsk->transport;
>>
>> -      while ((data = vsock_connectible_has_data(vsk)) == 0) {
>> +      while ((data = vsock_stream_has_data(vsk)) == 0) {
>>               prepare_to_wait(sk_sleep(sk), wait, TASK_INTERRUPTIBLE);
>>
>>               if (sk->sk_err != 0 ||
>> -- 2.25.1
>>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ