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]
Date:   Mon, 01 May 2017 10:34:47 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     daniel@...earbox.net
Cc:     jakub.kicinski@...ronome.com, netdev@...r.kernel.org,
        johannes@...solutions.net, dsa@...ulusnetworks.com,
        alexei.starovoitov@...il.com, bblanco@...il.com,
        john.fastabend@...il.com, kubakici@...pl,
        oss-drivers@...ronome.com, brouer@...hat.com, jhs@...atatu.com
Subject: Re: [PATCH net-next 4/4] virtio_net: make use of extended ack
 message reporting

From: Daniel Borkmann <daniel@...earbox.net>
Date: Mon, 01 May 2017 12:50:55 +0200

> On 05/01/2017 06:46 AM, Jakub Kicinski wrote:
>> Try to carry error messages to the user via the netlink extended
>> ack message attribute.
>>
>> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> 
> [...]
>> @@ -1890,16 +1891,17 @@ static int virtnet_xdp_set(struct net_device
>> *dev, struct bpf_prog *prog)
>>   	    virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO6) ||
>>   	    virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_ECN) ||
>>   	    virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_UFO)) {
>> -		netdev_warn(dev, "can't set XDP while host is implementing LRO, disable
>> -		LRO first\n");
>> + NL_SET_ERR_MSG(extack, "can't set XDP while host is implementing
>> LRO, disable LRO first");
> 
> Should this be NL_MOD_TRY_SET_ERR_MSG() as well like in nfp case
> (otherwise the 'if (_extack)' check might be missing from the
> macro)?

I don't see a path in the doit callchain for setlink/newlink where the
extack pointer can be null.

I'm going to apply this series and we should either:

1) Guarantee the extack object is always available.

or

2) Make all macros including NL_SET_ERR_MSG() check the
   pointer.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ