Kconfig symbol clean-up on ./arch/x86/
Subsystems (4)
cover Kconfig symbol clean-up on ./arch/x86/
Dear x86 maintainers,
Randy Dunlap pointed out that ./scripts/checkkconfigsymbols.py warns on invalid references to Kconfig symbols (often, minor typos, name confusions or outdated references): see Link below.
This is a first patch series addressing the issues reported by ./scripts/checkkconfigsymbols.py in the ./arch/x86/ directories, quickly filtered down with:
./scripts/checkkconfigsymbols.py | grep "arch/x86" -B 1 -A 2
It addresses some issues I considered to be "true positives"; so, issues that should be addressed and cleaned up.
The patches on updating the comments might arguably be considered of low value by itself, but as the other patches show, checkkconfigsymbols does detect some relevant issues in the kernel tree otherwise being unnoticed. So, it might be worth to clean up the kernel tree to have checkkconfigsymbols produce a rather short list of issues and then continuously follow and check what checkkconfigsymbols reports.
Some work from checkkconfigsymbols on arch/x86 is deferred:
- OSNOISE_TRAECR typo in arch/x86/kernel/trace.c
This will added to a separate janitor cleanup series with other topics on this file.
- a reference to STRICT_IOMEM in arch/x86/mm/init.c unclear to me: which exact config this refers to
- Given some updates of the minimal version for binutils (now >= 2.23), the whole special detection of binutils support for CONFIG_X86_X32 and its speciality with CONFIG_X86_X32_ABI might be unneeded. I might look into that in a separate task.
The remaining issues that checkkconfigsymbols reports are (as far as I understand it now) "false positives" (the tool misinterprets the actual content) or "intentional", e.g., they refer to historic configs for the purpose of documentation (e.g., in changelogs) or are in various kernel configs that are not continuously updated to match the current set of kernel configs.
Please pick this series of minor clean-up patches on ./arch/x86/.
It applies cleanly on next-20210802.
Best regards,
Lukas
Lukas Bulwahn (9):
x86/entry: correct reference to intended CONFIG_64_BIT x86, olpc: correct condition to intended CONFIG_OLPC_XO15_SCI x86/Kconfig: correct reference to MWINCHIP3D
x86/Kconfig: remove reference to obsolete MFD_INTEL_MSIC config x86/Kconfig: remove reference to obsolete APB_TIMER config x86/irq: fix slightly wrong reference in comment x86/uaccess: adjust comment for endif of CONFIG_CC_HAS_ASM_GOTO_OUTPUT
x86: page_32.h: adjust comment for endif of CONFIG_X86_USE_3DNOW
x86: ia32.h: adjust comment for endif of CONFIG_IA32_EMULATION
arch/x86/Kconfig | 4 +--- arch/x86/include/asm/entry-common.h | 2 +- arch/x86/include/asm/ia32.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/page_32.h | 2 +- arch/x86/include/asm/uaccess.h | 2 +- arch/x86/platform/olpc/olpc.c | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/9 x86/entry: correct reference to intended CONFIG_64_BIT
Commit 662a0221893a ("x86/entry: Fix AC assertion") adds a condition with IS_ENABLED(CONFIG_64_BIT), but the intended config is called CONFIG_64BIT, as defined in ./arch/x86/Kconfig.
Fortunately, ./scripts/checkkconfigsymbols.py warns:
64_BIT
Referencing files: arch/x86/include/asm/entry-common.h
Correct the reference to the intended config symbol.
--- arch/x86/include/asm/entry-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/entry-common.h +1 -1
@@ -25,7 +25,7 @@ static __always_inline void arch_check_user_regs(struct pt_regs *regs)* For !SMAP hardware we patch out CLAC on entry. */ if (boot_cpu_has (X86_FEATURE_SMAP ) || - (IS_ENABLED (CONFIG_64_BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) + (IS_ENABLED (CONFIG_64BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) mask |=X86_EFLAGS_AC ;WARN_ON_ONCE (flags & mask);
Signature · 1 line
2.17.1
[tip: x86/urgent] x86/entry: Correct reference to intended CONFIG_64_BIT
The following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: b2c238397b8f737590a7f1b4e8f9dbbd5043e340 Gitweb: https://git.kernel.org/tip/b2c238397b8f737590a7f1b4e8f9dbbd5043e340 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:23 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Tue, 05 Oct 2021 11:10:21 +02:00
x86/entry: Correct reference to intended CONFIG_64_BIT
Commit in Fixes adds a condition with IS_ENABLED(CONFIG_64_BIT), but the intended config item is called CONFIG_64BIT, as defined in arch/x86/Kconfig.
Fortunately, scripts/checkkconfigsymbols.py warns:
64_BIT
Referencing files: arch/x86/include/asm/entry-common.h
Correct the reference to the intended config symbol.
--- arch/x86/include/asm/entry-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/entry-common.h +1 -1
@@ -25,7 +25,7 @@ static __always_inline void arch_check_user_regs(struct pt_regs *regs)* For !SMAP hardware we patch out CLAC on entry. */ if (boot_cpu_has (X86_FEATURE_SMAP ) || - (IS_ENABLED (CONFIG_64_BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) + (IS_ENABLED (CONFIG_64BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) mask |=X86_EFLAGS_AC ;WARN_ON_ONCE (flags & mask);
[tip: x86/urgent] x86/entry: Correct reference to intended CONFIG_64_BIT
In reply to Lukas BulwahnThe following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 2c861f2b859385e9eaa6e464a8a7435b5a6bf564 Gitweb: https://git.kernel.org/tip/2c861f2b859385e9eaa6e464a8a7435b5a6bf564 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:23 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 06 Oct 2021 18:46:02 +02:00
x86/entry: Correct reference to intended CONFIG_64_BIT
Commit in Fixes adds a condition with IS_ENABLED(CONFIG_64_BIT), but the intended config item is called CONFIG_64BIT, as defined in arch/x86/Kconfig.
Fortunately, scripts/checkkconfigsymbols.py warns:
64_BIT
Referencing files: arch/x86/include/asm/entry-common.h
Correct the reference to the intended config symbol.
--- arch/x86/include/asm/entry-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/entry-common.h +1 -1
@@ -25,7 +25,7 @@ static __always_inline void arch_check_user_regs(struct pt_regs *regs)* For !SMAP hardware we patch out CLAC on entry. */ if (boot_cpu_has (X86_FEATURE_SMAP ) || - (IS_ENABLED (CONFIG_64_BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) + (IS_ENABLED (CONFIG_64BIT ) &&boot_cpu_has (X86_FEATURE_XENPV ))) mask |=X86_EFLAGS_AC ;WARN_ON_ONCE (flags & mask);
PATCH 2/9 x86, olpc: correct condition to intended CONFIG_OLPC_XO15_SCI
In reply to Lukas BulwahnThe refactoring in commit ec9964b48033 ("Platform: OLPC: Move EC-specific functionality out from x86") introduces an ifdef CONFIG_OLPC_XO1_5_SCI, however the config is actually called "CONFIG_OLPC_XO15_SCI".
Fortunately, ./scripts/checkkconfigsymbols.py warns:
OLPC_XO1_5_SCI
Referencing files: arch/x86/platform/olpc/olpc.c
Correct this ifdef condition to the intended config symbol.
--- arch/x86/platform/olpc/olpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/platform/olpc/olpc.c +1 -1
@@ -274,7 +274,7 @@ static struct olpc_ec_driver ec_xo1_driver = {static struct olpc_ec_driver ec_xo1_5_driver = { .ec_cmd = olpc_xo1_ec_cmd, -#ifdef CONFIG_OLPC_XO1_5_SCI +#ifdef CONFIG_OLPC_XO15_SCI/* * XO-1.5 EC wakeups are available when olpc-xo15-sci driver is * compiled in
Signature · 1 line
2.17.1
[tip: x86/urgent] x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
The following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 4f90c68790aaa260fb5852406c28e25018872e45 Gitweb: https://git.kernel.org/tip/4f90c68790aaa260fb5852406c28e25018872e45 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:24 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 06 Oct 2021 00:46:10 +02:00
x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
The refactoring in the commit in Fixes introduced an ifdef CONFIG_OLPC_XO1_5_SCI, however the config symbol is actually called "CONFIG_OLPC_XO15_SCI".
Fortunately, ./scripts/checkkconfigsymbols.py warns:
OLPC_XO1_5_SCI
Referencing files: arch/x86/platform/olpc/olpc.c
Correct this ifdef condition to the intended config symbol.
--- arch/x86/platform/olpc/olpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/platform/olpc/olpc.c +1 -1
@@ -274,7 +274,7 @@ static struct olpc_ec_driver ec_xo1_driver = {static struct olpc_ec_driver ec_xo1_5_driver = { .ec_cmd = olpc_xo1_ec_cmd, -#ifdef CONFIG_OLPC_XO1_5_SCI +#ifdef CONFIG_OLPC_XO15_SCI/* * XO-1.5 EC wakeups are available when olpc-xo15-sci driver is * compiled in
[tip: x86/urgent] x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
In reply to Lukas BulwahnThe following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 4758fd801f919b8b9acad78d2e49a195ec2be46b Gitweb: https://git.kernel.org/tip/4758fd801f919b8b9acad78d2e49a195ec2be46b Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:24 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 06 Oct 2021 18:46:06 +02:00
x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
The refactoring in the commit in Fixes introduced an ifdef CONFIG_OLPC_XO1_5_SCI, however the config symbol is actually called "CONFIG_OLPC_XO15_SCI".
Fortunately, ./scripts/checkkconfigsymbols.py warns:
OLPC_XO1_5_SCI
Referencing files: arch/x86/platform/olpc/olpc.c
Correct this ifdef condition to the intended config symbol.
--- arch/x86/platform/olpc/olpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/platform/olpc/olpc.c +1 -1
@@ -274,7 +274,7 @@ static struct olpc_ec_driver ec_xo1_driver = {static struct olpc_ec_driver ec_xo1_5_driver = { .ec_cmd = olpc_xo1_ec_cmd, -#ifdef CONFIG_OLPC_XO1_5_SCI +#ifdef CONFIG_OLPC_XO15_SCI/* * XO-1.5 EC wakeups are available when olpc-xo15-sci driver is * compiled in
PATCH 3/9 x86/Kconfig: correct reference to MWINCHIP3D
In reply to Lukas BulwahnCommit 69b8d3fcabdc ("x86/Kconfig: Exclude i586-class CPUs lacking PAE support from the HIGHMEM64G Kconfig group") intends to exclude the Winchip architectures and refers to CONFIG_WINCHIP3D, but the config is called CONFIG_MWINCHIP3D.
Hence, ./scripts/checkkconfigsymbols.py warns:
WINCHIP3D
Referencing files: arch/x86/Kconfig
Correct the reference to the intended config symbol.
--- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
@@ -1401,7 +1401,7 @@ config HIGHMEM4G config HIGHMEM64G bool "64GB" - depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6 + depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !MWINCHIP3D && !MK6 select X86_PAE help Select this if you have a 32-bit processor and more than 4
Signature · 1 line
2.17.1
[tip: x86/urgent] x86/Kconfig: Correct reference to MWINCHIP3D
The following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 9608312f03f412eafa1630b134db710b4473d62a Gitweb: https://git.kernel.org/tip/9608312f03f412eafa1630b134db710b4473d62a Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:25 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 06 Oct 2021 00:46:44 +02:00
x86/Kconfig: Correct reference to MWINCHIP3D
Commit in Fixes intended to exclude the Winchip series and referred to CONFIG_WINCHIP3D, but the config symbol is called CONFIG_MWINCHIP3D.
Hence, scripts/checkkconfigsymbols.py warns:
WINCHIP3D
Referencing files: arch/x86/Kconfig
Correct the reference to the intended config symbol.
--- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
@@ -1405,7 +1405,7 @@ config HIGHMEM4G config HIGHMEM64G bool "64GB" - depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6 + depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !MWINCHIP3D && !MK6 select X86_PAE help Select this if you have a 32-bit processor and more than 4
[tip: x86/urgent] x86/Kconfig: Correct reference to MWINCHIP3D
In reply to Lukas BulwahnThe following commit has been merged into the x86/urgent branch of tip:
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 225bac2dc5d192e55f2c50123ee539b1edf8a411 Gitweb: https://git.kernel.org/tip/225bac2dc5d192e55f2c50123ee539b1edf8a411 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:25 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Wed, 06 Oct 2021 18:46:06 +02:00
x86/Kconfig: Correct reference to MWINCHIP3D
Commit in Fixes intended to exclude the Winchip series and referred to CONFIG_WINCHIP3D, but the config symbol is called CONFIG_MWINCHIP3D.
Hence, scripts/checkkconfigsymbols.py warns:
WINCHIP3D
Referencing files: arch/x86/Kconfig
Correct the reference to the intended config symbol.
--- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
@@ -1405,7 +1405,7 @@ config HIGHMEM4G config HIGHMEM64G bool "64GB" - depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6 + depends on !M486SX && !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !MWINCHIP3D && !MK6 select X86_PAE help Select this if you have a 32-bit processor and more than 4
PATCH 4/9 x86/Kconfig: remove reference to obsolete MFD_INTEL_MSIC config
In reply to Lukas BulwahnCommit ef3c67b6454b ("mfd: intel_msic: Remove driver for deprecated platform") removes the definition of the config MFD_INTEL_MSIC in ./drivers/mfd/Kconfig, but misses to remove a reference to it in config X86_INTEL_MID in ./arch/x86/Kconfig.
Fortunately, ./scripts/checkkconfigsymbols.py warns:
MFD_INTEL_MSIC
Referencing files: arch/x86/Kconfig
Remove this reference to the obsolete config.
--- arch/x86/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/x86/Kconfig +0 -1
@@ -608,7 +608,6 @@ config X86_INTEL_MID select DW_APB_TIMER select APB_TIMER select INTEL_SCU_PCI - select MFD_INTEL_MSIC help Select to build a kernel capable of supporting Intel MID (Mobile Internet Device) platform systems which do not have the PCI legacy
Signature · 1 line
2.17.1
[tip: x86/cleanups] x86/Kconfig: Remove references to obsolete Kconfig symbols
The following commit has been merged into the x86/cleanups branch of tip:
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 3fd3590b53d1462ab534523e8d9ebdebd9b55f79 Gitweb: https://git.kernel.org/tip/3fd3590b53d1462ab534523e8d9ebdebd9b55f79 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 03 Aug 2021 13:35:26 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Tue, 05 Oct 2021 21:36:58 +02:00
x86/Kconfig: Remove references to obsolete Kconfig symbols
Remove two symbols referenced in Kconfig which have been removed previously by:
ef3c67b6454b ("mfd: intel_msic: Remove driver for deprecated platform") 1b79fc4f2bfd ("x86/apb_timer: Remove driver for deprecated platform")
Detected by scripts/checkkconfigsymbols.py.
[ bp: Merge into a single patch. ]
--- arch/x86/Kconfig | 2 -- 1 file changed, 2 deletions(-)
arch/x86/Kconfig +0 -2
@@ -605,9 +605,7 @@ config X86_INTEL_MID depends on X86_IO_APIC select I2C select DW_APB_TIMER - select APB_TIMER select INTEL_SCU_PCI - select MFD_INTEL_MSIC help Select to build a kernel capable of supporting Intel MID (Mobile Internet Device) platform systems which do not have the PCI legacy
PATCH 5/9 x86/Kconfig: remove reference to obsolete APB_TIMER config
In reply to Lukas BulwahnCommit 1b79fc4f2bfd ("x86/apb_timer: Remove driver for deprecated platform") removes the definition of the config APB_TIMER in ./arch/x86/Kconfig, but misses to remove a reference to it in config X86_INTEL_MID.
Fortunately, ./scripts/checkkconfigsymbols.py warns:
APB_TIMER
Referencing files: arch/x86/Kconfig
Remove this reference to the obsolete config.
--- arch/x86/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/x86/Kconfig +0 -1
@@ -606,7 +606,6 @@ config X86_INTEL_MID depends on X86_IO_APIC select I2C select DW_APB_TIMER - select APB_TIMER select INTEL_SCU_PCI help Select to build a kernel capable of supporting Intel MID (Mobile
Signature · 1 line
2.17.1
Borislav Petkov
maintainerRe: [PATCH 5/9] x86/Kconfig: remove reference to obsolete APB_TIMER config
Quoted 10 lines · Lukas Bulwahn
Commit
1b79fc4f2bfd("x86/apb_timer: Remove driver for deprecated platform") removes the definition of the configAPB_TIMERin./arch/x86/Kconfig, but misses to remove a reference to it in configX86_INTEL_MID.Fortunately,
./scripts/checkkconfigsymbols.pywarns:
APB_TIMER
Referencing files:arch/x86/Kconfig
Quoted 8 lines
Remove this reference to the obsolete config.
Fixes 1b79fc4f2bfd ("x86/apb_timer: Remove driver for deprecated platform")Suggested-by Randy Dunlap <[email protected]>Signed-off-by Lukas Bulwahn <[email protected]>--- arch/x86/Kconfig | 1 - 1 file changed, 1 deletion(-)
I've combined that and the previous one into a single patch since they're pretty trivial:
---
From: Lukas Bulwahn <[email protected]>
Date: Tue, 3 Aug 2021 13:35:26 +0200
Subject: [PATCH] x86/Kconfig: Remove references to obsolete Kconfig symbols
Remove two symbols referenced in Kconfig which have been removed previously by:
ef3c67b6454b ("mfd: intel_msic: Remove driver for deprecated platform") 1b79fc4f2bfd ("x86/apb_timer: Remove driver for deprecated platform")
Detected by scripts/checkkconfigsymbols.py.
[ bp: Merge into a single patch. ]
--- arch/x86/Kconfig | 2 -- 1 file changed, 2 deletions(-)
arch/x86/Kconfig +0 -2
@@ -605,9 +605,7 @@ config X86_INTEL_MID depends on X86_IO_APIC select I2C select DW_APB_TIMER - select APB_TIMER select INTEL_SCU_PCI - select MFD_INTEL_MSIC help Select to build a kernel capable of supporting Intel MID (Mobile Internet Device) platform systems which do not have the PCI legacy
Signature · 8 lines
2.29.2
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquettePATCH 6/9 x86/irq: fix slightly wrong reference in comment
In reply to Lukas BulwahnCommit a0cfc74d0b00 ("x86/irq: Provide macro for inlining irq stack switching") refers to CONFIG_UNWIND_FRAME_POINTER, but the config is called CONFIG_UNWINDER_FRAME_POINTER.
Hence, ./scripts/checkkconfigsymbols.py warns:
UNWIND_FRAME_POINTER
Referencing files: arch/x86/include/asm/irq_stack.h
Adjust the name in the comment.
--- arch/x86/include/asm/irq_stack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/irq_stack.h +1 -1
@@ -58,7 +58,7 @@* the output constraints to make the compiler aware that R11 cannot be * reused after the asm() statement. * -* For builds with CONFIG_UNWIND_FRAME_POINTER ASM_CALL_CONSTRAINT is +* For builds with CONFIG_UNWINDER_FRAME_POINTER, ASM_CALL_CONSTRAINT is * required as well as this prevents certain creative GCC variants from * misplacing the ASM code. *
Signature · 1 line
2.17.1
[tip: x86/cleanups] x86: Fix misspelled Kconfig symbols
The following commit has been merged into the x86/cleanups branch of tip:
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 6bf8a55d8344df1f61a29b18c398bcdf3539e163 Gitweb: https://git.kernel.org/tip/6bf8a55d8344df1f61a29b18c398bcdf3539e163 Author: Lukas Bulwahn <[email protected]> AuthorDate: Tue, 05 Oct 2021 21:48:30 +02:00 Committer: Borislav Petkov <[email protected]> CommitterDate: Tue, 05 Oct 2021 21:48:30 +02:00
x86: Fix misspelled Kconfig symbols
Fix misspelled Kconfig symbols as detected byscripts/checkkconfigsymbols.py.
[ bp: Combine into a single patch. ]
--- arch/x86/include/asm/ia32.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/page_32.h | 2 +- arch/x86/include/asm/uaccess.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/include/asm/ia32.h +1 -1
@@ -68,6 +68,6 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm);#endif -#endif /* !CONFIG_IA32_SUPPORT */ +#endif /* CONFIG_IA32_EMULATION */ #endif /* _ASM_X86_IA32_H */
arch/x86/include/asm/irq_stack.h +1 -1
@@ -58,7 +58,7 @@* the output constraints to make the compiler aware that R11 cannot be * reused after the asm() statement. * -* For builds with CONFIG_UNWIND_FRAME_POINTER ASM_CALL_CONSTRAINT is +* For builds with CONFIG_UNWINDER_FRAME_POINTER, ASM_CALL_CONSTRAINT is * required as well as this prevents certain creative GCC variants from * misplacing the ASM code. *
arch/x86/include/asm/page_32.h +1 -1
@@ -43,7 +43,7 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* CONFIG_X86_3DNOW */ +#endif /* CONFIG_X86_USE_3DNOW */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_PAGE_32_H */
arch/x86/include/asm/uaccess.h +1 -1
@@ -411,7 +411,7 @@ do { \ : [umem] "m" (__m(addr)), \ [efault] "i" (-EFAULT), "0" (err)) -#endif // CONFIG_CC_ASM_GOTO_OUTPUT +#endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT /* FIXME: this hack is definitely wrong -AK */ struct __large_struct {unsigned long buf[100 ]; };
PATCH 7/9 x86/uaccess: adjust comment for endif of CONFIG_CC_HAS_ASM_GOTO_OUTPUT
In reply to Lukas BulwahnCommit 865c50e1d279 ("x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT") adds an ifdef CONFIG_CC_HAS_ASM_GOTO_OUTPUT, and a comment on the corresponding endif. However, it refers slightly mismatching to CONFIG_CC_ASM_GOTO_OUTPUT instead.
Hence, ./scripts/checkkconfigsymbols.py warns:
CC_ASM_GOTO_OUTPUT
Referencing files: arch/x86/include/asm/uaccess.h
Adjust the comment on endif to the actual ifdef condition.
--- arch/x86/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/uaccess.h +1 -1
@@ -411,7 +411,7 @@ do { \ : [umem] "m" (__m(addr)), \ [efault] "i" (-EFAULT), "0" (err)) -#endif // CONFIG_CC_ASM_GOTO_OUTPUT +#endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT /* FIXME: this hack is definitely wrong -AK */ struct __large_struct {unsigned long buf[100 ]; };
Signature · 1 line
2.17.1
PATCH 8/9 x86: page_32.h: adjust comment for endif of CONFIG_X86_USE_3DNOW
In reply to Lukas BulwahnCommit 345b904c3f7c ("x86: page.h: unify page copying and clearing") adds an ifdef CONFIG_X86_USE_3DNOW, and a comment on the corresponding endif. However, it refers slightly mismatching to CONFIG_X86_3DNOW instead.
Hence, ./scripts/checkkconfigsymbols.py warns:
X86_3DNOW
Referencing files: arch/x86/include/asm/page_32.h
Adjust the comment on endif to the actual ifdef condition.
--- arch/x86/include/asm/page_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/page_32.h +1 -1
@@ -43,7 +43,7 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* CONFIG_X86_3DNOW */ +#endif /* CONFIG_X86_USE_3DNOW */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_PAGE_32_H */
Signature · 1 line
2.17.1
PATCH 9/9 x86: ia32.h: adjust comment for endif of CONFIG_IA32_EMULATION
In reply to Lukas BulwahnThe content of the ia32 header is guarded by
"ifdef CONFIG_IA32_EMULATION". The comment on the corresponding endif refers slightly mismatching to CONFIG_IA32_SUPPORT instead.
Hence, ./scripts/checkkconfigsymbols.py warns:
IA32_SUPPORT
Referencing files: arch/x86/include/asm/ia32.h
Adjust the comment on endif to the actual ifdef condition.
--- arch/x86/include/asm/ia32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/ia32.h +1 -1
@@ -68,6 +68,6 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm);#endif -#endif /* !CONFIG_IA32_SUPPORT */ +#endif /* CONFIG_IA32_EMULATION */ #endif /* _ASM_X86_IA32_H */
Signature · 1 line
2.17.1
Borislav Petkov
maintainerRe: [PATCH 9/9] x86: ia32.h: adjust comment for endif of CONFIG_IA32_EMULATION
Quoted 9 lines · Lukas Bulwahn
The content of the ia32 header is guarded by
"ifdefCONFIG_IA32_EMULATION". The comment on the corresponding endif refers slightly mismatching toCONFIG_IA32_SUPPORTinstead.Hence,
./scripts/checkkconfigsymbols.pywarns:
IA32_SUPPORT
Referencing files:arch/x86/include/asm/ia32.h
Quoted 6 lines
Adjust the comment on endif to the actual ifdef condition.
Signed-off-by Lukas Bulwahn <[email protected]>--- arch/x86/include/asm/ia32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Merged the last 4 into a single patch because they're trivial:
---
From: Lukas Bulwahn <[email protected]>
Date: Tue, 5 Oct 2021 21:48:30 +0200
Subject: [PATCH] x86: Fix misspelled Kconfig symbols
Fix misspelled Kconfig symbols as detected by scripts/checkkconfigsymbols.py.
[ bp: Combine into a single patch. ]
--- arch/x86/include/asm/ia32.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/page_32.h | 2 +- arch/x86/include/asm/uaccess.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/include/asm/ia32.h +1 -1
@@ -68,6 +68,6 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm);#endif -#endif /* !CONFIG_IA32_SUPPORT */ +#endif /* CONFIG_IA32_EMULATION */ #endif /* _ASM_X86_IA32_H */
arch/x86/include/asm/irq_stack.h +1 -1
@@ -58,7 +58,7 @@* the output constraints to make the compiler aware that R11 cannot be * reused after the asm() statement. * -* For builds with CONFIG_UNWIND_FRAME_POINTER ASM_CALL_CONSTRAINT is +* For builds with CONFIG_UNWINDER_FRAME_POINTER, ASM_CALL_CONSTRAINT is * required as well as this prevents certain creative GCC variants from * misplacing the ASM code. *
arch/x86/include/asm/page_32.h +1 -1
@@ -43,7 +43,7 @@ static inline void copy_page(void *to, void *from) {memcpy (to, from,PAGE_SIZE ); } -#endif /* CONFIG_X86_3DNOW */ +#endif /* CONFIG_X86_USE_3DNOW */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_PAGE_32_H */
arch/x86/include/asm/uaccess.h +1 -1
@@ -411,7 +411,7 @@ do { \ : [umem] "m" (__m(addr)), \ [efault] "i" (-EFAULT), "0" (err)) -#endif // CONFIG_CC_ASM_GOTO_OUTPUT +#endif // CONFIG_CC_HAS_ASM_GOTO_OUTPUT /* FIXME: this hack is definitely wrong -AK */ struct __large_struct {unsigned long buf[100 ]; };
Signature · 7 lines
2.29.2
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteQuoted 2 lines · Lukas Bulwahn
- a reference to
STRICT_IOMEMinarch/x86/mm/init.cunclear to me: which exact config this refers to
Are you referring to the reference in this comment?
Review
Quoted 8 lines
(quoted diff) +8
-0+ /* + * This must follow RAM test, since System RAM is considered a + * restricted resource under CONFIG_STRICT_IOMEM. + */ + if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) { + /* Low 1MB bypasses iomem restrictions. */ + if (pagenr < 256) + return 1;
...
That came from here:
Quoted 5 lines
commit
a4866aa812518ed1a37d8ea0c881dc946409de94Author: Kees Cook <[email protected]> Date: Wed Apr 5 09:39:08 2017 -0700mm: Tighten x86
/dev/memwith zeroing reads
Which also added this hunk:
Review
Quoted 5 lines
#ifdef
CONFIG_STRICT_DEVMEM(quoted diff) +4
-0+static inline int page_is_allowed(unsigned long pfn) +{ + return devmem_is_allowed(pfn); +}
and talks about CONFIG_STRICT_DEVMEM in the changelog:
Quoted 4 lines
mm: Tighten x86
/dev/memwith zeroing readsUnder
CONFIG_STRICT_DEVMEM, reading System RAM through/dev/memis disallowed. However, on x86, the first 1MB was always allowed for BIOS
...
It's a pretty safe guess that STRICT_IOMEM refers to CONFIG_STRICT_DEVMEM.
Quoted 15 lines · Dave Hansen
Quoted 2 lines · Lukas Bulwahn
- a reference to
STRICT_IOMEMinarch/x86/mm/init.cunclear to me: which exact config this refers toAre you referring to the reference in this comment?
Review
Quoted 8 lines
(quoted diff) +8
-0+ /* + * This must follow RAM test, since System RAM is considered a + * restricted resource under CONFIG_STRICT_IOMEM. + */ + if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) { + /* Low 1MB bypasses iomem restrictions. */ + if (pagenr < 256) + return 1;
Quoted 2 lines
...
Yes, that is what I referred to.
Quoted 18 lines
That came from here:
Quoted 5 lines
commit
a4866aa812518ed1a37d8ea0c881dc946409de94Author: Kees Cook <[email protected]> Date: Wed Apr 5 09:39:08 2017 -0700mm: Tighten x86
/dev/memwith zeroing readsWhich also added this hunk:
Review
Quoted 5 lines
#ifdef
CONFIG_STRICT_DEVMEM(quoted diff) +4
-0+static inline int page_is_allowed(unsigned long pfn) +{ + return devmem_is_allowed(pfn); +}and talks about
CONFIG_STRICT_DEVMEMin the changelog:
Quoted 7 lines
Quoted 4 lines
mm: Tighten x86
/dev/memwith zeroing readsUnder
CONFIG_STRICT_DEVMEM, reading System RAM through/dev/memis disallowed. However, on x86, the first 1MB was always allowed for BIOS...
It's a pretty safe guess that
STRICT_IOMEMrefers toCONFIG_STRICT_DEVMEM.
Thanks, Dave.
If the maintainers consider updates to comments making them consistent with the code as worth being picked, I will turn your analysis into a proper commit message and provide a patch to update that comment.
Lukas
Quoted 6 lines · Lukas Bulwahn
Quoted 1 line
It's a pretty safe guess that
STRICT_IOMEMrefers toCONFIG_STRICT_DEVMEM.Thanks, Dave.
If the maintainers consider updates to comments making them consistent with the code as worth being picked, I will turn your analysis into a proper commit message and provide a patch to update that comment.
I'd happily ack a patch that does that. Might as well fix that kind of stuff now before more time passes and it gets harder to track down.
Quoted 11 lines · Dave Hansen
Quoted 6 lines · Lukas Bulwahn
Quoted 1 line
It's a pretty safe guess that
STRICT_IOMEMrefers toCONFIG_STRICT_DEVMEM.Thanks, Dave.
If the maintainers consider updates to comments making them consistent with the code as worth being picked, I will turn your analysis into a proper commit message and provide a patch to update that comment.
I'd happily ack a patch that does that. Might as well fix that kind of stuff now before more time passes and it gets harder to track down.
Sorry, Dave, it took me a bit longer to come back to my second pass on references to non-existing configs in the kernel tree...
I have just sent out a quick fix for this issue, now in your and other x86 maintainers' mailbox:
https://lore.kernel.org/all/[email protected]/
I am happy to get an ack for that patch.
Lukas
Quoted 7 lines · Lukas Bulwahn
Dear x86 maintainers,
Randy Dunlap pointed out that
./scripts/checkkconfigsymbols.pywarns on invalid references toKconfigsymbols (often, minor typos, name confusions or outdated references): see Link below.
Quoted 9 lines
This is a first patch series addressing the issues reported by
./scripts/checkkconfigsymbols.pyin the./arch/x86/directories, quickly filtered down with:
./scripts/checkkconfigsymbols.py| grep "arch/x86" -B 1 -A 2It addresses some issues I considered to be "true positives"; so, issues that should be addressed and cleaned up.
...
for the series:
Thanks.
Quoted 21 lines
Lukas Bulwahn (9):
x86/entry: correct reference to intendedCONFIG_64_BITx86, olpc: correct condition to intendedCONFIG_OLPC_XO15_SCIx86/Kconfig: correct reference to MWINCHIP3D
x86/Kconfig: remove reference to obsoleteMFD_INTEL_MSICconfig x86/Kconfig: remove reference to obsoleteAPB_TIMERconfig x86/irq: fix slightly wrong reference in comment x86/uaccess: adjust comment for endif ofCONFIG_CC_HAS_ASM_GOTO_OUTPUT
x86:page_32.h: adjust comment for endif ofCONFIG_X86_USE_3DNOW
x86:ia32.h: adjust comment for endif ofCONFIG_IA32_EMULATIONarch/x86/Kconfig | 4 +--- arch/x86/include/asm/entry-common.h | 2 +- arch/x86/include/asm/ia32.h | 2 +- arch/x86/include/asm/irq_stack.h | 2 +- arch/x86/include/asm/page_32.h | 2 +- arch/x86/include/asm/uaccess.h | 2 +- arch/x86/platform/olpc/olpc.c | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-)
Signature · 1 line
~Randy