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] [day] [month] [year] [list]
Message-ID: <202209020550.JEmUsnnl-lkp@intel.com>
Date:   Fri, 2 Sep 2022 05:52:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Csókás Bence <csokas.bence@...lan.hu>,
        netdev@...r.kernel.org
Cc:     kbuild-all@...ts.01.org,
        Richard Cochran <richardcochran@...il.com>,
        Jakub Kicinski <kuba@...nel.org>, qiangqing.zhang@....com,
        Andrew Lunn <andrew@...n.ch>, kernel@...gutronix.de,
        Csókás Bence <csokas.bence@...lan.hu>,
        Marc Kleine-Budde <mkl@...gutronix.de>
Subject: Re: [PATCH v2] net: fec: Use unlocked timecounter reads for saving
 state

Hi "Csókás,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net/master]
[also build test ERROR on net-next/master linus/master v6.0-rc3 next-20220901]
[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/Cs-k-s-Bence/net-fec-Use-unlocked-timecounter-reads-for-saving-state/20220830-191644
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git b05972f01e7d30419987a1f221b5593668fd6448
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220902/202209020550.JEmUsnnl-lkp@intel.com/config)
compiler: s390-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/1b907e75a5f827529bfe24d68038c69fac840901
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Cs-k-s-Bence/net-fec-Use-unlocked-timecounter-reads-for-saving-state/20220830-191644
        git checkout 1b907e75a5f827529bfe24d68038c69fac840901
        # 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=s390 SHELL=/bin/bash

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

   drivers/net/ethernet/freescale/fec_ptp.c: In function 'fec_ptp_save_state':
>> drivers/net/ethernet/freescale/fec_ptp.c:648:13: error: implicit declaration of function 'preempt_count_equals'; did you mean 'preempt_count_sub'? [-Werror=implicit-function-declaration]
     648 |         if (preempt_count_equals(0)) {
         |             ^~~~~~~~~~~~~~~~~~~~
         |             preempt_count_sub
   In file included from include/linux/bitops.h:7,
                    from include/linux/thread_info.h:27,
                    from arch/s390/include/asm/preempt.h:6,
                    from include/linux/preempt.h:78,
                    from arch/s390/include/asm/timex.h:13,
                    from include/linux/timex.h:67,
                    from include/linux/time32.h:13,
                    from include/linux/time.h:60,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13,
                    from drivers/net/ethernet/freescale/fec_ptp.c:10:
>> drivers/net/ethernet/freescale/fec_ptp.c:649:53: error: 'flags' undeclared (first use in this function)
     649 |                 spin_lock_irqsave(&fep->tmreg_lock, flags);
         |                                                     ^~~~~
   include/linux/typecheck.h:11:16: note: in definition of macro 'typecheck'
      11 |         typeof(x) __dummy2; \
         |                ^
   include/linux/spinlock.h:379:9: note: in expansion of macro 'raw_spin_lock_irqsave'
     379 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |         ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/freescale/fec_ptp.c:649:17: note: in expansion of macro 'spin_lock_irqsave'
     649 |                 spin_lock_irqsave(&fep->tmreg_lock, flags);
         |                 ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/freescale/fec_ptp.c:649:53: note: each undeclared identifier is reported only once for each function it appears in
     649 |                 spin_lock_irqsave(&fep->tmreg_lock, flags);
         |                                                     ^~~~~
   include/linux/typecheck.h:11:16: note: in definition of macro 'typecheck'
      11 |         typeof(x) __dummy2; \
         |                ^
   include/linux/spinlock.h:379:9: note: in expansion of macro 'raw_spin_lock_irqsave'
     379 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |         ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/freescale/fec_ptp.c:649:17: note: in expansion of macro 'spin_lock_irqsave'
     649 |                 spin_lock_irqsave(&fep->tmreg_lock, flags);
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/typecheck.h:12:25: warning: comparison of distinct pointer types lacks a cast
      12 |         (void)(&__dummy == &__dummy2); \
         |                         ^~
   include/linux/spinlock.h:241:17: note: in expansion of macro 'typecheck'
     241 |                 typecheck(unsigned long, flags);        \
         |                 ^~~~~~~~~
   include/linux/spinlock.h:379:9: note: in expansion of macro 'raw_spin_lock_irqsave'
     379 |         raw_spin_lock_irqsave(spinlock_check(lock), flags);     \
         |         ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/freescale/fec_ptp.c:649:17: note: in expansion of macro 'spin_lock_irqsave'
     649 |                 spin_lock_irqsave(&fep->tmreg_lock, flags);
         |                 ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +648 drivers/net/ethernet/freescale/fec_ptp.c

   643	
   644	void fec_ptp_save_state(struct fec_enet_private *fep)
   645	{
   646		u32 atime_inc_corr;
   647	
 > 648		if (preempt_count_equals(0)) {
 > 649			spin_lock_irqsave(&fep->tmreg_lock, flags);
   650			fep->ptp_saved_state.ns_phc = timecounter_read(&fep->tc);
   651			spin_unlock_irqrestore(&fep->tmreg_lock, flags);
   652		} else {
   653			fep->ptp_saved_state.ns_phc = timecounter_read(&fep->tc);
   654		}
   655		fep->ptp_saved_state.ns_sys = ktime_get_ns();
   656	
   657		fep->ptp_saved_state.at_corr = readl(fep->hwp + FEC_ATIME_CORR);
   658		atime_inc_corr = readl(fep->hwp + FEC_ATIME_INC) & FEC_T_INC_CORR_MASK;
   659		fep->ptp_saved_state.at_inc_corr = (u8)(atime_inc_corr >> FEC_T_INC_CORR_OFFSET);
   660	}
   661	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ