On Fri, 15 Sep 2017 18:21:08 -0700 Ram Pai <linuxram@xxxxxxxxxx> wrote: > From: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxxxxxxx> > > Expose useful information for programs using memory protection keys. > Provide implementation for powerpc and x86. > > On a powerpc system with pkeys support, here is what is shown: > > $ head /sys/kernel/mm/protection_keys/* > ==> /sys/kernel/mm/protection_keys/disable_access_supported <== > true > > ==> /sys/kernel/mm/protection_keys/disable_execute_supported <== > true > > ==> /sys/kernel/mm/protection_keys/disable_write_supported <== > true > > ==> /sys/kernel/mm/protection_keys/total_keys <== > 32 > > ==> /sys/kernel/mm/protection_keys/usable_keys <== > 29 > > And on an x86 without pkeys support: > > $ head /sys/kernel/mm/protection_keys/* > ==> /sys/kernel/mm/protection_keys/disable_access_supported <== > false > > ==> /sys/kernel/mm/protection_keys/disable_execute_supported <== > false > > ==> /sys/kernel/mm/protection_keys/disable_write_supported <== > false > > ==> /sys/kernel/mm/protection_keys/total_keys <== > 1 > > ==> /sys/kernel/mm/protection_keys/usable_keys <== > 0 > > Signed-off-by: Ram Pai <linuxram@xxxxxxxxxx> > Signed-off-by: Thiago Jung Bauermann <bauerman@xxxxxxxxxxxxxxxxxx> > --- Just curious, how do you see this being used? For debugging or will applications parse these properties and use them? It's hard for an application to partition its address space among keys at runtime, would you agree? Balbir Singh. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>