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]
Message-ID: <DM6PR11MB278069E8594DF5ABFB0FA8ADCA7C9@DM6PR11MB2780.namprd11.prod.outlook.com>
Date:   Wed, 31 Mar 2021 12:59:15 +0000
From:   "Ong, Boon Leong" <boon.leong.ong@...el.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
CC:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        "David S . Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>,
        Jesper Dangaard Brouer <hawk@...nel.org>,
        "John Fastabend" <john.fastabend@...il.com>,
        Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for
 page_pool memory model

>> diff --git a/net/core/xdp.c b/net/core/xdp.c
>> index 05354976c1fc..4eaa28972af2 100644
>> --- a/net/core/xdp.c
>> +++ b/net/core/xdp.c
>> @@ -350,7 +350,8 @@ static void __xdp_return(void *data, struct
>xdp_mem_info *mem, bool napi_direct,
>>  		/* mem->id is valid, checked in
>xdp_rxq_info_reg_mem_model() */
>>  		xa = rhashtable_lookup(mem_id_ht, &mem->id,
>mem_id_rht_params);
>>  		page = virt_to_head_page(data);
>> -		napi_direct &= !xdp_return_frame_no_direct();
>> +		if (napi_direct)
>> +			napi_direct &= !xdp_return_frame_no_direct();
>
>if (napi_direct && xdp_return_frame_no_direct())
>	napi_direct = false;
>
>I wonder if this code would be easier to understand?
>
Ya, I think this is more readable. Thanks.   
I will send v2. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ