mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 0/9] sandbox: use native setjmp/longjmp/initjmp implementation by default
Date: Mon, 25 Nov 2024 16:35:14 +0100	[thread overview]
Message-ID: <20241125153523.1411849-1-a.fatoum@pengutronix.de> (raw)

In order to implement initjmp, we have two ways with available
functionality: The sigaltstack we are currently using and
makecontext/swapcontext. makecontext/swapcontext are unfortunately
deprecated in favor of POSIX threads and the sigaltstack runs afoul of
AddressSanitizer when compiled with clang.

This series fixes this by using the already existent assembly
implementations

Ahmad Fatoum (9):
  sandbox: asm: support inclusion from sandbox os support code
  test: self: setjmp: add simple initial testcase
  sandbox: source/invoke um Makefiles provided by host architecture
  sandbox: setjmp: mark C version as __weak
  sandbox: use native setjmp/longjmp/initjmp implementation by default
  sandbox: retire HAVE_ARCH_ASAN
  bthread: move asan fiber API into header
  test: self: setjmp: make compatible with ASAN
  bthread: fix use of ASAN fiber stack switch API

 Makefile                           |  2 +
 arch/Kconfig                       |  3 ++
 arch/arm/include/asm/setjmp.h      |  2 +
 arch/arm/um/Makefile               | 12 +++++
 arch/kvx/include/asm/setjmp.h      |  2 +
 arch/kvx/um/Makefile               |  6 +++
 arch/mips/include/asm/setjmp.h     |  2 +
 arch/mips/um/Makefile              |  6 +++
 arch/openrisc/include/asm/setjmp.h |  2 +
 arch/openrisc/um/Makefile          |  6 +++
 arch/powerpc/include/asm/setjmp.h  |  2 +
 arch/powerpc/um/Makefile           |  6 +++
 arch/riscv/include/asm/setjmp.h    |  2 +
 arch/riscv/um/Makefile             |  6 +++
 arch/sandbox/Kconfig               | 10 +++-
 arch/sandbox/Makefile              |  9 ++++
 arch/sandbox/include/asm/setjmp.h  | 44 +++++++++++++++-
 arch/sandbox/os/setjmp.c           |  6 +--
 arch/x86/include/asm/setjmp.h      |  2 +
 arch/x86/um/Makefile               | 12 +++++
 common/Kconfig                     |  3 --
 common/Kconfig.debug               |  5 +-
 common/bthread.c                   | 67 ++++++-----------------
 include/asm-generic/setjmp.h       | 27 ++++++++++
 scripts/subarch.include            | 11 ++++
 test/self/setjmp.c                 | 85 ++++++++++++++++++++++--------
 26 files changed, 260 insertions(+), 80 deletions(-)
 create mode 100644 arch/arm/um/Makefile
 create mode 100644 arch/kvx/um/Makefile
 create mode 100644 arch/mips/um/Makefile
 create mode 100644 arch/openrisc/um/Makefile
 create mode 100644 arch/powerpc/um/Makefile
 create mode 100644 arch/riscv/um/Makefile
 create mode 100644 arch/x86/um/Makefile
 create mode 100644 include/asm-generic/setjmp.h
 create mode 100644 scripts/subarch.include

-- 
2.39.5




             reply	other threads:[~2024-11-25 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 15:35 Ahmad Fatoum [this message]
2024-11-25 15:35 ` [PATCH 1/9] sandbox: asm: support inclusion from sandbox os support code Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 2/9] test: self: setjmp: add simple initial testcase Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 3/9] sandbox: source/invoke um Makefiles provided by host architecture Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 4/9] sandbox: setjmp: mark C version as __weak Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 5/9] sandbox: use native setjmp/longjmp/initjmp implementation by default Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 6/9] sandbox: retire HAVE_ARCH_ASAN Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 7/9] bthread: move asan fiber API into header Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 8/9] test: self: setjmp: make compatible with ASAN Ahmad Fatoum
2024-11-25 15:35 ` [PATCH 9/9] bthread: fix use of ASAN fiber stack switch API Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241125153523.1411849-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox