linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 resend 0/6] generic relative extable support
@ 2016-01-27 10:55 Ard Biesheuvel
  2016-01-27 10:55 ` [PATCH v2 resend 1/6] extable: add support for relative extables to search and sort routines Ard Biesheuvel
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2016-01-27 10:55 UTC (permalink / raw)
  To: akpm, linux-alpha, linux-kernel, linux-arm-kernel, linux-ia64,
	linux-s390, x86, hpa, heiko.carstens, rth, tony.luck, will.deacon
  Cc: deller, Ard Biesheuvel

There are currently four architectures (x86, ia64, alpha and s390) whose
user-access exception tables are relative to the table entry address rather
than absolute. Each of these architectures has its own search_extable() and
sort_extable() implementation, which are not only mostly identical to each
other, but also deviate very little from the generic absolute implementations
in lib/extable.c that they override.

So before making arm64 the fifth architecture that reimplements this, let's
refactor the existing code so that all of these architectures use common code
for searching and sorting the relative extables. Archs may set
ARCH_HAS_RELATIVE_EXTABLE to indicate that the table consists of a pair of
relative ints, and may define swap_ex_entry_fixup() if the fixup member needs
special treatment in the swapping step of the sorting routine (such as alpha).

This version is identical to v2, with the exception of an added ack from Richard
Henderson for the alpha patch (#2), and, by implication, for patch #1.

Changes since v2:
- introduce the _ASM_EXTABLE() cpp macro for arm64, and replace all open coded
  exception table entries with it, including an instance I missed in v1 in
  asm/word-at-a-time.h (suggested by hpa)
- added acks to from arch maintainers

NOTE: I took the liberty of carrying over each arch specific ack to the generic
shared first patch, since they are tightly coupled anyway. If anyone objects to
this, please let me know.

@Andrew: I was wondering if this was also something that could be taken through
your tree? It has acks for each of the architectures it touches, and it rebased
cleanly from v4.4 to v4.5-rc1.

Ard Biesheuvel (6):
  extable: add support for relative extables to search and sort routines
  alpha/extable: use generic search and sort routines
  s390/extable: use generic search and sort routines
  x86/extable: use generic search and sort routines
  ia64/extable: use generic search and sort routines
  arm64: switch to relative exception tables

 arch/alpha/include/asm/uaccess.h        |  10 +-
 arch/alpha/mm/Makefile                  |   2 +-
 arch/alpha/mm/extable.c                 |  92 -----------------
 arch/arm64/include/asm/assembler.h      |  15 ++-
 arch/arm64/include/asm/futex.h          |  12 +--
 arch/arm64/include/asm/uaccess.h        |  30 +++---
 arch/arm64/include/asm/word-at-a-time.h |   7 +-
 arch/arm64/kernel/armv8_deprecated.c    |   7 +-
 arch/arm64/mm/extable.c                 |   2 +-
 arch/ia64/include/asm/uaccess.h         |   8 +-
 arch/ia64/mm/extable.c                  |  97 +-----------------
 arch/s390/include/asm/uaccess.h         |   8 +-
 arch/s390/mm/Makefile                   |   2 +-
 arch/s390/mm/extable.c                  |  85 ----------------
 arch/x86/include/asm/uaccess.h          |   5 +-
 arch/x86/mm/extable.c                   | 106 +-------------------
 lib/extable.c                           |  50 +++++++--
 scripts/sortextable.c                   |   2 +-
 18 files changed, 98 insertions(+), 442 deletions(-)
 delete mode 100644 arch/alpha/mm/extable.c
 delete mode 100644 arch/s390/mm/extable.c

-- 
2.5.0


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

end of thread, other threads:[~2016-01-27 19:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 10:55 [PATCH v2 resend 0/6] generic relative extable support Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 1/6] extable: add support for relative extables to search and sort routines Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 2/6] alpha/extable: use generic " Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 3/6] s390/extable: " Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 4/6] x86/extable: " Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 5/6] ia64/extable: " Ard Biesheuvel
2016-01-27 10:55 ` [PATCH v2 resend 6/6] arm64: switch to relative exception tables Ard Biesheuvel
2016-01-27 19:35   ` Andrew Morton
2016-01-27 19:39     ` Ard Biesheuvel
2016-01-27 19:46       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).