lkml.org 
[lkml]   [2023]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v1 RFC Zisslpcfi 01/20] sslp stubs: shadow stack and landing pad stubs
    Date
    In absence of shadow stack config and landing pad instr config, stubs are
    needed to indicate whether shadow stack & landing pad instr is supported.

    In absence of config, these stubs return false (indicating no support)
    In presence of config, an extern declaration is added and arch specific
    implementation can choose to implement detection.

    Signed-off-by: Deepak Gupta <debug@rivosinc.com>
    ---
    include/linux/processor.h | 17 +++++++++++++++++
    1 file changed, 17 insertions(+)

    diff --git a/include/linux/processor.h b/include/linux/processor.h
    index dc78bdc7079a..228aa95a7cd7 100644
    --- a/include/linux/processor.h
    +++ b/include/linux/processor.h
    @@ -59,4 +59,21 @@ do { \

    #endif

    +#ifndef CONFIG_USER_SHADOW_STACK
    +static inline bool arch_supports_shadow_stack(void)
    +{
    + return false;
    +}
    +#else
    +extern bool arch_supports_shadow_stack(void);
    +#endif
    +
    +#ifndef CONFIG_USER_INDIRECT_BR_LP
    +static inline bool arch_supports_indirect_br_lp_instr(void)
    +{
    + return false;
    +}
    +#else
    +extern bool arch_supports_indirect_br_lp_instr(void);
    +#endif
    #endif /* _LINUX_PROCESSOR_H */
    --
    2.25.1
    \
     
     \ /
      Last update: 2023-03-27 00:19    [W:4.474 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site