lkml.org 
[lkml]   [2020]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v11 6/9] x86/cet: Add PTRACE interface for CET
    From
    Date
    On 9/3/2020 9:11 AM, Dave Hansen wrote:
    > On 9/3/20 9:09 AM, Yu, Yu-cheng wrote:
    >> If the debugger is going to write an MSR, only in the third case would
    >> this make a slight sense.  For example, if the system has CET enabled,
    >> but the task does not have CET enabled, and GDB is writing to a CET MSR.
    >>  But still, this is strange to me.
    >
    > If this is strange, then why do we even _implement_ writes?
    >

    For example, if the task has CET enabled, and it is in a control
    protection fault, the debugger can clear the task's IBT state, or unwind
    the shadow stack, etc. But if the task does not have CET enabled (its
    CET MSRs are in INIT state), it would make sense for the PTRACE call to
    return failure than doing something else, right?

    \
     
     \ /
      Last update: 2020-09-03 18:21    [W:5.236 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site