On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen dave.hansen@linux.intel.com wrote:
On 12/06/2017 07:03 AM, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 3:15 PM, Arnd Bergmann arnd@arndb.de wrote:
This changes the type to u64 in the architecture-independent dummy, and to pteval_t in the x86 specific portion that is used when KAISER is enabled, ensuring that the flags can always fit. Unfortunately, pteval_t is not provided by most other architectures, so we are a little bit inconsistent here.
I ran into a new regression with my patch applied, after doing more randconfig builds:
In file included from /git/arm-soc/include/linux/kaiser.h:5, from /git/arm-soc/arch/x86/events/intel/ds.c:4: arch/x86/include/asm/kaiser.h:34:10: error: unknown type name 'pteval_t'; did you mean 'dev_t'?
Maybe it's better to just to the last one-line change in include/linux/kaiser.h.
Hi Arnd,
Are you hitting this in -next?
The newest version of this code has a single kpti_init() function that shouldn't have any of these problems.
Coming back to an old thread...
I did some randconfig testing on 4.9.80, and now I see the same problem there, since that version uses the KAISER patches rather than PTI:
/git/arm-soc/arch/x86/kernel/ldt.c: In function 'alloc_ldt_struct': /git/arm-soc/arch/x86/include/asm/pgtable_types.h:208:24: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) ^ /git/arm-soc/arch/x86/kernel/ldt.c:81:6: note: in expansion of macro '__PAGE_KERNEL' __PAGE_KERNEL); ^~~~~~~~~~~~~
I also saw another warning:
/git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': /git/arm-soc/arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'?
I can send this as proper patches for inclusion in 4.9-stable, unless someone has a better idea or finds a problem
Signed-off-by: Arnd Bergmann arnd@arndb.de
diff --git a/include/linux/kaiser.h b/include/linux/kaiser.h index 58c55b1589d0..b56c19010480 100644 --- a/include/linux/kaiser.h +++ b/include/linux/kaiser.h @@ -32,7 +32,7 @@ static inline void kaiser_init(void) { } static inline int kaiser_add_mapping(unsigned long addr, - unsigned long size, unsigned long flags) + unsigned long size, u64 flags) { return 0; } --- a/arch/x86/include/asm/vsyscall.h +++ b/arch/x86/include/asm/vsyscall.h @@ -13,7 +13,6 @@ extern void map_vsyscall(void); */ extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address); extern bool vsyscall_enabled(void); -extern unsigned long vsyscall_pgprot; #else static inline void map_vsyscall(void) {} static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) @@ -23,4 +22,6 @@ static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) static inline bool vsyscall_enabled(void) { return false; } #endif
+extern unsigned long vsyscall_pgprot; + #endif /* _ASM_X86_VSYSCALL_H */
Arnd
On Wed, Feb 14, 2018 at 11:12:24PM +0100, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen dave.hansen@linux.intel.com wrote:
On 12/06/2017 07:03 AM, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 3:15 PM, Arnd Bergmann arnd@arndb.de wrote:
This changes the type to u64 in the architecture-independent dummy, and to pteval_t in the x86 specific portion that is used when KAISER is enabled, ensuring that the flags can always fit. Unfortunately, pteval_t is not provided by most other architectures, so we are a little bit inconsistent here.
I ran into a new regression with my patch applied, after doing more randconfig builds:
In file included from /git/arm-soc/include/linux/kaiser.h:5, from /git/arm-soc/arch/x86/events/intel/ds.c:4: arch/x86/include/asm/kaiser.h:34:10: error: unknown type name 'pteval_t'; did you mean 'dev_t'?
Maybe it's better to just to the last one-line change in include/linux/kaiser.h.
Hi Arnd,
Are you hitting this in -next?
The newest version of this code has a single kpti_init() function that shouldn't have any of these problems.
Coming back to an old thread...
I did some randconfig testing on 4.9.80, and now I see the same problem there, since that version uses the KAISER patches rather than PTI:
/git/arm-soc/arch/x86/kernel/ldt.c: In function 'alloc_ldt_struct': /git/arm-soc/arch/x86/include/asm/pgtable_types.h:208:24: error: large integer implicitly truncated to unsigned type [-Werror=overflow] #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) ^ /git/arm-soc/arch/x86/kernel/ldt.c:81:6: note: in expansion of macro '__PAGE_KERNEL' __PAGE_KERNEL); ^~~~~~~~~~~~~
I also saw another warning:
/git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': /git/arm-soc/arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'?
I can send this as proper patches for inclusion in 4.9-stable, unless someone has a better idea or finds a problem
proper patches would be good :)
thanks,
greg k-h
On Thu, Feb 15, 2018 at 6:43 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Feb 14, 2018 at 11:12:24PM +0100, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen dave.hansen@linux.intel.com wrote:
I also saw another warning:
/git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': /git/arm-soc/arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'?
I can send this as proper patches for inclusion in 4.9-stable, unless someone has a better idea or finds a problem
proper patches would be good :)
Sent two patches now. I want to make sure I haven't missed anything there, especially as my first approach at fixing it ended up causing other build failures.
In order to test this, I backported some 35 other (mostly trivial) patches later kernels, and now I have a 4.9.80 based tree that produces a clean randconfig build every time on arm64 and x86_64. If you want, I'll send you the list of the required backports as well. From what I can tell, they are all harmless (unused functions, missing Kconfig dependencies etc), but being able to do randconfig builds reliable gives us an additional tool for regression testing the stable kernels.
For 4.14-stable, we only need a handful of patches, but only one of those is upstream, I'll try my best to get the others merged with a Cc stable tag so 4.14 randconfig should build cleanly soon.
I suspect 4.4 would require even more patches, but I have not looked.
Arnd
On Thu, Feb 15, 2018 at 04:37:10PM +0100, Arnd Bergmann wrote:
On Thu, Feb 15, 2018 at 6:43 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Feb 14, 2018 at 11:12:24PM +0100, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen dave.hansen@linux.intel.com wrote:
I also saw another warning:
/git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': /git/arm-soc/arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'?
I can send this as proper patches for inclusion in 4.9-stable, unless someone has a better idea or finds a problem
proper patches would be good :)
Sent two patches now. I want to make sure I haven't missed anything there, especially as my first approach at fixing it ended up causing other build failures.
In order to test this, I backported some 35 other (mostly trivial) patches later kernels, and now I have a 4.9.80 based tree that produces a clean randconfig build every time on arm64 and x86_64. If you want, I'll send you the list of the required backports as well. From what I can tell, they are all harmless (unused functions, missing Kconfig dependencies etc), but being able to do randconfig builds reliable gives us an additional tool for regression testing the stable kernels.
Sure, I'll be glad to take those.
For 4.14-stable, we only need a handful of patches, but only one of those is upstream, I'll try my best to get the others merged with a Cc stable tag so 4.14 randconfig should build cleanly soon.
Again, I'll be glad to take them as well.
I suspect 4.4 would require even more patches, but I have not looked.
If the above doesn't clean up 4.4 as well, that would be surprising :)
Anyway, 4.4 might be nice to have "clean" if possible, and it's not too much trouble.
thanks,
greg k-h
On Thu, Feb 15, 2018 at 5:43 PM, Greg KH gregkh@linuxfoundation.org wrote:
On Thu, Feb 15, 2018 at 04:37:10PM +0100, Arnd Bergmann wrote:
On Thu, Feb 15, 2018 at 6:43 AM, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Feb 14, 2018 at 11:12:24PM +0100, Arnd Bergmann wrote:
On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen dave.hansen@linux.intel.com wrote:
I also saw another warning:
/git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': /git/arm-soc/arch/x86/mm/kaiser.c:347:8: error: 'vsyscall_pgprot' undeclared (first use in this function); did you mean 'massage_pgprot'?
I can send this as proper patches for inclusion in 4.9-stable, unless someone has a better idea or finds a problem
proper patches would be good :)
Sent two patches now. I want to make sure I haven't missed anything there, especially as my first approach at fixing it ended up causing other build failures.
In order to test this, I backported some 35 other (mostly trivial) patches later kernels, and now I have a 4.9.80 based tree that produces a clean randconfig build every time on arm64 and x86_64. If you want, I'll send you the list of the required backports as well. From what I can tell, they are all harmless (unused functions, missing Kconfig dependencies etc), but being able to do randconfig builds reliable gives us an additional tool for regression testing the stable kernels.
Sure, I'll be glad to take those.
Here are the ones that I think should apply cleanly
ac29fc66855b drm/i915: fix intel_backlight_device_register declaration 23f919d4ad0e shmem: avoid maybe-uninitialized warning aa01338c0184 clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER fbdf0e28d061 vmxnet3: prevent building with 64K pages 11d8b05855f3 perf/x86: Shut up false-positive -Wmaybe-uninitialized warning 42db500a551f PCI: vmd: Fix suspend handlers defined-but-not-used warning fbc2a294f29e gpio: intel-mid: Fix build warning when !CONFIG_PM b4aca383f9af platform/x86: intel_mid_thermal: Fix suspend handlers unused warning c8bd2ac3b4c6 usb: musb: fix compilation warning on unused function de5bbdd01cf9 PCI: Change pci_host_common_probe() visibility c0bfc549e962 perf: xgene: Include module.h 484c7bbf2649 video: fbdev: via: remove possibly unused variables 067fdeb2f391 dmaengine: zx: fix build warning f46e7cd36b5f scsi: advansys: fix build warning for PCI=n d4b2ac63b0ea x86/ras/inject: Make it depend on X86_LOCAL_APIC=y b115bebc07f2 gpio: xgene: mark PM functions as __maybe_unused f13d52cb3fad arm64: define BUG() instruction without CONFIG_BUG 75e2f0a6b161 x86/fpu/math-emu: Fix possible uninitialized variable use e572d0887137 tools build: Add tools tree support for 'make -s' d460131dd505 x86/build: Silence the build with "make -s" 68fd77cf8a4b thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies c2ce3f5d89d5 x86: add MULTIUSER dependency for KVM d689c64d189e x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG 3ba5b5ea7dc3 x86/vm86: Fix unused variable warning if THP is disabled 44a5b977128c scsi: advansys: fix uninitialized data access 2e449048a25e arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set 46a049dae771 ALSA: hda/ca0132 - fix possible NULL pointer use ab4949640d66 reiserfs: avoid a -Wmaybe-uninitialized warning
For the rest, some need context changes, and some need a new patch as the patch that avoided the warning or error in later kernels is not a backportable fix (e.g. driver removed).
I suspect 4.4 would require even more patches, but I have not looked.
If the above doesn't clean up 4.4 as well, that would be surprising :)
Anyway, 4.4 might be nice to have "clean" if possible, and it's not too much trouble.
I think it was before 4.9 that I started doing randconfig testing on x86 and arm64, so I would expect some additional backports mostly. I used to do randconfig testing for arm32 only, as that caught the most bugs from arm-soc. However, there is still a large number of issues for arm32 that require non-upstream workarounds, mostly for the more esoteric configurations that other architectures don't have.
Arnd
On Thu, Feb 15, 2018 at 10:00 PM, Arnd Bergmann arnd@arndb.de wrote:
On Thu, Feb 15, 2018 at 5:43 PM, Greg KH gregkh@linuxfoundation.org wrote:
On Thu, Feb 15, 2018 at 04:37:10PM +0100, Arnd Bergmann wrote:
In order to test this, I backported some 35 other (mostly trivial) patches later kernels, and now I have a 4.9.80 based tree that produces a clean randconfig build every time on arm64 and x86_64. If you want, I'll send you the list of the required backports as well. From what I can tell, they are all harmless (unused functions, missing Kconfig dependencies etc), but being able to do randconfig builds reliable gives us an additional tool for regression testing the stable kernels.
Sure, I'll be glad to take those.
Here are the ones that I think should apply cleanly
ac29fc66855b drm/i915: fix intel_backlight_device_register declaration 23f919d4ad0e shmem: avoid maybe-uninitialized warning aa01338c0184 clk: sunxi-ng: fix build error without CONFIG_RESET_CONTROLLER fbdf0e28d061 vmxnet3: prevent building with 64K pages 11d8b05855f3 perf/x86: Shut up false-positive -Wmaybe-uninitialized warning 42db500a551f PCI: vmd: Fix suspend handlers defined-but-not-used warning fbc2a294f29e gpio: intel-mid: Fix build warning when !CONFIG_PM b4aca383f9af platform/x86: intel_mid_thermal: Fix suspend handlers unused warning c8bd2ac3b4c6 usb: musb: fix compilation warning on unused function de5bbdd01cf9 PCI: Change pci_host_common_probe() visibility c0bfc549e962 perf: xgene: Include module.h 484c7bbf2649 video: fbdev: via: remove possibly unused variables 067fdeb2f391 dmaengine: zx: fix build warning f46e7cd36b5f scsi: advansys: fix build warning for PCI=n d4b2ac63b0ea x86/ras/inject: Make it depend on X86_LOCAL_APIC=y b115bebc07f2 gpio: xgene: mark PM functions as __maybe_unused f13d52cb3fad arm64: define BUG() instruction without CONFIG_BUG 75e2f0a6b161 x86/fpu/math-emu: Fix possible uninitialized variable use e572d0887137 tools build: Add tools tree support for 'make -s' d460131dd505 x86/build: Silence the build with "make -s" 68fd77cf8a4b thermal: fix INTEL_SOC_DTS_IOSF_CORE dependencies c2ce3f5d89d5 x86: add MULTIUSER dependency for KVM d689c64d189e x86/platform: Add PCI dependency for PUNIT_ATOM_DEBUG 3ba5b5ea7dc3 x86/vm86: Fix unused variable warning if THP is disabled 44a5b977128c scsi: advansys: fix uninitialized data access 2e449048a25e arm64: Kconfig: select COMPAT_BINFMT_ELF only when BINFMT_ELF is set 46a049dae771 ALSA: hda/ca0132 - fix possible NULL pointer use ab4949640d66 reiserfs: avoid a -Wmaybe-uninitialized warning
and some more:
7fc1503c906f cw1200: fix bogus maybe-uninitialized warning 3cd18d198173 security/keys: BIG_KEY requires CONFIG_CRYPTO 7e1751001818 drm: exynos: mark pm functions as __maybe_unused 9e343e87d2c4 mtd: cfi: convert inline functions to macros 3cd890dbe2a4 media: dvb-frontends: fix i2c access helpers for KASAN d4c2269b3d5d rbd: silence bogus -Wmaybe-uninitialized warning b74c0a9969f2 drm/nouveau: hide gcc-4.9 -Wmaybe-uninitialized ea4348c8462a Input: tca8418_keypad - hide gcc-4.9 -Wmaybe-uninitialized warning 16c3ada89cff media: r820t: fix r820t_write_reg for KASAN e42eef4ba388 KVM: add X86_LOCAL_APIC dependency f1f5929cd971 shmem: fix compilation warnings on unused functions 3538aa6ecfb2 [media] tc358743: fix register i2c_rd/wr functions fa6317eedd63 [media] go7007: add MEDIA_CAMERA_SUPPORT dependency 190b23b4eb99 [media] em28xx: only use mt9v011 if camera support is enabled 27430d19a916 [media] tw5864: use dev_warn instead of WARN to shut up warning 27d807180ae0 ISDN: eicon: reduce stack size of sig_ind function dbed87a9d3a8 clk: meson: gxbb: fix build error without RESET_CONTROLLER
There are a few more that that don't apply cleanly or that I had to write from scratch, I'll follow up with a patch series to stable@v.k.o.
Arnd
linux-stable-mirror@lists.linaro.org