-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/…
…kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "The current exception handler, which helps on kernel accesses to userspace, may exhibit data corruption. The problem is that it is not guaranteed that the compiler will use the processor register we specified in the source code, but may choose another register which then will lead to silent register- and data corruption. To fix this issue we now use another strategy to help the exception handler to always find and set the error code into the correct CPU register. The other fixes are small: fixing CPU hotplug bringup, fix the page alignment of the RO_DATA section, added a check for the calculated cache stride and fix possible hangups when printing longer output at bootup when running on serial console. Most of the patches are tagged for stable series. - Fix random data corruption triggered by exception handler - Fix crash when setting up BTLB at CPU bringup - Prevent hung tasks when printing inventory on serial console - Make RO_DATA page aligned in vmlinux.lds.S - Add check for valid cache stride size" * tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: BTLB: Fix crash when setting up BTLB at CPU bringup parisc: Fix random data corruption from exception handler parisc: Drop unneeded semicolon in parse_tree_node() parisc: Prevent hung tasks when printing inventory on serial console parisc: Check for valid stride size for cache flushes parisc: Make RO_DATA page aligned in vmlinux.lds.S
- Loading branch information
Showing
10 changed files
with
118 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef __PARISC_EXTABLE_H | ||
#define __PARISC_EXTABLE_H | ||
|
||
#include <asm/ptrace.h> | ||
#include <linux/compiler.h> | ||
|
||
/* | ||
* The exception table consists of three addresses: | ||
* | ||
* - A relative address to the instruction that is allowed to fault. | ||
* - A relative address at which the program should continue (fixup routine) | ||
* - An asm statement which specifies which CPU register will | ||
* receive -EFAULT when an exception happens if the lowest bit in | ||
* the fixup address is set. | ||
* | ||
* Note: The register specified in the err_opcode instruction will be | ||
* modified at runtime if a fault happens. Register %r0 will be ignored. | ||
* | ||
* Since relative addresses are used, 32bit values are sufficient even on | ||
* 64bit kernel. | ||
*/ | ||
|
||
struct pt_regs; | ||
int fixup_exception(struct pt_regs *regs); | ||
|
||
#define ARCH_HAS_RELATIVE_EXTABLE | ||
struct exception_table_entry { | ||
int insn; /* relative address of insn that is allowed to fault. */ | ||
int fixup; /* relative address of fixup routine */ | ||
int err_opcode; /* sample opcode with register which holds error code */ | ||
}; | ||
|
||
#define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr, opcode )\ | ||
".section __ex_table,\"aw\"\n" \ | ||
".align 4\n" \ | ||
".word (" #fault_addr " - .), (" #except_addr " - .)\n" \ | ||
opcode "\n" \ | ||
".previous\n" | ||
|
||
/* | ||
* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry | ||
* (with lowest bit set) for which the fault handler in fixup_exception() will | ||
* load -EFAULT on fault into the register specified by the err_opcode instruction, | ||
* and zeroes the target register in case of a read fault in get_user(). | ||
*/ | ||
#define ASM_EXCEPTIONTABLE_VAR(__err_var) \ | ||
int __err_var = 0 | ||
#define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr, register )\ | ||
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1, "or %%r0,%%r0," register) | ||
|
||
static inline void swap_ex_entry_fixup(struct exception_table_entry *a, | ||
struct exception_table_entry *b, | ||
struct exception_table_entry tmp, | ||
int delta) | ||
{ | ||
a->fixup = b->fixup + delta; | ||
b->fixup = tmp.fixup - delta; | ||
a->err_opcode = b->err_opcode; | ||
b->err_opcode = tmp.err_opcode; | ||
} | ||
#define swap_ex_entry_fixup swap_ex_entry_fixup | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,7 +127,7 @@ SECTIONS | |
} | ||
#endif | ||
|
||
RO_DATA(8) | ||
RO_DATA(PAGE_SIZE) | ||
|
||
/* unwind info */ | ||
. = ALIGN(4); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters