Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1336909

Re: [PATCH 33/33] x86, pkeys: execute-only support

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH 33/33] x86, pkeys: execute-only support
Date 2016-02-18 01:50 +0100
Message-ID <r3kX8-5Re-25@gated-at.bofh.it> (permalink)
References <r1t8t-3TO-3@gated-at.bofh.it> <r1t8v-3TO-39@gated-at.bofh.it> <r3hPA-3LD-27@gated-at.bofh.it> <r3iBY-4nq-23@gated-at.bofh.it> <r3jeF-4Do-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 17, 2016 at 2:53 PM, Dave Hansen <dave@sr71.net> wrote:
> On 02/17/2016 02:17 PM, Andy Lutomirski wrote:
>>> > Is there a way to detect this feature's availability without userspace
>>> > having to set up a segv handler and attempting to read a
>>> > PROT_EXEC-only region? (i.e. cpu flag for protection keys, or a way to
>>> > check the protection to see if PROT_READ got added automatically,
>>> > etc?)
>>> >
>> We could add an HWCAP.
>
> I'll bite.  What's an HWCAP?

It's a CPU capability vector that's passed to every program as an auxv
entry.  On x86, ELF_HWCAP is useless (it's already fully used up for
pointless purposes for CPUID stuff), but ELF_HWCAP2 could be added and
a bit could be defined like HWCAP2_PROT_EXEC_ONLY.

Some day, WRFSBASE, etc will be advertised via ELF_HWCAP2, I suspect.

--Andy

-- 
Andy Lutomirski
AMA Capital Management, LLC

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 33/33] x86, pkeys: execute-only support Dave Hansen <dave@sr71.net> - 2016-02-12 22:10 +0100
  Re: [PATCH 33/33] x86, pkeys: execute-only support Kees Cook <keescook@google.com> - 2016-02-17 22:30 +0100
    Re: [PATCH 33/33] x86, pkeys: execute-only support Dave Hansen <dave@sr71.net> - 2016-02-17 22:40 +0100
      Re: [PATCH 33/33] x86, pkeys: execute-only support Kees Cook <keescook@google.com> - 2016-02-17 22:40 +0100
    Re: [PATCH 33/33] x86, pkeys: execute-only support Andy Lutomirski <luto@amacapital.net> - 2016-02-17 23:20 +0100
      Re: [PATCH 33/33] x86, pkeys: execute-only support Dave Hansen <dave@sr71.net> - 2016-02-18 00:00 +0100
        Re: [PATCH 33/33] x86, pkeys: execute-only support Andy Lutomirski <luto@amacapital.net> - 2016-02-18 01:50 +0100
  [tip:mm/pkeys] mm/core, x86/mm/pkeys:   Add execute-only protection keys support tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-02-18 21:30 +0100

csiph-web