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: <0f311957-d645-422a-bf58-9aa3412b0bb4@stressinduktion.org>
Date:	Fri, 27 May 2016 18:56:08 +0200
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	YOSHIFUJI Hideaki <hideaki.yoshifuji@...aclelinux.com>,
	Alexander Aring <aar@...gutronix.de>,
	linux-wpan@...r.kernel.org
Cc:	kernel@...gutronix.de, marcel@...tmann.org,
	jukka.rissanen@...ux.intel.com, stefan@....samsung.com,
	mcr@...delman.ca, werner@...esberger.net,
	linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
	"David S . Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>
Subject: Re: [RFC 04/12] ndisc: get rid off dev parameter in
 ndisc_opt_addr_space

On 25.05.2016 07:15, YOSHIFUJI Hideaki wrote:
> 
> 
> Alexander Aring wrote:
>> This patch removes the net_device parameter from ndisc_opt_addr_space
>> function. This can be useful for calling such functionality which
>> doesn't depends on dev parameter. For current existing functionality
>> which depends on dev parameter, we introduce ndisc_dev_opt_addr_space to have
>> an easy replacement for the ndisc_opt_addr_space function.
>>
>> Cc: David S. Miller <davem@...emloft.net>
>> Cc: Alexey Kuznetsov <kuznet@....inr.ac.ru>
>> Cc: James Morris <jmorris@...ei.org>
>> Cc: Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
>> Cc: Patrick McHardy <kaber@...sh.net>
>> Signed-off-by: Alexander Aring <aar@...gutronix.de>
>> ---
>>  include/net/ndisc.h | 13 +++++++++----
>>  net/ipv6/ndisc.c    | 12 ++++++------
>>  2 files changed, 15 insertions(+), 10 deletions(-)
>>
>> diff --git a/include/net/ndisc.h b/include/net/ndisc.h
>> index 2d8edaa..dbc8d01 100644
>> --- a/include/net/ndisc.h
>> +++ b/include/net/ndisc.h
>> @@ -127,10 +127,15 @@ static inline int ndisc_addr_option_pad(unsigned short type)
>>  	}
>>  }
>>  
>> -static inline int ndisc_opt_addr_space(struct net_device *dev)
>> +static inline int ndisc_opt_addr_space(unsigned char addr_len, int pad)
>>  {
>> -	return NDISC_OPT_SPACE(dev->addr_len +
>> -			       ndisc_addr_option_pad(dev->type));
>> +	return NDISC_OPT_SPACE(addr_len + pad);
>> +}
>> +
>> +static inline int ndisc_dev_opt_addr_space(const struct net_device *dev)
>> +{
>> +	return ndisc_opt_addr_space(dev->addr_len,
>> +				    ndisc_addr_option_pad(dev->type));
>>  }
>>  
> 
> I prefer not to change existing functions such as ndisc_opt_addr_space(),
> and name new function __ndisc_opt_addr_space() etc.
> 
> Plus, my original thought (when I implement these functions) was to
> have per-net_device ndisc_opt_addr_spece(), ndisc_opt_adr_data() etc.
> 
> What do you think of that?

As I understood it 6lowpan devices need to handle both, non-compressed
and compressed options/addresses. Probably one can make them
per-interface, but a change to the arguments has still to happen.

Alex?

Thanks,
Hannes


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ