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:   Thu, 22 Nov 2018 07:21:05 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Pablo Neira Ayuso <pablo@...filter.org>, netdev@...r.kernel.org,
        davem@...emloft.net, thomas.lendacky@....com,
        ariel.elior@...ium.com, michael.chan@...adcom.com,
        santosh@...lsio.com, madalin.bucur@....com,
        yisen.zhuang@...wei.com, salil.mehta@...wei.com,
        jeffrey.t.kirsher@...el.com, tariqt@...lanox.com,
        saeedm@...lanox.com, jiri@...lanox.com, idosch@...lanox.com,
        jakub.kicinski@...ronome.com, peppe.cavallaro@...com,
        grygorii.strashko@...com, andrew@...n.ch,
        vivien.didelot@...oirfairelinux.com, alexandre.torgue@...com,
        joabreu@...opsys.com, linux-net-drivers@...arflare.com,
        ganeshgr@...lsio.com, ogerlitz@...lanox.com,
        Manish.Chopra@...ium.com
Subject: Re: [PATCH net-next,v3 09/12] flow_dissector: add basic
 ethtool_rx_flow_spec to flow_rule structure translator

Thu, Nov 22, 2018 at 05:59:27AM CET, f.fainelli@...il.com wrote:
>
>
>On 11/20/2018 6:51 PM, Pablo Neira Ayuso wrote:
>> This patch adds a function to translate the ethtool_rx_flow_spec
>> structure to the flow_rule representation.
>> 
>> This allows us to reuse code from the driver side given that both flower
>> and ethtool_rx_flow interfaces use the same representation.
>> 
>> Signed-off-by: Pablo Neira Ayuso <pablo@...filter.org>
>> ---
>> v3: Suggested by Jiri Pirko:
>>         - Add struct ethtool_rx_flow_rule, keep placeholder to private
>>           dissector information.
>>     Reported by Manish Chopra:
>> 	- Fix incorrect dissector user_keys flags.
>> 
>>  include/linux/ethtool.h |  10 +++
>>  net/core/ethtool.c      | 189 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 199 insertions(+)
>> 
>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>> index afd9596ce636..99849e0858b2 100644
>> --- a/include/linux/ethtool.h
>> +++ b/include/linux/ethtool.h
>> @@ -400,4 +400,14 @@ struct ethtool_ops {
>>  	void	(*get_ethtool_phy_stats)(struct net_device *,
>>  					 struct ethtool_stats *, u64 *);
>>  };
>> +
>> +struct ethtool_rx_flow_rule {
>> +	struct flow_rule	*rule;
>> +	unsigned long		priv[0];
>
>This forces you to cast to/from that member, any reason this is just not
>a void *priv here?

The reason is single alloc call for rule and its priv. Quite usual along
the code.


>-- 
>Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ