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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207150859.kU3p78eN-lkp@intel.com>
Date:   Fri, 15 Jul 2022 08:22:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Joel Fernandes (Google)" <joel@...lfernandes.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Ammar Faizi <ammarfaizi2@...weeb.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...nel.org>
Subject: [ammarfaizi2-block:paulmck/linux-rcu/joel.2022.07.14a 25/27]
 kernel/rcu/rcuscale.c:819:14: error: call to undeclared function
 'rcu_lazy_get_jiffies_till_flush'; ISO C99 and later do not support implicit
 function declarations

tree:   https://github.com/ammarfaizi2/linux-block paulmck/linux-rcu/joel.2022.07.14a
head:   37d0460c40e7e364151894260d483ade68b1de34
commit: 39e5f05326df757fa3be4617773fafb0454d9ec7 [25/27] rcuscale: Add laziness and kfree tests
config: hexagon-randconfig-r041-20220714 (https://download.01.org/0day-ci/archive/20220715/202207150859.kU3p78eN-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e61b9c556267086ef9b743a0b57df302eef831b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/39e5f05326df757fa3be4617773fafb0454d9ec7
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block paulmck/linux-rcu/joel.2022.07.14a
        git checkout 39e5f05326df757fa3be4617773fafb0454d9ec7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> kernel/rcu/rcuscale.c:819:14: error: call to undeclared function 'rcu_lazy_get_jiffies_till_flush'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   orig_jif = rcu_lazy_get_jiffies_till_flush();
                              ^
>> kernel/rcu/rcuscale.c:822:3: error: call to undeclared function 'rcu_lazy_set_jiffies_till_flush'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                   rcu_lazy_set_jiffies_till_flush(2 * HZ);
                   ^
   2 errors generated.


vim +/rcu_lazy_get_jiffies_till_flush +819 kernel/rcu/rcuscale.c

   796	
   797	static int __init
   798	kfree_scale_init(void)
   799	{
   800		long i;
   801		int firsterr = 0;
   802		unsigned long orig_jif, jif_start;
   803	
   804		// If lazy-rcu based kfree'ing is requested, then for kernels that
   805		// support it, force all call_rcu() to call_rcu_lazy() so that non-lazy
   806		// CBs do not remove laziness of the lazy ones (since the test tries to
   807		// stress call_rcu_lazy() for OOM).
   808		//
   809		// Also, do a quick self-test to ensure laziness is as much as
   810		// expected.
   811		if (kfree_rcu_by_lazy && !IS_ENABLED(CONFIG_RCU_LAZY)) {
   812			pr_alert("CONFIG_RCU_LAZY is disabled, falling back to kfree_rcu() "
   813				 "for delayed RCU kfree'ing\n");
   814			kfree_rcu_by_lazy = 0;
   815		}
   816	
   817		if (kfree_rcu_by_lazy) {
   818			/* do a test to check the timeout. */
 > 819			orig_jif = rcu_lazy_get_jiffies_till_flush();
   820	
   821			rcu_force_call_rcu_to_lazy(true);
 > 822			rcu_lazy_set_jiffies_till_flush(2 * HZ);
   823			rcu_barrier();
   824	
   825			jif_start = jiffies;
   826			jiffies_at_lazy_cb = 0;
   827			call_rcu_lazy(&lazy_test1_rh, call_rcu_lazy_test1);
   828	
   829			smp_cond_load_relaxed(&rcu_lazy_test1_cb_called, VAL == 1);
   830	
   831			rcu_lazy_set_jiffies_till_flush(orig_jif);
   832	
   833			if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) {
   834				pr_alert("ERROR: Lazy CBs are not being lazy as expected!\n");
   835				WARN_ON_ONCE(1);
   836				return -1;
   837			}
   838	
   839			if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start > 3 * HZ)) {
   840				pr_alert("ERROR: Lazy CBs are being too lazy!\n");
   841				WARN_ON_ONCE(1);
   842				return -1;
   843			}
   844		}
   845	
   846		kfree_nrealthreads = compute_real(kfree_nthreads);
   847		/* Start up the kthreads. */
   848		if (shutdown) {
   849			init_waitqueue_head(&shutdown_wq);
   850			firsterr = torture_create_kthread(kfree_scale_shutdown, NULL,
   851							  shutdown_task);
   852			if (torture_init_error(firsterr))
   853				goto unwind;
   854			schedule_timeout_uninterruptible(1);
   855		}
   856	
   857		pr_alert("kfree object size=%zu, kfree_rcu_by_lazy=%d\n",
   858				kfree_mult * sizeof(struct kfree_obj),
   859				kfree_rcu_by_lazy);
   860	
   861		kfree_reader_tasks = kcalloc(kfree_nrealthreads, sizeof(kfree_reader_tasks[0]),
   862				       GFP_KERNEL);
   863		if (kfree_reader_tasks == NULL) {
   864			firsterr = -ENOMEM;
   865			goto unwind;
   866		}
   867	
   868		for (i = 0; i < kfree_nrealthreads; i++) {
   869			firsterr = torture_create_kthread(kfree_scale_thread, (void *)i,
   870							  kfree_reader_tasks[i]);
   871			if (torture_init_error(firsterr))
   872				goto unwind;
   873		}
   874	
   875		while (atomic_read(&n_kfree_scale_thread_started) < kfree_nrealthreads)
   876			schedule_timeout_uninterruptible(1);
   877	
   878		torture_init_end();
   879		return 0;
   880	
   881	unwind:
   882		torture_init_end();
   883		kfree_scale_cleanup();
   884		return firsterr;
   885	}
   886	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ