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>] [day] [month] [year] [list]
Message-ID: <202210221024.dkxD5cWA-lkp@intel.com>
Date:   Sat, 22 Oct 2022 10:35:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Manisha Chinthapally <manisha.chinthapally@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mchinth:sep_socwatch_linux_5_16 1/1]
 drivers/platform/x86/sepdk/sep/apic.c:88:27: error: implicit declaration of
 function 'read_apic_id'

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_16
head:   4cbfca15a262729ae8557758b49226fe4769f582
commit: 4cbfca15a262729ae8557758b49226fe4769f582 [1/1] Platform/x86 Updated SEP/SOCPERF drivers to latest version
config: i386-randconfig-a001
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/mchinth/linux/commit/4cbfca15a262729ae8557758b49226fe4769f582
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_16
        git checkout 4cbfca15a262729ae8557758b49226fe4769f582
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kernel/ arch/x86/mm/ drivers/platform/x86/sepdk/sep/

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

All error/warnings (new ones prefixed by >>):

   In file included from drivers/platform/x86/sepdk/inc/master.h:43,
                    from drivers/platform/x86/sepdk/sep/ipt.c:25:
   drivers/platform/x86/sepdk/sep/ipt.c: In function 'ipt_Allocate_Buffers':
>> drivers/platform/x86/sepdk/sep/ipt.c:325:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     325 |                                 (U64)(ipt_node_on_cpu(i).outbuf_virt_address) +
         |                                 ^
   drivers/platform/x86/sepdk/inc/linuxos.h:66:50: note: in definition of macro 'VIRT_TO_PHYS_ADDR'
      66 | #define VIRT_TO_PHYS_ADDR(va) ((U64)virt_to_phys(va))
         |                                                  ^~
>> drivers/platform/x86/sepdk/sep/ipt.c:323:77: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     323 |                                 .outbuf_phys_address[j] = VIRT_TO_PHYS_ADDR((
         |                                                                             ^
   drivers/platform/x86/sepdk/inc/linuxos.h:66:50: note: in definition of macro 'VIRT_TO_PHYS_ADDR'
      66 | #define VIRT_TO_PHYS_ADDR(va) ((U64)virt_to_phys(va))
         |                                                  ^~
   drivers/platform/x86/sepdk/sep/ipt.c: In function 'IPT_TOPA_Flush':
   drivers/platform/x86/sepdk/sep/ipt.c:465:13: warning: variable 'data_size' set but not used [-Wunused-but-set-variable]
     465 |         U64 data_size = 0;
         |             ^~~~~~~~~
--
   drivers/platform/x86/sepdk/sep/apic.c:57:6: warning: no previous prototype for 'apic_Get_APIC_ID' [-Wmissing-prototypes]
      57 | VOID apic_Get_APIC_ID(S32 cpu)
         |      ^~~~~~~~~~~~~~~~
   drivers/platform/x86/sepdk/sep/apic.c: In function 'apic_Get_APIC_ID':
>> drivers/platform/x86/sepdk/sep/apic.c:88:27: error: implicit declaration of function 'read_apic_id' [-Werror=implicit-function-declaration]
      88 |                 apic_id = read_apic_id();
         |                           ^~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/read_apic_id +88 drivers/platform/x86/sepdk/sep/apic.c

d605aabab41663 Jon Moeller          2018-11-13  47  
d605aabab41663 Jon Moeller          2018-11-13  48  /*!
d605aabab41663 Jon Moeller          2018-11-13  49   * @fn          VOID apic_Get_APIC_ID(S32 cpu)
d605aabab41663 Jon Moeller          2018-11-13  50   *
d605aabab41663 Jon Moeller          2018-11-13  51   * @brief       Obtain APIC ID
d605aabab41663 Jon Moeller          2018-11-13  52   *
d605aabab41663 Jon Moeller          2018-11-13  53   * @param       S32 cpuid - cpu index
d605aabab41663 Jon Moeller          2018-11-13  54   *
d605aabab41663 Jon Moeller          2018-11-13  55   * @return      U32 APIC ID
d605aabab41663 Jon Moeller          2018-11-13  56   */
4cbfca15a26272 Manisha Chinthapally 2022-02-02 @57  VOID apic_Get_APIC_ID(S32 cpu)
d605aabab41663 Jon Moeller          2018-11-13  58  {
d605aabab41663 Jon Moeller          2018-11-13  59  	U32 apic_id = 0;
d605aabab41663 Jon Moeller          2018-11-13  60  	CPU_STATE pcpu;
d605aabab41663 Jon Moeller          2018-11-13  61  
d605aabab41663 Jon Moeller          2018-11-13  62  	SEP_DRV_LOG_TRACE_IN("CPU: %d.", cpu);
d605aabab41663 Jon Moeller          2018-11-13  63  	pcpu = &pcb[cpu];
d605aabab41663 Jon Moeller          2018-11-13  64  
d605aabab41663 Jon Moeller          2018-11-13  65  #if defined(CONFIG_XEN_DOM0) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
d605aabab41663 Jon Moeller          2018-11-13  66  	if (xen_initial_domain()) {
d605aabab41663 Jon Moeller          2018-11-13  67  		S32 ret = 0;
d605aabab41663 Jon Moeller          2018-11-13  68  		struct xen_platform_op op = {
d605aabab41663 Jon Moeller          2018-11-13  69  			.cmd = XENPF_get_cpuinfo,
d605aabab41663 Jon Moeller          2018-11-13  70  			.interface_version = XENPF_INTERFACE_VERSION,
d605aabab41663 Jon Moeller          2018-11-13  71  			.u.pcpu_info.xen_cpuid = cpu,
d605aabab41663 Jon Moeller          2018-11-13  72  		};
d605aabab41663 Jon Moeller          2018-11-13  73  
d605aabab41663 Jon Moeller          2018-11-13  74  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
d605aabab41663 Jon Moeller          2018-11-13  75  		ret = HYPERVISOR_platform_op(&op);
d605aabab41663 Jon Moeller          2018-11-13  76  #else
d605aabab41663 Jon Moeller          2018-11-13  77  		ret = HYPERVISOR_dom0_op(&op);
d605aabab41663 Jon Moeller          2018-11-13  78  #endif
d605aabab41663 Jon Moeller          2018-11-13  79  		if (ret) {
d605aabab41663 Jon Moeller          2018-11-13  80  			SEP_DRV_LOG_ERROR(
4cbfca15a26272 Manisha Chinthapally 2022-02-02  81  				"apic_Get_APIC_ID: Error in reading APIC ID on Xen PV.");
d605aabab41663 Jon Moeller          2018-11-13  82  			apic_id = 0;
d605aabab41663 Jon Moeller          2018-11-13  83  		} else {
d605aabab41663 Jon Moeller          2018-11-13  84  			apic_id = op.u.pcpu_info.apic_id;
d605aabab41663 Jon Moeller          2018-11-13  85  		}
d605aabab41663 Jon Moeller          2018-11-13  86  	} else {
d605aabab41663 Jon Moeller          2018-11-13  87  #endif
d605aabab41663 Jon Moeller          2018-11-13 @88  		apic_id = read_apic_id();
d605aabab41663 Jon Moeller          2018-11-13  89  #if defined(CONFIG_XEN_DOM0) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)
d605aabab41663 Jon Moeller          2018-11-13  90  	}
d605aabab41663 Jon Moeller          2018-11-13  91  #endif
d605aabab41663 Jon Moeller          2018-11-13  92  
d605aabab41663 Jon Moeller          2018-11-13  93  	CPU_STATE_apic_id(pcpu) = apic_id;
d605aabab41663 Jon Moeller          2018-11-13  94  
d605aabab41663 Jon Moeller          2018-11-13  95  	SEP_DRV_LOG_TRACE_OUT("Apic_id[%d] is %d.", cpu,
d605aabab41663 Jon Moeller          2018-11-13  96  			      CPU_STATE_apic_id(pcpu));
d605aabab41663 Jon Moeller          2018-11-13  97  }
d605aabab41663 Jon Moeller          2018-11-13  98  

:::::: The code at line 88 was first introduced by commit
:::::: d605aabab41663c9be9e8c549042933189adbf2f platform/x86: add sep and socwatch drivers without socperf.

:::::: TO: Jon Moeller <jon.moeller@...el.com>
:::::: CC: Faycal Benmlih <faycal.benmlih@...el.com>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ