Re: [PATCH V7 12/18] x86/pks: Add PKS fault callbacks
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2021-08-11 21:18:33
Also in:
lkml, nvdimm
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Date: 2021-08-11 21:18:33
Also in:
lkml, nvdimm
On Tue, 2021-08-03 at 21:32 -0700, ira.weiny@intel.com wrote:
+static const pks_key_callback
pks_key_callbacks[PKS_KEY_NR_CONSUMERS] = { 0 };
+
+bool handle_pks_key_callback(unsigned long address, bool write, u16
key)
+{
+ if (key > PKS_KEY_NR_CONSUMERS)
+ return false;Good idea, should be >= though?
+ + if (pks_key_callbacks[key]) + return pks_key_callbacks[key](address, write); + + return false; +} +
Otherwise, I've rebased on this series and didn't hit any problems. Thanks.