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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202202071405.FB72C07@keescook>
Date:   Mon, 7 Feb 2022 14:07:27 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Borislav Petkov <bp@...en8.de>
Cc:     X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
        Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [PATCH v2 3/6] x86/cpu: Remove CONFIG_X86_SMAP and "nosmap"

On Thu, Jan 27, 2022 at 12:56:23PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
> 
> Those were added as part of the SMAP enablement but SMAP is currently
> an integral part of kernel proper and there's no need to disable it
> anymore.
> 
> Rip out that functionality.
> 
> If still needed - clearcpuid=smap.
> 
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Reviewed-by: Lai Jiangshan <jiangshanlai@...il.com>
> ---
>  .../admin-guide/kernel-parameters.txt         |  2 +-
>  Documentation/x86/cpuinfo.rst                 |  5 ++--
>  arch/x86/Kconfig                              | 11 ---------
>  arch/x86/include/asm/disabled-features.h      |  8 +------
>  arch/x86/include/asm/smap.h                   | 24 -------------------
>  arch/x86/kernel/cpu/common.c                  | 15 +-----------
>  scripts/Makefile.build                        |  1 -
>  scripts/link-vmlinux.sh                       |  3 ---
>  .../arch/x86/include/asm/disabled-features.h  |  8 +------
>  9 files changed, 6 insertions(+), 71 deletions(-)
> [...]
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index a4b89b757287..9b37902607ed 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -233,7 +233,6 @@ objtool_args =								\
>  	$(if $(CONFIG_FRAME_POINTER),, --no-fp)				\
>  	$(if $(CONFIG_GCOV_KERNEL)$(CONFIG_LTO_CLANG), --no-unreachable)\
>  	$(if $(CONFIG_RETPOLINE), --retpoline)				\
> -	$(if $(CONFIG_X86_SMAP), --uaccess)				\
>  	$(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount)		\
>  	$(if $(CONFIG_SLS), --sls)
>  
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 666f7bbc13eb..8547aaa1a630 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -140,9 +140,6 @@ objtool_link()
>  		if is_enabled CONFIG_RETPOLINE; then
>  			objtoolopt="${objtoolopt} --retpoline"
>  		fi
> -		if is_enabled CONFIG_X86_SMAP; then
> -			objtoolopt="${objtoolopt} --uaccess"
> -		fi
>  		if is_enabled CONFIG_SLS; then
>  			objtoolopt="${objtoolopt} --sls"
>  		fi

I was expecting to see --uaccess unconditionally added to objtool
arguments. I think that needs to happen?

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ