From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
naveen.n.rao@linux.vnet.ibm.com, jniethe5@gmail.com
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 00/12] Cleanup use of 'struct ppc_inst'
Date: Wed, 19 May 2021 14:43:27 +0000 (UTC) [thread overview]
Message-ID: <cover.1621435024.git.christophe.leroy@csgroup.eu> (raw)
This series is a cleanup of the use of 'struct ppc_inst'.
A confusion is made between internal representation of powerpc
instructions with 'struct ppc_inst' and in-memory code which is
and will always be an array of 'unsigned int'.
This series cleans it up.
First patch is fixing detection of missing '__user' flag by sparse
when using get_user_instr().
Last part of the series does some source code cleanup in
optprobes, it is put at the ends of this series because of
clashes with the 'struct ppc_inst' cleanups.
Christophe Leroy (12):
powerpc/inst: Fix sparse detection on get_user_instr()
powerpc/inst: Reduce casts in get_user_instr()
powerpc/inst: Improve readability of get_user_instr() and friends
powerpc/inst: Avoid pointer dereferencing in ppc_inst_equal()
powerpc: Do not dereference code as 'struct ppc_inst' (uprobe,
code-patching, feature-fixups)
powerpc/lib/code-patching: Make instr_is_branch_to_addr() static
powerpc/lib/code-patching: Don't use struct 'ppc_inst' for runnable
code in tests.
powerpc: Don't use 'struct ppc_inst' to reference instruction location
powerpc/inst: Refactor PPC32 and PPC64 versions
powerpc/optprobes: Minimise casts
powerpc/optprobes: Compact code source a bit.
powerpc/optprobes: use PPC_RAW_ macros
arch/powerpc/include/asm/code-patching.h | 23 ++-
arch/powerpc/include/asm/inst.h | 95 +++++--------
arch/powerpc/include/asm/ppc-opcode.h | 11 +-
arch/powerpc/include/asm/uprobes.h | 4 +-
arch/powerpc/kernel/crash_dump.c | 4 +-
arch/powerpc/kernel/epapr_paravirt.c | 4 +-
arch/powerpc/kernel/jump_label.c | 2 +-
arch/powerpc/kernel/kgdb.c | 6 +-
arch/powerpc/kernel/kprobes.c | 17 ++-
arch/powerpc/kernel/mce_power.c | 2 +-
arch/powerpc/kernel/optprobes.c | 124 +++++-----------
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/trace/ftrace.c | 26 ++--
arch/powerpc/kernel/uprobes.c | 6 +-
arch/powerpc/lib/code-patching.c | 165 ++++++++++++----------
arch/powerpc/lib/feature-fixups.c | 98 ++++++-------
arch/powerpc/perf/core-book3s.c | 4 +-
arch/powerpc/platforms/86xx/mpc86xx_smp.c | 2 +-
arch/powerpc/platforms/powermac/smp.c | 4 +-
arch/powerpc/xmon/xmon.c | 10 +-
20 files changed, 274 insertions(+), 335 deletions(-)
--
2.25.0
next reply other threads:[~2021-05-19 14:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 14:43 Christophe Leroy [this message]
2021-05-19 14:43 ` [PATCH v1 01/12] powerpc/inst: Fix sparse detection on get_user_instr() Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 02/12] powerpc/inst: Reduce casts in get_user_instr() Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 03/12] powerpc/inst: Improve readability of get_user_instr() and friends Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 04/12] powerpc/inst: Avoid pointer dereferencing in ppc_inst_equal() Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 05/12] powerpc: Do not dereference code as 'struct ppc_inst' (uprobe, code-patching, feature-fixups) Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 06/12] powerpc/lib/code-patching: Make instr_is_branch_to_addr() static Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 07/12] powerpc/lib/code-patching: Don't use struct 'ppc_inst' for runnable code in tests Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 08/12] powerpc: Don't use 'struct ppc_inst' to reference instruction location Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 09/12] powerpc/inst: Refactor PPC32 and PPC64 versions Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 10/12] powerpc/optprobes: Minimise casts Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 11/12] powerpc/optprobes: Compact code source a bit Christophe Leroy
2021-05-19 14:43 ` [PATCH v1 12/12] powerpc/optprobes: use PPC_RAW_ macros Christophe Leroy
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.1621435024.git.christophe.leroy@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=benh@kernel.crashing.org \
--cc=jniethe5@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).