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: <56ee282a-8591-8133-d82a-b54fcde69606@intel.com>
Date:   Sat, 30 Jun 2018 00:49:48 -0700
From:   "Nambiar, Amritha" <amritha.nambiar@...el.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, alexander.h.duyck@...el.com,
        willemdebruijn.kernel@...il.com, sridhar.samudrala@...el.com,
        alexander.duyck@...il.com, edumazet@...gle.com,
        hannes@...essinduktion.org, tom@...bertland.com, tom@...ntonium.net
Subject: Re: [net-next PATCH v5 3/7] net: sock: Change tx_queue_mapping in
 sock_common to unsigned short

On 6/29/2018 6:05 AM, David Miller wrote:
> From: Amritha Nambiar <amritha.nambiar@...el.com>
> Date: Wed, 27 Jun 2018 15:31:28 -0700
> 
>> @@ -1681,17 +1681,25 @@ static inline int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
>>  
>>  static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
>>  {
>> +	/* sk_tx_queue_mapping accept only upto a 16-bit value */
>> +	if (WARN_ON_ONCE((unsigned short)tx_queue > USHRT_MAX))
>> +		return;
>>  	sk->sk_tx_queue_mapping = tx_queue;
>>  }
>>  
>> +#define NO_QUEUE_MAPPING	USHRT_MAX
> 
> I think you need to check ">= USHRT_MAX" since USHRT_MAX is how you
> indicate no queue.
> 
Agree, I'll fix this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ