summaryrefslogtreecommitdiff
path: root/arch/s390/net
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-02-28 14:52:42 +0100
committerVasily Gorbik <gor@linux.ibm.com>2022-03-08 00:33:00 +0100
commit3d66718cd62d45f3210f047248eab9e76d227e47 (patch)
tree5f2aa9740d8a8dae078cade30935e59b94fb6497 /arch/s390/net
parent46fee16f571250d6cef74af73ffd47512da981a2 (diff)
s390/extable: convert to relative table with data
Follow arm64, riscv, and x86 and change extable layout to common "relative table with data". This allows to get rid of s390 specific code in sorttable.c. The main difference to before is that extable entries do not contain a relative function pointer anymore. Instead data and type fields are added. The type field is used to indicate which exception handler needs to be called, while the data field is currently unused. Acked-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/net')
-rw-r--r--arch/s390/net/bpf_jit_comp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index f884d1b9ca79..a1a3a10c514c 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -622,8 +622,7 @@ static int get_probe_mem_regno(const u8 *insn)
return insn[1] >> 4;
}
-static bool ex_handler_bpf(const struct exception_table_entry *x,
- struct pt_regs *regs)
+bool ex_handler_bpf(const struct exception_table_entry *x, struct pt_regs *regs)
{
int regno;
u8 *insn;
@@ -678,7 +677,7 @@ static int bpf_jit_probe_mem(struct bpf_jit *jit, struct bpf_prog *fp,
/* JIT bug - landing pad and extable must be close. */
return -1;
ex->fixup = delta;
- ex->handler = (u8 *)ex_handler_bpf - (u8 *)&ex->handler;
+ ex->type = EX_TYPE_BPF;
jit->excnt++;
}
return 0;