linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Sathvika Vasireddy <sv@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH v1 0/3] powerpc/objtool: First step towards uaccess validation (v1)
Date: Fri, 16 Jun 2023 15:47:49 +0200	[thread overview]
Message-ID: <cover.1686922583.git.christophe.leroy@csgroup.eu> (raw)

This RFC is a first step towards the validation of userspace accesses.

For the time being it targets only PPC32 and includes hacks directly in
core part of objtool.

It doesn't yet include handling of uaccess at all but is a first step
to support objtool validation.

Assembly files have been kept aside as they require a huge work before
being ready for objtool validation and are not directly relevant for
uaccess validation.

Please have a look and hold hand if I'm going in the wrong direction.

For the few hacks done directly in the core part of objtool don't
hesitate to suggest ways to make it more generic.

Christophe Leroy (3):
  Revert "powerpc/bug: Provide better flexibility to
    WARN_ON/__WARN_FLAGS() with asm goto"
  powerpc: Mark all .S files invalid for objtool
  powerpc: WIP draft support to objtool check

 arch/powerpc/Kconfig                          |  1 +
 arch/powerpc/boot/Makefile                    | 17 +++++
 arch/powerpc/crypto/Makefile                  | 13 ++++
 arch/powerpc/include/asm/book3s/64/kup.h      |  2 +-
 arch/powerpc/include/asm/bug.h                | 67 +++----------------
 arch/powerpc/include/asm/extable.h            | 14 ----
 arch/powerpc/include/asm/ppc_asm.h            | 11 ++-
 arch/powerpc/kernel/Makefile                  | 44 ++++++++++++
 arch/powerpc/kernel/misc_32.S                 |  2 +-
 arch/powerpc/kernel/trace/Makefile            |  4 ++
 arch/powerpc/kernel/traps.c                   |  9 +--
 arch/powerpc/kernel/vdso/Makefile             | 11 +++
 arch/powerpc/kexec/Makefile                   |  2 +
 arch/powerpc/kvm/Makefile                     | 13 ++++
 arch/powerpc/lib/Makefile                     | 25 +++++++
 arch/powerpc/mm/book3s32/Makefile             |  3 +
 arch/powerpc/mm/nohash/Makefile               |  3 +
 arch/powerpc/perf/Makefile                    |  2 +
 arch/powerpc/platforms/44x/Makefile           |  2 +
 arch/powerpc/platforms/52xx/Makefile          |  3 +
 arch/powerpc/platforms/83xx/Makefile          |  2 +
 arch/powerpc/platforms/cell/spufs/Makefile    |  3 +
 arch/powerpc/platforms/pasemi/Makefile        |  2 +
 arch/powerpc/platforms/powermac/Makefile      |  3 +
 arch/powerpc/platforms/powernv/Makefile       |  3 +
 arch/powerpc/platforms/ps3/Makefile           |  2 +
 arch/powerpc/platforms/pseries/Makefile       |  2 +
 arch/powerpc/purgatory/Makefile               |  3 +
 arch/powerpc/sysdev/Makefile                  |  3 +
 arch/powerpc/xmon/Makefile                    |  3 +
 scripts/Makefile.lib                          |  2 +-
 tools/objtool/arch/powerpc/decode.c           | 60 +++++++++++++++--
 .../arch/powerpc/include/arch/special.h       |  2 +-
 tools/objtool/arch/powerpc/special.c          | 44 +++++++++++-
 tools/objtool/check.c                         | 29 ++++----
 tools/objtool/include/objtool/elf.h           |  1 +
 tools/objtool/include/objtool/special.h       |  2 +-
 .../powerpc/primitives/asm/extable.h          |  1 -
 38 files changed, 311 insertions(+), 104 deletions(-)
 delete mode 120000 tools/testing/selftests/powerpc/primitives/asm/extable.h

-- 
2.40.1


             reply	other threads:[~2023-06-16 14:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 13:47 Christophe Leroy [this message]
2023-06-16 13:47 ` [RFC PATCH v1 1/3] Revert "powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto" Christophe Leroy
2023-06-20  5:21   ` Naveen N Rao
2023-06-20  7:10     ` Peter Zijlstra
2023-06-16 13:47 ` [RFC PATCH v1 2/3] powerpc: Mark all .S files invalid for objtool Christophe Leroy
2023-06-20  6:04   ` Naveen N Rao
2023-06-20  6:15     ` Christophe Leroy
2023-06-20  6:40       ` Naveen N Rao
2023-06-16 13:47 ` [RFC PATCH v1 3/3] powerpc: WIP draft support to objtool check Christophe Leroy
2023-06-16 14:43   ` Peter Zijlstra

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=cover.1686922583.git.christophe.leroy@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=sv@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).