lkml.org 
[lkml]   [2022]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 33/39] objtool: Add IBT/ENDBR decoding
Date
On 03/03/2022 10:53, Miroslav Benes wrote:
> Hi,
>
> On Thu, 24 Feb 2022, Peter Zijlstra wrote:
>
>> Decode ENDBR instructions and WARN about NOTRACK prefixes.
> I guess it has been already mentioned somewhere, but could you explain
> NOTRACK prefix here, please? If I understand it right, it disables IBT for
> the indirect branch instruction meaning that its target does not have to
> start with ENDBR?

CET-IBT has loads of get-out clauses.  The NOTRACK prefix is one; the
legacy code bitmap (implicit NOTRACK for whole libraries) is another.

And yes - the purpose of NOTRACK is to exempt a specific indirect branch
from checks.

GCC can emit NOTRACK'd calls in some cases when e.g. the programmer
launders a function pointer through (void *), or when
__attribute__((no_cf_check)) is used explicitly.


Each of the get-out clauses has separate enable bits, as each of them
reduces security.  In this series, Linux sets MSR_S_CET.ENDBR_EN but
specifically does not set NOTRACK_EN, so NOTRACK prefixes will be
ignored and suffer #CP if encountered.

~Andrew
\
 
 \ /
  Last update: 2022-03-03 12:07    [W:0.162 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site