Khalid Aziz [off-list ref] writes:
V11 changes:
This series is same as v10 and was simply rebased on 4.15 kernel. Can
mm maintainers please review patches 2, 7, 8 and 9 which are arch
independent, and include/linux/mm.h and mm/ksm.c changes in patch 10
and ack these if everything looks good?
I am a bit puzzled how this differs from the pkey's that other
architectures are implementing to achieve a similar result.
I am a bit mystified why you don't store the tag in a vma
instead of inventing a new way to store data on page out.
Can you please use force_sig_fault to send these signals instead
of force_sig_info. Emperically I have found that it is very
error prone to generate siginfo's by hand, especially on code
paths where several different si_codes may apply. So it helps
to go through a helper function to ensure the fiddly bits are
all correct. AKA the unused bits all need to be set to zero before
struct siginfo is copied to userspace.
Eric
On 2/1/2018 9:29 PM, ebiederm@xmission.com wrote:
Khalid Aziz [off-list ref] writes:
quoted
V11 changes:
This series is same as v10 and was simply rebased on 4.15 kernel. Can
mm maintainers please review patches 2, 7, 8 and 9 which are arch
independent, and include/linux/mm.h and mm/ksm.c changes in patch 10
and ack these if everything looks good?
I am a bit puzzled how this differs from the pkey's that other
architectures are implementing to achieve a similar result.
I am a bit mystified why you don't store the tag in a vma
instead of inventing a new way to store data on page out.
Can you please use force_sig_fault to send these signals instead
of force_sig_info. Emperically I have found that it is very
error prone to generate siginfo's by hand, especially on code
paths where several different si_codes may apply. So it helps
to go through a helper function to ensure the fiddly bits are
all correct. AKA the unused bits all need to be set to zero before
struct siginfo is copied to userspace.
Eric
The ADI tag can be set at a cacheline (64B) granularity, as opposed
to the per-page granularity of pkeys. This allows an object allocator
to color each object differently within a page (rounding to 64B boundaries),
such that a pointer overrun bug from one object to the next will cause a
fault. When pages are paged out, the tags must be saved, hence the
new scheme for storing them. One tag per vma is too coarse.
The combination of fine granularity and pageability makes for a powerful
memory-reference error-detection framework.
This was discussed in more detail when earlier patches were submitted,
but it's been a while, and the distribution was probably narrower.
Khalid can respond to the sig_fault comment.
- Steve
On 02/01/2018 07:29 PM, ebiederm@xmission.com wrote:
Khalid Aziz [off-list ref] writes:
quoted
V11 changes:
This series is same as v10 and was simply rebased on 4.15 kernel. Can
mm maintainers please review patches 2, 7, 8 and 9 which are arch
independent, and include/linux/mm.h and mm/ksm.c changes in patch 10
and ack these if everything looks good?
I am a bit puzzled how this differs from the pkey's that other
architectures are implementing to achieve a similar result.
I am a bit mystified why you don't store the tag in a vma
instead of inventing a new way to store data on page out.
Hello Eric,
As Steven pointed out, sparc sets tags per cacheline unlike pkey. This
results in much finer granularity for tags that pkey and hence requires
larger tag storage than what we can do in a vma.
Can you please use force_sig_fault to send these signals instead
of force_sig_info. Emperically I have found that it is very
error prone to generate siginfo's by hand, especially on code
paths where several different si_codes may apply. So it helps
to go through a helper function to ensure the fiddly bits are
all correct. AKA the unused bits all need to be set to zero before
struct siginfo is copied to userspace.
What you say makes sense. I followed the same code as other fault
handlers for sparc. I could change just the fault handlers for ADI
related faults. Would it make more sense to change all the fault
handlers in a separate patch and keep the code in
arch/sparc/kernel/traps_64.c consistent? Dave M, do you have a preference?
Thanks,
Khalid