mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
Xtensa fixes for v6.2:
- fix xtensa allmodconfig build broken by the kcsan test - drop unused members of struct thread_struct -----BEGIN PGP SIGNATURE----- iQJHBAABCgAxFiEEK2eFS5jlMn3N6xfYUfnMkfg/oEQFAmO9qEMTHGpjbXZia2Jj QGdtYWlsLmNvbQAKCRBR+cyR+D+gRCsAD/9d3kNFdjDkSWBLaPOxENJzLBsrd6uK ONEMekNGXWcy0sqbCi7keqqYSCD9BwKbup1XNW9fQ949OuvXfBYtBvJZmhQa50cZ 9FHVJkeuLTDnBXCKj4QyqNQ6bflviKV7CPbndsWA1bbP8WRKSW47bvr+8dCLvVNm LaOEz2V7XDmFMDBLhIHYk/VCjOAoMmyXCEgpcbyJxLN/Mv09S/M3ZVYQbAtfwdu1 MUtVDuEqp1hP+6IdPmb0wWMe08AFLRd+5Ney/WoM2Fy8uXrthdfugtqUhuw+YHuV EHxqcc342Pe1rNZ2o+NXLe6EmZiBC7pzo6RZK/LpvHWWSluoWQz1wbOehaS8Td5D O5CFegEp0xR3ESCIyzFcAY32xWrPpv8ie32aDxkW3kkgZt450brTG3Okp9qfNkkQ vhr0flO61W2WBpfrdT0RqvH+x+60NLSrqU0wRc/a9quTQ5ov5SPW9akGtavRMTtO 1t/L/BWXbQ50AsZejNisuYlVXICBnQRDbBJoENclqN6u1uO62cxJR7thuT7ckQhh fuMlo3KTC4dcKyS7QwyjayFmfMWvhZD18AtG1Xg1QB58tAzjXemZPdlG+GRXoDmx kViz8ACsRunPIWhfo/EDPZPYFLItIGa1JtTwnFGGVxw/yIH9vlmFrf+c1gmk+I0q PXPr99tabm2hHQ== =3G83 -----END PGP SIGNATURE----- Merge tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa Pull xtensa fixes from Max Filippov: - fix xtensa allmodconfig build broken by the kcsan test - drop unused members of struct thread_struct * tag 'xtensa-20230110' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: drop unused members of struct thread_struct kcsan: test: don't put the expect array on the stack
This commit is contained in:
commit
092f623910
@ -154,11 +154,6 @@ struct thread_struct {
|
||||
unsigned long ra; /* kernel's a0: return address and window call size */
|
||||
unsigned long sp; /* kernel's a1: stack pointer */
|
||||
|
||||
/* struct xtensa_cpuinfo info; */
|
||||
|
||||
unsigned long bad_vaddr; /* last user fault */
|
||||
unsigned long bad_uaddr; /* last kernel fault accessing user space */
|
||||
unsigned long error_code;
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
struct perf_event *ptrace_bp[XCHAL_NUM_IBREAK];
|
||||
struct perf_event *ptrace_wp[XCHAL_NUM_DBREAK];
|
||||
@ -176,10 +171,6 @@ struct thread_struct {
|
||||
{ \
|
||||
ra: 0, \
|
||||
sp: sizeof(init_stack) + (long) &init_stack, \
|
||||
/*info: {0}, */ \
|
||||
bad_vaddr: 0, \
|
||||
bad_uaddr: 0, \
|
||||
error_code: 0, \
|
||||
}
|
||||
|
||||
|
||||
|
@ -362,8 +362,6 @@ static void do_unaligned_user(struct pt_regs *regs)
|
||||
__die_if_kernel("Unhandled unaligned exception in kernel",
|
||||
regs, SIGKILL);
|
||||
|
||||
current->thread.bad_vaddr = regs->excvaddr;
|
||||
current->thread.error_code = -3;
|
||||
pr_info_ratelimited("Unaligned memory access to %08lx in '%s' "
|
||||
"(pid = %d, pc = %#010lx)\n",
|
||||
regs->excvaddr, current->comm,
|
||||
|
@ -206,8 +206,6 @@ good_area:
|
||||
bad_area:
|
||||
mmap_read_unlock(mm);
|
||||
if (user_mode(regs)) {
|
||||
current->thread.bad_vaddr = address;
|
||||
current->thread.error_code = is_write;
|
||||
force_sig_fault(SIGSEGV, code, (void *) address);
|
||||
return;
|
||||
}
|
||||
@ -232,7 +230,6 @@ do_sigbus:
|
||||
/* Send a sigbus, regardless of whether we were in kernel
|
||||
* or user mode.
|
||||
*/
|
||||
current->thread.bad_vaddr = address;
|
||||
force_sig_fault(SIGBUS, BUS_ADRERR, (void *) address);
|
||||
|
||||
/* Kernel mode? Handle exceptions or die */
|
||||
@ -252,7 +249,6 @@ bad_page_fault(struct pt_regs *regs, unsigned long address, int sig)
|
||||
if ((entry = search_exception_tables(regs->pc)) != NULL) {
|
||||
pr_debug("%s: Exception at pc=%#010lx (%lx)\n",
|
||||
current->comm, regs->pc, entry->fixup);
|
||||
current->thread.bad_uaddr = address;
|
||||
regs->pc = entry->fixup;
|
||||
return;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ static bool __report_matches(const struct expect_report *r)
|
||||
const bool is_assert = (r->access[0].type | r->access[1].type) & KCSAN_ACCESS_ASSERT;
|
||||
bool ret = false;
|
||||
unsigned long flags;
|
||||
typeof(observed.lines) expect;
|
||||
typeof(*observed.lines) *expect;
|
||||
const char *end;
|
||||
char *cur;
|
||||
int i;
|
||||
@ -168,6 +168,10 @@ static bool __report_matches(const struct expect_report *r)
|
||||
if (!report_available())
|
||||
return false;
|
||||
|
||||
expect = kmalloc(sizeof(observed.lines), GFP_KERNEL);
|
||||
if (WARN_ON(!expect))
|
||||
return false;
|
||||
|
||||
/* Generate expected report contents. */
|
||||
|
||||
/* Title */
|
||||
@ -253,6 +257,7 @@ static bool __report_matches(const struct expect_report *r)
|
||||
strstr(observed.lines[2], expect[1])));
|
||||
out:
|
||||
spin_unlock_irqrestore(&observed.lock, flags);
|
||||
kfree(expect);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user