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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 6 Dec 2020 04:19:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Oleksandr Natalenko <oleksandr@...alenko.name>,
        bugzilla-daemon@...zilla.kernel.org
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        jdelvare@...e.de, wsa@...nel.org, benjamin.tissoires@...hat.com,
        rui.zhang@...el.com, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, Marc Zyngier <maz@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: genirq, i2c: Provide and use generic_dispatch_irq()

Hi Thomas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on tip/irq/core linux/master linus/master v5.10-rc6 next-20201204]
[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]

url:    https://github.com/0day-ci/linux/commits/Thomas-Gleixner/genirq-i2c-Provide-and-use-generic_dispatch_irq/20201206-023308
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: x86_64-randconfig-a016-20201206 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project fc7818f5d6906555cebad2c2e7c313a383b9cb82)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/79d4e8b739f9018dc2d95a25baf1199fbcf1fb03
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Thomas-Gleixner/genirq-i2c-Provide-and-use-generic_dispatch_irq/20201206-023308
        git checkout 79d4e8b739f9018dc2d95a25baf1199fbcf1fb03
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> kernel/irq/irqdesc.c:669:2: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (&flags) *' (aka 'unsigned long **')) [-Wcompare-distinct-pointer-types]
           local_irq_save(&flags);
           ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:225:36: note: expanded from macro 'local_irq_save'
   #define local_irq_save(flags)   do { raw_local_irq_save(flags); } while (0)
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:159:3: note: expanded from macro 'raw_local_irq_save'
                   typecheck(unsigned long, flags);        \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
           (void)(&__dummy == &__dummy2); \
                  ~~~~~~~~ ^  ~~~~~~~~~
   kernel/irq/irqdesc.c:669:2: error: expression is not assignable
           local_irq_save(&flags);
           ^              ~~~~~~
   include/linux/irqflags.h:225:36: note: expanded from macro 'local_irq_save'
   #define local_irq_save(flags)   do { raw_local_irq_save(flags); } while (0)
                                        ^                  ~~~~~
   include/linux/irqflags.h:160:9: note: expanded from macro 'raw_local_irq_save'
                   flags = arch_local_irq_save();          \
                   ~~~~~ ^
   kernel/irq/irqdesc.c:671:2: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (&flags) *' (aka 'unsigned long **')) [-Wcompare-distinct-pointer-types]
           local_irq_restore(&flags);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:226:39: note: expanded from macro 'local_irq_restore'
   #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/irqflags.h:164:3: note: expanded from macro 'raw_local_irq_restore'
                   typecheck(unsigned long, flags);        \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
           (void)(&__dummy == &__dummy2); \
                  ~~~~~~~~ ^  ~~~~~~~~~
>> kernel/irq/irqdesc.c:671:20: warning: incompatible pointer to integer conversion passing 'unsigned long *' to parameter of type 'unsigned long'; remove & [-Wint-conversion]
           local_irq_restore(&flags);
                             ^~~~~~
   include/linux/irqflags.h:226:61: note: expanded from macro 'local_irq_restore'
   #define local_irq_restore(flags) do { raw_local_irq_restore(flags); } while (0)
                                                               ^~~~~
   include/linux/irqflags.h:165:26: note: expanded from macro 'raw_local_irq_restore'
                   arch_local_irq_restore(flags);          \
                                          ^~~~~
   arch/x86/include/asm/irqflags.h:82:66: note: passing argument to parameter 'flags' here
   static __always_inline void arch_local_irq_restore(unsigned long flags)
                                                                    ^
   3 warnings and 1 error generated.

vim +669 kernel/irq/irqdesc.c

   654	
   655	/**
   656	 * generic_dispatch_irq - Dispatch an interrupt from an interrupt handler
   657	 * @irq:	The irq number to handle
   658	 *
   659	 * A wrapper around generic_handle_irq() which ensures that interrupts are
   660	 * disabled when the primary handler of the dispatched irq is invoked.
   661	 * This is useful for interrupt handlers with dispatching to be safe for
   662	 * the forced threaded case.
   663	 */
   664	int generic_dispatch_irq(unsigned int irq)
   665	{
   666		unsigned long flags;
   667		int ret;
   668	
 > 669		local_irq_save(&flags);
   670		ret = generic_handle_irq(irq);
 > 671		local_irq_restore(&flags);
   672		return ret;
   673	}
   674	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (37656 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ