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: <202202081543.5C4EF7F9DE@keescook>
Date:   Tue, 8 Feb 2022 15:48:38 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     x86@...nel.org, joao@...rdrivepizza.com, hjl.tools@...il.com,
        jpoimboe@...hat.com, andrew.cooper3@...rix.com,
        linux-kernel@...r.kernel.org, ndesaulniers@...gle.com,
        samitolvanen@...gle.com
Subject: Re: [RFC][PATCH 0/6] x86: Kernel IBT beginnings

On Mon, Nov 22, 2021 at 06:03:01PM +0100, Peter Zijlstra wrote:
> It is the very bare beginnings of kernel IBT support. Since I'm lacking any
> sort of actual hardware it even lacks fun things like code to write to the MSRs
> to enable the IBT tracker etc..

Heh. I have hardware to test with -- recent laptops all have the
support. I haven't checked in QEMU can emulate it, though. Bochs seems
to.

> However, it should have most of the ENDBR instructions in the right place -- I
> hope :-) That said; I would *really* like compiler support for this stuff to be
> improved, the amount of fixups done by objtool is obscene.
> 
> The end result still boots on ancient x86-64 hardware, for whatever that's
> worth (when built with the below turd included that is).

Should the below roughly be patch 7?

> 
> Enjoy!
> 
> ---
> 
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 5cdd9bc5c385..1d180bbe7b28 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -142,6 +142,11 @@ objtool_link()
>  		info OBJTOOL ${1}
>  		tools/objtool/objtool ${objtoolcmd} ${objtoolopt} ${1}
>  	fi
> +
> +	if [ "${CONFIG_X86_IBT}" = "y" ]; then
> +		# XXX less ugleh
> +		tools/objtool/objtool check --no-fp --retpoline --uaccess --vmlinux --duplicate --ibt --ibt-fix-direct --ibt-seal ${1}
> +	fi
>  }
>  
>  # Link of vmlinux
> 

Have you had a chance to get this into shape for a v1?

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ