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


Groups > linux.kernel > #1700670

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey

From Michael Ellerman <mpe@ellerman.id.au>
Newsgroups linux.kernel
Subject Re: [RFC v6 21/62] powerpc: introduce execute-only pkey
Date 2017-08-01 08:50 +0200
Message-ID <u9za9-8fB-9@gated-at.bofh.it> (permalink)
References <u3ISR-1St-3@gated-at.bofh.it> <u3Jce-2ea-25@gated-at.bofh.it> <u8lLX-1lY-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> writes:
> Ram Pai <linuxram@us.ibm.com> writes:
...
>> +
>> +	/* We got one, store it and use it from here on out */
>> +	if (need_to_set_mm_pkey)
>> +		mm->context.execute_only_pkey = execute_only_pkey;
>> +	return execute_only_pkey;
>> +}
>
> If you follow the code flow in __execute_only_pkey, the AMR and UAMOR
> are read 3 times in total, and AMR is written twice. IAMR is read and
> written twice. Since they are SPRs and access to them is slow (or isn't
> it?),

SPRs read/writes are slow, but they're not *that* slow in comparison to
a system call (which I think is where this code is being called?).

So we should try to avoid too many SPR read/writes, but at the same time
we can accept more than the minimum if it makes the code much easier to
follow.

cheers

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


Thread

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey Michael Ellerman <mpe@ellerman.id.au> - 2017-08-01 08:50 +0200
  Re: [RFC v6 21/62] powerpc: introduce execute-only pkey Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com> - 2017-08-01 18:20 +0200
    Re: [RFC v6 21/62] powerpc: introduce execute-only pkey Michael Ellerman <mpe@ellerman.id.au> - 2017-08-02 11:50 +0200

csiph-web