All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/12] riscv: switch to relative extable and other improvements
@ 2021-11-18 11:21 ` Jisheng Zhang
  0 siblings, 0 replies; 47+ messages in thread
From: Jisheng Zhang @ 2021-11-18 11:21 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Björn Töpel,
	Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Masahiro Yamada, Michal Marek, Nick Desaulniers
  Cc: Kefeng Wang, Tong Tiangen, linux-riscv, linux-kernel, netdev,
	bpf, linux-kbuild

From: Jisheng Zhang <jszhang@kernel.org>

Similar as other architectures such as arm64, x86 and so on, use
offsets relative to the exception table entry values rather than
absolute addresses for both the exception locationand the fixup.
And recently, arm64 and x86 remove anonymous out-of-line fixups, we
want to acchieve the same result.

patch1 remove unused macro.

patch2 consolidates the __ex_table construction, it's a great code
clean up even w/o the 2nd patch.

patch3 swith to relative extable.

The remaining patches are inspired by arm64 version. They remove
the anonymous out-of-line fixups for risv.

Since v3:
  - collect Reviewed-by tag for patch2 and patch3
  - add patch1 to remove unused macro
  - add patches to remove anonymous out-of-line fixups

Since v2:
  - directly check R_RISCV_SUB32 in __ex_table instead of adding
    addend_riscv_rela()

Since v1:
  - fix build error for NOMMU case, thank lkp@intel.com


Jisheng Zhang (12):
  riscv: remove unused __cmpxchg_user() macro
  riscv: consolidate __ex_table construction
  riscv: switch to relative exception tables
  riscv: bpf: move rv_bpf_fixup_exception signature to extable.h
  riscv: extable: make fixup_exception() return bool
  riscv: extable: use `ex` for `exception_table_entry`
  riscv: lib: uaccess: fold fixups into body
  riscv: extable: consolidate definitions
  riscv: extable: add `type` and `data` fields
  riscv: add gpr-num.h
  riscv: extable: add a dedicated uaccess handler
  riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove `.fixup` section

 arch/riscv/include/asm/Kbuild        |   1 -
 arch/riscv/include/asm/asm-extable.h |  65 +++++++++++
 arch/riscv/include/asm/extable.h     |  48 ++++++++
 arch/riscv/include/asm/futex.h       |  30 ++---
 arch/riscv/include/asm/gpr-num.h     |  77 +++++++++++++
 arch/riscv/include/asm/uaccess.h     | 162 ++++-----------------------
 arch/riscv/kernel/vmlinux-xip.lds.S  |   1 -
 arch/riscv/kernel/vmlinux.lds.S      |   3 +-
 arch/riscv/lib/uaccess.S             |  28 +++--
 arch/riscv/mm/extable.c              |  66 ++++++++---
 arch/riscv/net/bpf_jit_comp64.c      |   9 +-
 scripts/mod/modpost.c                |  15 +++
 scripts/sorttable.c                  |   4 +-
 13 files changed, 308 insertions(+), 201 deletions(-)
 create mode 100644 arch/riscv/include/asm/asm-extable.h
 create mode 100644 arch/riscv/include/asm/extable.h
 create mode 100644 arch/riscv/include/asm/gpr-num.h

-- 
2.33.0



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2022-01-24 17:03 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 11:21 [PATCH v4 0/12] riscv: switch to relative extable and other improvements Jisheng Zhang
2021-11-18 11:21 ` Jisheng Zhang
2021-11-18 11:22 ` [PATCH 01/12] riscv: remove unused __cmpxchg_user() macro Jisheng Zhang
2021-11-18 11:22   ` Jisheng Zhang
2021-11-18 11:22 ` [PATCH 02/12] riscv: consolidate __ex_table construction Jisheng Zhang
2021-11-18 11:22   ` Jisheng Zhang
2021-11-18 11:22 ` [PATCH 03/12] riscv: switch to relative exception tables Jisheng Zhang
2021-11-18 11:22   ` Jisheng Zhang
2021-11-19  2:09   ` tongtiangen
2021-11-19  2:09     ` tongtiangen
2021-11-18 11:23 ` [PATCH 04/12] riscv: bpf: move rv_bpf_fixup_exception signature to extable.h Jisheng Zhang
2021-11-18 11:23   ` Jisheng Zhang
2021-11-18 11:24 ` [PATCH 05/12] riscv: extable: make fixup_exception() return bool Jisheng Zhang
2021-11-18 11:24   ` Jisheng Zhang
2021-11-18 11:24 ` [PATCH 06/12] riscv: extable: use `ex` for `exception_table_entry` Jisheng Zhang
2021-11-18 11:24   ` Jisheng Zhang
2021-11-18 11:25 ` [PATCH 07/12] riscv: lib: uaccess: fold fixups into body Jisheng Zhang
2021-11-18 11:25   ` Jisheng Zhang
2021-11-18 11:25 ` [PATCH 08/12] riscv: extable: consolidate definitions Jisheng Zhang
2021-11-18 11:25   ` Jisheng Zhang
2021-11-18 11:26 ` [PATCH 09/12] riscv: extable: add `type` and `data` fields Jisheng Zhang
2021-11-18 11:26   ` Jisheng Zhang
2021-11-18 11:42   ` Jisheng Zhang
2021-11-18 11:42     ` Jisheng Zhang
2021-11-18 15:21     ` Mark Rutland
2021-11-18 15:21       ` Mark Rutland
2022-01-06  3:21       ` Palmer Dabbelt
2022-01-06  3:21         ` Palmer Dabbelt
2022-01-06 10:23         ` Mark Rutland
2022-01-06 10:23           ` Mark Rutland
2021-11-19  2:35   ` tongtiangen
2021-11-19  2:35     ` tongtiangen
2021-11-18 11:26 ` [PATCH 10/12] riscv: add gpr-num.h Jisheng Zhang
2021-11-18 11:26   ` Jisheng Zhang
2021-11-18 11:26 ` [PATCH 11/12] riscv: extable: add a dedicated uaccess handler Jisheng Zhang
2021-11-18 11:26   ` Jisheng Zhang
2021-11-18 17:31   ` kernel test robot
2022-01-20 18:15   ` Mayuresh Chitale
2022-01-20 18:15     ` Mayuresh Chitale
2022-01-21 12:16     ` Jisheng Zhang
2022-01-21 12:16       ` Jisheng Zhang
2022-01-23  9:12       ` Jisheng Zhang
2022-01-23  9:12         ` Jisheng Zhang
2022-01-24 17:02         ` Mayuresh Chitale
2022-01-24 17:02           ` Mayuresh Chitale
2021-11-18 11:27 ` [PATCH 12/12] riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove `.fixup` section Jisheng Zhang
2021-11-18 11:27   ` Jisheng Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.