Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/mm: Change comment and die() message if teid.b61 is zero

The comments in do_protection() give the impression that a TEID, where bit
61 is zero, indicates a low address protection exception. This is not
necessarily true, and it depends on the type of Suppression-on-Protection
facility of the machine (see Princples of Operation) what this means.

Rework the comments and the die() message to reflect this. This may also
help to avoid confusion.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+4 -9
+4 -9
arch/s390/mm/fault.c
··· 368 368 if (!(regs->int_code & 0x200)) 369 369 regs->psw.addr = __rewind_psw(regs->psw, regs->int_code >> 16); 370 370 /* 371 - * Check for low-address protection. This needs to be treated 372 - * as a special case because the translation exception code 373 - * field is not guaranteed to contain valid data in this case. 371 + * If bit 61 if the TEID is not set, the remainder of the 372 + * TEID is unpredictable. Special handling is required. 374 373 */ 375 374 if (unlikely(!teid.b61)) { 376 375 if (user_mode(regs)) { 377 - /* Low-address protection in user mode: cannot happen */ 378 376 dump_fault_info(regs); 379 - die(regs, "Low-address protection"); 377 + die(regs, "Unexpected TEID"); 380 378 } 381 - /* 382 - * Low-address protection in kernel mode means 383 - * NULL pointer write access in kernel mode. 384 - */ 379 + /* Assume low-address protection in kernel mode. */ 385 380 return handle_fault_error_nolock(regs, 0); 386 381 } 387 382 if (unlikely(cpu_has_nx() && teid.b56)) {