Commit e44370ab authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s: slb comment update

This makes a small improvement to the description of the SLB interrupt
environment. Move the memory access restrictions into one paragraph,
and the interrupt restrictions into the next rather than mix them.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-18-npiggin@gmail.com
parent 31d6490c
...@@ -825,19 +825,21 @@ long do_slb_fault(struct pt_regs *regs) ...@@ -825,19 +825,21 @@ long do_slb_fault(struct pt_regs *regs)
return -EINVAL; return -EINVAL;
/* /*
* SLB kernel faults must be very careful not to touch anything * SLB kernel faults must be very careful not to touch anything that is
* that is not bolted. E.g., PACA and global variables are okay, * not bolted. E.g., PACA and global variables are okay, mm->context
* mm->context stuff is not. * stuff is not. SLB user faults may access all of memory (and induce
* * one recursive SLB kernel fault), so the kernel fault must not
* SLB user faults can access all of kernel memory, but must be * trample on the user fault state at those points.
* careful not to touch things like IRQ state because it is not */
* "reconciled" here. The difficulty is that we must use
* fast_exception_return to return from kernel SLB faults without /*
* looking at possible non-bolted memory. We could test user vs * The interrupt state is not reconciled, for performance, so that
* kernel faults in the interrupt handler asm and do a full fault, * fast_interrupt_return can be used. The handler must not touch local
* reconcile, ret_from_except for user faults which would make them * irq state, or schedule. We could test for usermode and upgrade to a
* first class kernel code. But for performance it's probably nicer * normal process context (synchronous) interrupt for those, which
* if they go via fast_exception_return too. * would make them first-class kernel code and able to be traced and
* instrumented, although performance would suffer a bit, it would
* probably be a good tradeoff.
*/ */
if (id >= LINEAR_MAP_REGION_ID) { if (id >= LINEAR_MAP_REGION_ID) {
long err; long err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment