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, 17 Sep 2020 22:24:27 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Mahesh Bandewar <maheshb@...gle.com>,
        Netdev <netdev@...r.kernel.org>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Mahesh Bandewar <mahesh@...dewar.net>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH next] net: fix build without CONFIG_SYSCTL definition

On 9/17/20 10:08 PM, Mahesh Bandewar wrote:
> Earlier commit 316cdaa1158a ("net: add option to not create fall-back
> tunnels in root-ns as well") removed the CONFIG_SYSCTL to enable the
> kernel-commandline to work. However, this variable gets defined only
> when CONFIG_SYSCTL option is selected.
> 
> With this change the behavior would default to creating fall-back
> tunnels in all namespaces when CONFIG_SYSCTL is not selected and
> the kernel commandline option will be ignored.
> 
> Fixes: 316cdaa1158a ("net: add option to not create fall-back tunnels in root-ns as well")
> Signed-off-by: Mahesh Bandewar <maheshb@...gle.com>
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: kernel test robot <lkp@...el.com>

Acked-by: Randy Dunlap <rdunlap@...radead.org> # build-tested

Thanks.


> ---
>  include/linux/netdevice.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 909b1fbb0481..fef0eb96cf69 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -634,8 +634,9 @@ extern int sysctl_devconf_inherit_init_net;
>   */
>  static inline bool net_has_fallback_tunnels(const struct net *net)
>  {
> -	return (net == &init_net && sysctl_fb_tunnels_only_for_init_net == 1) ||
> -	       !sysctl_fb_tunnels_only_for_init_net;
> +	return !IS_ENABLED(CONFIG_SYSCTL) ||
> +	       !sysctl_fb_tunnels_only_for_init_net ||
> +	       (net == &init_net && sysctl_fb_tunnels_only_for_init_net == 1);
>  }
>  
>  static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ