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] [day] [month] [year] [list]
Date:   Sat, 25 Sep 2021 09:12:35 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     Mianhan Liu <liumh1@...nghaitech.edu.cn>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] net/ipv4/tcp_metrics.c: remove superfluous header
 files from tcp_metrics.c

On Sat, Sep 25, 2021 at 7:27 AM Mianhan Liu <liumh1@...nghaitech.edu.cn> wrote:
>
> tcp_metrics.c hasn't use any macro or function declared in rcupdate.h
> spinlock.h, module.h, cache.h, hash.h and vmalloc.h. Thus, these files
> can be removed from tcp_metrics.c safely without affecting the compilation
> of the net module.

This seems pretty much relying on other includes.
(eg #include <linux/tcp.h> brings many things already)

We do not generally do this.


>
> Signed-off-by: Mianhan Liu <liumh1@...nghaitech.edu.cn>
>
> ---
>  net/ipv4/tcp_metrics.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
> index 0588b004d..7b819530d 100644
> --- a/net/ipv4/tcp_metrics.c
> +++ b/net/ipv4/tcp_metrics.c
> @@ -1,15 +1,9 @@
>  // SPDX-License-Identifier: GPL-2.0
> -#include <linux/rcupdate.h>

We do use rcu stuff in this file.

> -#include <linux/spinlock.h>

We do use spinlocks in tcp_metrics.c

>  #include <linux/jiffies.h>
> -#include <linux/module.h>
> -#include <linux/cache.h>
>  #include <linux/slab.h>
>  #include <linux/init.h>
>  #include <linux/tcp.h>
> -#include <linux/hash.h>
>  #include <linux/tcp_metrics.h>
> -#include <linux/vmalloc.h>

Not sure why kvzalloc() is not in linux/vmalloc.h

Honestly I do not even know why we spend time trying to reduce list of includes.

Powered by blists - more mailing lists