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:   Thu, 2 Jul 2020 10:02:47 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Wei Yongjun <weiyongjun1@...wei.com>
Cc:     Hulk Robot <hulkci@...wei.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] scftorture: Make symbol 'scf_torture_rand' static

On Thu, Jul 02, 2020 at 10:47:00PM +0800, Wei Yongjun wrote:
> Fix sparse build warning:
> 
> kernel/scftorture.c:124:1: warning:
>  symbol '__pcpu_scope_scf_torture_rand' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>

Good catch, applied, thank you!

Due to recent changes, I hand-applied this as shown below.  Please
let me know if I messed anything up.

							Thanx, Paul

------------------------------------------------------------------------

commit ff9210137b0b8d8f045dd1fd116253ba7686e892
Author: Wei Yongjun <weiyongjun1@...wei.com>
Date:   Thu Jul 2 09:56:50 2020 -0700

    scftorture: Make symbol 'scf_torture_rand' static
    
    The sparse tool complains as follows
    
    kernel/scftorture.c:124:1: warning:
     symbol '__pcpu_scope_scf_torture_rand' was not declared. Should it be static?
    
    And this per-CPU variable is not used outside of scftorture.c,
    so this commit marks it static.
    
    Reported-by: Hulk Robot <hulkci@...wei.com>
    Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
    Signed-off-by: Paul E. McKenney <paulmck@...nel.org>

diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index 52f74f1..a7fea76 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -134,7 +134,7 @@ static atomic_t n_alloc_errs;
 static bool scfdone;
 static char *bangstr = "";
 
-DEFINE_TORTURE_RANDOM_PERCPU(scf_torture_rand);
+static DEFINE_TORTURE_RANDOM_PERCPU(scf_torture_rand);
 
 // Print torture statistics.  Caller must ensure serialization.
 static void scf_torture_stats_print(void)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ