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: <202210011045.APoTuAOJ-lkp@intel.com>
Date:   Sat, 1 Oct 2022 10:30:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ryan Huang <tzukui@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Sasha Levin <sashal@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Ryan Huang <tzukui@...gle.com>
Subject: Re: [PATCH] lockdep: Allow tuning tracing keys constant.

Hi Ryan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/locking/core]
[also build test ERROR on linus/master v6.0-rc7 next-20220930]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ryan-Huang/lockdep-Allow-tuning-tracing-keys-constant/20221001-010135
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 76e64c73db9542ff4bae8a60f4f32e38f3799b95
config: sparc64-randconfig-r032-20220926
compiler: sparc64-linux-gcc (GCC) 12.1.0
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/intel-lab-lkp/linux/commit/18319360c8d78bac9c5a672a09de186091d0fdc9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ryan-Huang/lockdep-Allow-tuning-tracing-keys-constant/20221001-010135
        git checkout 18319360c8d78bac9c5a672a09de186091d0fdc9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 prepare

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 >>):

   In file included from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/sparc/kernel/asm-offsets.c:14:
>> include/linux/lockdep.h:85:41: error: 'CONFIG_LOCKDEP_KEYS_BITS' undeclared here (not in a function); did you mean 'MAX_LOCKDEP_KEYS_BITS'?
      85 | #define MAX_LOCKDEP_KEYS_BITS           CONFIG_LOCKDEP_KEYS_BITS
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/lockdep.h:117:51: note: in expansion of macro 'MAX_LOCKDEP_KEYS_BITS'
     117 |         unsigned int                    class_idx:MAX_LOCKDEP_KEYS_BITS;
         |                                                   ^~~~~~~~~~~~~~~~~~~~~
>> include/linux/lockdep.h:117:41: error: bit-field 'class_idx' width not an integer constant
     117 |         unsigned int                    class_idx:MAX_LOCKDEP_KEYS_BITS;
         |                                         ^~~~~~~~~
   arch/sparc/kernel/asm-offsets.c:29:5: warning: no previous prototype for 'sparc64_foo' [-Wmissing-prototypes]
      29 | int sparc64_foo(void)
         |     ^~~~~~~~~~~
   arch/sparc/kernel/asm-offsets.c:48:5: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
      48 | int foo(void)
         |     ^~~
   make[2]: *** [scripts/Makefile.build:117: arch/sparc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1205: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:222: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +85 include/linux/lockdep.h

    84	
  > 85	#define MAX_LOCKDEP_KEYS_BITS		CONFIG_LOCKDEP_KEYS_BITS
    86	#define MAX_LOCKDEP_KEYS		(1UL << MAX_LOCKDEP_KEYS_BITS)
    87	#define INITIAL_CHAIN_KEY		-1
    88	
    89	struct held_lock {
    90		/*
    91		 * One-way hash of the dependency chain up to this point. We
    92		 * hash the hashes step by step as the dependency chain grows.
    93		 *
    94		 * We use it for dependency-caching and we skip detection
    95		 * passes and dependency-updates if there is a cache-hit, so
    96		 * it is absolutely critical for 100% coverage of the validator
    97		 * to have a unique key value for every unique dependency path
    98		 * that can occur in the system, to make a unique hash value
    99		 * as likely as possible - hence the 64-bit width.
   100		 *
   101		 * The task struct holds the current hash value (initialized
   102		 * with zero), here we store the previous hash value:
   103		 */
   104		u64				prev_chain_key;
   105		unsigned long			acquire_ip;
   106		struct lockdep_map		*instance;
   107		struct lockdep_map		*nest_lock;
   108	#ifdef CONFIG_LOCK_STAT
   109		u64 				waittime_stamp;
   110		u64				holdtime_stamp;
   111	#endif
   112		/*
   113		 * class_idx is zero-indexed; it points to the element in
   114		 * lock_classes this held lock instance belongs to. class_idx is in
   115		 * the range from 0 to (MAX_LOCKDEP_KEYS-1) inclusive.
   116		 */
 > 117		unsigned int			class_idx:MAX_LOCKDEP_KEYS_BITS;
   118		/*
   119		 * The lock-stack is unified in that the lock chains of interrupt
   120		 * contexts nest ontop of process context chains, but we 'separate'
   121		 * the hashes by starting with 0 if we cross into an interrupt
   122		 * context, and we also keep do not add cross-context lock
   123		 * dependencies - the lock usage graph walking covers that area
   124		 * anyway, and we'd just unnecessarily increase the number of
   125		 * dependencies otherwise. [Note: hardirq and softirq contexts
   126		 * are separated from each other too.]
   127		 *
   128		 * The following field is used to detect when we cross into an
   129		 * interrupt context:
   130		 */
   131		unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */
   132		unsigned int trylock:1;						/* 16 bits */
   133	
   134		unsigned int read:2;        /* see lock_acquire() comment */
   135		unsigned int check:1;       /* see lock_acquire() comment */
   136		unsigned int hardirqs_off:1;
   137		unsigned int references:12;					/* 32 bits */
   138		unsigned int pin_count;
   139	};
   140	

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

View attachment "config" of type "text/plain" (142108 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ