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: <YpQzd8BqidUc4IsT@Laptop-X1>
Date:   Mon, 30 May 2022 11:01:11 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     Jay Vosburgh <jay.vosburgh@...onical.com>
Cc:     Jonathan Toppins <jtoppins@...hat.com>, netdev@...r.kernel.org,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Paolo Abeni <pabeni@...hat.com>, Li Liang <liali@...hat.com>
Subject: Re: [PATCH net] bonding: show NS IPv6 targets in proc master info

On Fri, May 27, 2022 at 04:21:45PM -0700, Jay Vosburgh wrote:
> Jonathan Toppins <jtoppins@...hat.com> wrote:
> 
> >On 5/27/22 02:44, Hangbin Liu wrote:
> >> When adding bond new parameter ns_targets. I forgot to print this
> >> in bond master proc info. After updating, the bond master info will looks
> >                                                               look ---^
> >> like:
> >> ARP IP target/s (n.n.n.n form): 192.168.1.254
> >> NS IPv6 target/s (XX::XX form): 2022::1, 2022::2
> >> Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets")
> >> Reported-by: Li Liang <liali@...hat.com>
> >> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> >> ---
> >>   drivers/net/bonding/bond_procfs.c | 13 +++++++++++++
> >>   1 file changed, 13 insertions(+)
> >> diff --git a/drivers/net/bonding/bond_procfs.c
> >> b/drivers/net/bonding/bond_procfs.c
> >> index cfe37be42be4..b6c012270e2e 100644
> >> --- a/drivers/net/bonding/bond_procfs.c
> >> +++ b/drivers/net/bonding/bond_procfs.c
> >> @@ -129,6 +129,19 @@ static void bond_info_show_master(struct seq_file *seq)
> >>   			printed = 1;
> >>   		}
> >>   		seq_printf(seq, "\n");
> >
> >Does this need to be guarded by "#if IS_ENABLED(CONFIG_IPV6)"?
> 
> 	On looking at it, the definition of ns_targets in struct
> bond_params isn't gated by CONFIG_IPV6, either (and is 256 bytes for
> just ns_targets).
> 
> 	I suspect this will all compile even if CONFIG_IPV6 isn't
> enabled, since functions like ipv6_addr_any are defined regardless of
> the CONFIG_IPV6 setting, but it's dead code that shouldn't be built if
> CONFIG_IPV6 isn't set.

Yes, I didn't protect the code if if could be build without CONFIG_IPV6.
e.g. function bond_get_targets_ip6(). Do you think if I should also
add the condition for bond_get_targets_ip6() and ns_targets in struct
bond_params?

> 
> 	The options code for ns_targets depends on CONFIG_IPV6, so
> making this conditional as well would be consistent.

I will add the protection for this patch.

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ