Content-Type: multipart/mixed; boundary="===============3477356472093485278==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH -next] x86/efi_64: fix a user-memory-access in runtime Date: Tue, 28 Jan 2020 07:29:52 +0800 Message-ID: <202001280700.tCtD1cvl%lkp@intel.com> In-Reply-To: <20200118063022.21743-1-cai@lca.pw> List-Id: --===============3477356472093485278== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Qian, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20200117] [cannot apply to efi/next v5.5] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/Qian-Cai/x86-efi_64-fix-a-= user-memory-access-in-runtime/20200118-171142 base: de970dffa7d19eae1d703c3534825308ef8d5dec reproduce: # apt-get install sparse # sparse version: v0.6.1-153-g47b6dfef-dirty make ARCH=3Dx86_64 allmodconfig make C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> arch/x86/platform/efi/efi_64.c:1045:48: sparse: sparse: incorrect type i= n argument 2 (different address spaces) >> arch/x86/platform/efi/efi_64.c:1045:48: sparse: expected void const [= noderef] *from >> arch/x86/platform/efi/efi_64.c:1045:48: sparse: got union efi_runtime= _services_t [usertype] *[usertype] runtime vim +1045 arch/x86/platform/efi/efi_64.c 1020 = 1021 efi_status_t __init efi_set_virtual_address_map(unsigned long memory= _map_size, 1022 unsigned long descriptor_size, 1023 u32 descriptor_version, 1024 efi_memory_desc_t *virtual_map) 1025 { 1026 efi_runtime_services_t runtime; 1027 efi_status_t status; 1028 unsigned long flags; 1029 pgd_t *save_pgd =3D NULL; 1030 = 1031 if (efi_is_mixed()) 1032 return efi_thunk_set_virtual_address_map(memory_map_size, 1033 descriptor_size, 1034 descriptor_version, 1035 virtual_map); 1036 = 1037 if (efi_enabled(EFI_OLD_MEMMAP)) { 1038 save_pgd =3D efi_old_memmap_phys_prolog(); 1039 if (!save_pgd) 1040 return EFI_ABORTED; 1041 } else { 1042 efi_switch_mm(&efi_mm); 1043 } 1044 = > 1045 if (copy_from_user(&runtime, efi.systab->runtime, sizeof(runtime))) --- 0-DAY kernel test infrastructure Open Source Technology Cen= ter https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corpor= ation --===============3477356472093485278==--