On Mon, Dec 11, 2023 at 11:12:42PM -0800, Christoph Hellwig wrote:
> On Thu, Dec 07, 2023 at 10:49:53PM -0600, Samuel Holland wrote:
> > Actually tracking all possibly-FPU-tainted functions and their call sites is
> > probably possible, but a much larger task.
>
> I think objtool should be able
On Sat, Jun 24, 2023 at 08:30:48AM +, Christophe Leroy wrote:
> >>> vmlinux.o: warning: objtool: ibt_selftest+0x14 (.text+0x92b54): sibling
> >>> call from callable instruction with modified stack frame
> > vmlinux.o: warning: objtool: .altinstr_replacement+0x19a4: redundant
> > UACCESS
On Wed, Jun 21, 2023 at 05:20:31PM +0200, Christophe Leroy wrote:
> Most of the time objtool warnings are useless without the
> absolute address within the section.
>
> Today there is --sec-address option to get it printed, but
> that option is nowhere used and requires a change in Makefile
> to
a69b507...@google.com
> (sorry for the spam with v2, mrincon is helping me get kinks worked out
> with b4 and our corporate mailer)
Acked-by: Josh Poimboeuf
--
Josh
On Thu, Feb 16, 2023 at 10:42:52AM -0800, Josh Poimboeuf wrote:
> Include to make sure play_dead() matches its prototype going
> forward.
>
> Acked-by: Florian Fainelli
> Reviewed-by: Philippe Mathieu-Daudé
> Signed-off-by: Josh Poimboeuf
The latest version of this pat
n_book3s symbol with the
> SYM_FUNC_START_LOCAL and SYM_FUNC_END macros.
>
> Reported-by: Stephen Rothwell
> Signed-off-by: Sathvika Vasireddy
Suggested-by: Josh Poimboeuf
--
Josh
On Fri, Feb 17, 2023 at 12:35:17PM +1100, Michael Ellerman wrote:
> Josh Poimboeuf writes:
> > On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote:
> >> Hi all,
> >>
> >> After merging the powerpc tree, today's linux-next build (powerpc
Include to make sure play_dead() matches its prototype going
forward.
Acked-by: Florian Fainelli
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Josh Poimboeuf
---
arch/mips/cavium-octeon/smp.c | 1 +
arch/mips/kernel/smp-bmips.c | 1 +
arch/mips/kernel/smp-cps.c| 1 +
arch/mips
cpu_die() doesn't return. Annotate it as such. By extension this also
makes arch_cpu_idle_dead() noreturn.
Acked-by: Mark Rutland
Signed-off-by: Josh Poimboeuf
---
arch/arm64/include/asm/smp.h | 2 +-
arch/arm64/kernel/smp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff
arch_cpu_idle_dead() doesn't return. Make that visible to the compiler
with an unreachable() code annotation.
Signed-off-by: Josh Poimboeuf
---
arch/arm/kernel/smp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 0b8c25763adc
On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the powerpc tree, today's linux-next build (powerpc
> pseries_le_defconfig) produced this warning:
>
> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: unannotated
> intra-function call
>
On Wed, Feb 15, 2023 at 01:09:21PM +, Mark Rutland wrote:
> On Tue, Feb 14, 2023 at 09:13:08AM +0100, Philippe Mathieu-Daudé wrote:
> > On 14/2/23 08:05, Josh Poimboeuf wrote:
> > > cpu_die() doesn't return. Annotate it as such. By extension this also
> > &g
On Tue, Feb 14, 2023 at 11:48:41AM -0800, Max Filippov wrote:
> On Tue, Feb 14, 2023 at 10:23 AM Josh Poimboeuf wrote:
> > On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote:
> > > Can you update the documentation along? Currently we have:
> > >
&
On Tue, Feb 14, 2023 at 11:15:23AM +, Russell King (Oracle) wrote:
> On Mon, Feb 13, 2023 at 11:05:37PM -0800, Josh Poimboeuf wrote:
> > arch_cpu_idle_dead() doesn't return. Make that more explicit with a
> > BUG().
> >
> > BUG() is preferable to unreachabl
On Tue, Feb 14, 2023 at 10:25:50AM +0100, Philippe Mathieu-Daudé wrote:
> On 14/2/23 08:05, Josh Poimboeuf wrote:
> > v2:
> > - make arch_call_rest_init() and rest_init() __noreturn
> > - make objtool 'global_returns' work for weak functions
> > - rebase on tip/obj
On Tue, Feb 14, 2023 at 08:57:39AM +0100, Philippe Mathieu-Daudé wrote:
> On 14/2/23 08:05, Josh Poimboeuf wrote:
> > play_dead() doesn't return. Make that more explicit with a BUG().
> >
> > BUG() is preferable to unreachable() because BUG() is a more explicit
> &
On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote:
> Hi Josh,
>
> On 14/2/23 08:05, Josh Poimboeuf wrote:
> > cpu_die() doesn't return. Make that more explicit with a BUG().
> >
> > BUG() is preferable to unreachable() because BUG() is a mor
On Tue, Feb 14, 2023 at 08:46:41AM +0100, Philippe Mathieu-Daudé wrote:
> Hi Josh,
>
> On 14/2/23 08:05, Josh Poimboeuf wrote:
> > Include to make sure play_dead() matches its prototype going
> > forward.
> >
> > Acked-by: Florian Fainelli
> > Signed-off
h-specific
implementation might return. It also improves code generation for both
caller and callee.
Also fixes the following warning:
vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction
Reported-by: Paul E. McKenney
Tested-by: Paul E. McKenney
Signed-off-by: Josh Poimboeuf
arch_call_rest_init() and rest_init() don't return. Annotate them as
such.
Fixes the following warning:
init/main.o: warning: objtool: start_kernel+0x4ad: unreachable instruction
Signed-off-by: Josh Poimboeuf
---
arch/s390/kernel/setup.c | 2 +-
include/linux/start_kernel.h | 4
If a global __noreturn function prototype has a corresponding weak
function, it should also be __noreturn.
Signed-off-by: Josh Poimboeuf
---
tools/objtool/check.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index
arch_cpu_idle_dead() should never return. Make it so.
Signed-off-by: Josh Poimboeuf
---
kernel/sched/idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index e9ef66be2870..56e152f06d0f 100644
--- a/kernel/sched/idle.c
+++ b
cpu_die() doesn't return. Annotate it as such. By extension this also
makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/xtensa/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/include/asm/smp.h b/arch/xtensa/include
cpu_die() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/smp.h | 2 +-
arch/x86/kernel/process.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include
e function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/smp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index b4dbb20dab1a..8f628e08b25a 100644
--- a/arch/x86/include/asm/smp.h
+++
cpu_play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/sparc/include/asm/smp_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc
Include to make sure arch_cpu_idle_dead() matches its
prototype going forward.
Signed-off-by: Josh Poimboeuf
---
arch/sh/kernel/idle.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 3418c40f0099..114f0c4abeac 100644
--- a/arch/sh/kernel
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/sh/include/asm/smp-ops.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/include/asm/smp-ops.h b/arch/sh/include
play_dead() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
start_secondary_resume() doesn't return. Annotate it as such. By
extension this also makes arch_cpu_idle_dead() noreturn.
Acked-by: Michael Ellerman (powerpc)
Signed-off-by: Josh Poimboeuf
---
arch/powerpc/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Acked-by: Florian Fainelli
Signed-off-by: Josh Poimboeuf
---
arch/mips/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm
-off-by: Josh Poimboeuf
---
arch/mips/kernel/smp-bmips.c | 2 ++
arch/mips/loongson64/smp.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index df9158e8329d..be85fa075830 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips
Include to make sure play_dead() matches its prototype going
forward.
Acked-by: Florian Fainelli
Signed-off-by: Josh Poimboeuf
---
arch/mips/kernel/smp-bmips.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index f5d7bfa3472a
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/loongarch/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch
play_dead() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/ia64/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel
-off-by: Josh Poimboeuf
---
arch/csky/kernel/smp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/csky/kernel/smp.c b/arch/csky/kernel/smp.c
index b45d1073307f..0ec20efaf5fd 100644
--- a/arch/csky/kernel/smp.c
+++ b/arch/csky/kernel/smp.c
@@ -317,5 +317,7 @@ void arch_cpu_idle_dead(void
cpu_die() doesn't return. Annotate it as such. By extension this also
makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/arm64/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm
arch_cpu_idle_dead() doesn't return. Make that more explicit with a
BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh
Include to make sure arch_cpu_idle_dead() matches its
prototype going forward.
Signed-off-by: Josh Poimboeuf
---
arch/alpha/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index ce20c31828a0..d1f2e8b6b107 100644
arch_cpu_idle_dead() doesn't return. Make that more explicit with a
BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh
v2:
- make arch_call_rest_init() and rest_init() __noreturn
- make objtool 'global_returns' work for weak functions
- rebase on tip/objtool/core with dependencies merged in (mingo)
- add acks
v1.1:
- add __noreturn to all arch_cpu_idle_dead() implementations (mpe)
Josh Poimboeuf (24):
alpha
h-specific
implementation might return. It also improves code generation for both
caller and callee.
Also fixes the following warning:
vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction
Reported-by: Paul E. McKenney
Tested-by: Paul E. McKenney
Signed-off-by: Josh Poimboeuf
On Mon, Feb 06, 2023 at 10:10:22PM +1100, Michael Ellerman wrote:
> Josh Poimboeuf writes:
> > start_secondary_resume() doesn't return. Annotate it as such. By
> > extension this also makes arch_cpu_idle_dead() noreturn.
>
> Can we also mark arch_cpu_idle_dead() (the C
On Sun, Feb 05, 2023 at 11:46:12AM +1100, Michael Ellerman wrote:
> Josh Poimboeuf writes:
> > On Tue, Jan 24, 2023 at 07:38:03PM -0800, Josh Poimboeuf wrote:
> >> Fix a livepatch bug seen when reloading a patched module.
> >>
> >> This is the powerpc counter
On Tue, Jan 24, 2023 at 07:38:03PM -0800, Josh Poimboeuf wrote:
> Fix a livepatch bug seen when reloading a patched module.
>
> This is the powerpc counterpart to Song Liu's fix for a similar issue on
> x86:
>
> https://lkml.kernel.org/lkml/20230121004945.697003-2-s...@ke
On Sat, Feb 04, 2023 at 02:10:34PM +0100, Christophe Leroy wrote:
> Ok, got the same problem as you with next-20230203
>
> DESCEND objtool
> :1:10: fatal error: libelf.h: No such file or directory
> compilation terminated.
> HOSTCC /home/chleroy/linux-powerpc/tools/objtool/fixdep.o
>
On Sat, Feb 04, 2023 at 09:12:31AM +0800, Guo Ren wrote:
> On Sat, Feb 4, 2023 at 6:05 AM Josh Poimboeuf wrote:
> >
> > arch_cpu_idle_dead() doesn't return. Make that more explicit with a
> > BUG().
> >
> > BUG() is preferable to unreachable() because BUG() is
h-specific
implementation might return. It also improves code generation for both
caller and callee.
Also fixes the following warning:
vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction
Reported-by: Paul E. McKenney
Tested-by: Paul E. McKenney
Signed-off-by: Josh
arch_cpu_idle_dead() should never return. Make it so.
Signed-off-by: Josh Poimboeuf
---
kernel/sched/idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index e9ef66be2870..56e152f06d0f 100644
--- a/kernel/sched/idle.c
+++ b
cpu_die() doesn't return. Annotate it as such. By extension this also
makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/xtensa/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/xtensa/include/asm/smp.h b/arch/xtensa/include
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/smp.h | 2 +-
arch/x86/kernel/process.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include
cpu_die() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
e function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/smp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index b4dbb20dab1a..8f628e08b25a 100644
--- a/arch/x86/include/asm/smp.h
+++
Include to make sure arch_cpu_idle_dead() matches its
prototype going forward.
Signed-off-by: Josh Poimboeuf
---
arch/sh/kernel/idle.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c
index 3418c40f0099..114f0c4abeac 100644
--- a/arch/sh/kernel
cpu_play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/sparc/include/asm/smp_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc
play_dead() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/sh/include/asm/smp-ops.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sh/include/asm/smp-ops.h b/arch/sh/include
start_secondary_resume() doesn't return. Annotate it as such. By
extension this also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/powerpc/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/smp.h b/arch
play_dead() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/mips/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/smp.h b/arch/mips/include/asm
Include to make sure play_dead() matches its prototype going
forward.
Signed-off-by: Josh Poimboeuf
---
arch/mips/kernel/smp-bmips.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index f5d7bfa3472a..df9158e8329d 100644
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/loongarch/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch
play_dead() doesn't return. Make that more explicit with a BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh Poimboeuf
play_dead() doesn't return. Annotate it as such. By extension this
also makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/ia64/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel
arch_cpu_idle_dead() doesn't return. Make that more explicit with a
BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh
cpu_die() doesn't return. Annotate it as such. By extension this also
makes arch_cpu_idle_dead() noreturn.
Signed-off-by: Josh Poimboeuf
---
arch/arm64/include/asm/smp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm
arch_cpu_idle_dead() doesn't return. Make that more explicit with a
BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh
] 076cbf5d2163 ("x86/xen: don't let xen_pv_play_dead() return")
Josh Poimboeuf (22):
alpha/cpu: Expose arch_cpu_idle_dead()'s prototype declaration
alpha/cpu: Make sure arch_cpu_idle_dead() doesn't return
arm/cpu: Make sure arch_cpu_idle_dead() doesn't return
arm64/cpu: Ma
arch_cpu_idle_dead() doesn't return. Make that more explicit with a
BUG().
BUG() is preferable to unreachable() because BUG() is a more explicit
failure mode and avoids undefined behavior like falling off the edge of
the function into whatever code happens to be next.
Signed-off-by: Josh
Include to make sure arch_cpu_idle_dead() matches its
prototype going forward.
Signed-off-by: Josh Poimboeuf
---
arch/alpha/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index 0eddd22c6212..4813172547b5 100644
On Wed, Jan 25, 2023 at 09:36:02AM -0800, Song Liu wrote:
> On Wed, Jan 25, 2023 at 8:46 AM Josh Poimboeuf wrote:
> >
> > On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote:
> > > > @@ -514,9 +515,18 @@ static int restore_r2(const char *name, u32
> > &g
On Tue, Jan 24, 2023 at 10:09:56PM -0800, Song Liu wrote:
> > @@ -514,9 +515,18 @@ static int restore_r2(const char *name, u32
> > *instruction, struct module *me)
> > if (!instr_is_relative_link_branch(ppc_inst(*prev_insn)))
> > return 0;
> >
> > - if (*instruction
restore_r2() returns 1 on success, which is surprising for a non-boolean
function. Change it to return 0 on success and -errno on error to match
kernel coding convention.
Signed-off-by: Josh Poimboeuf
---
arch/powerpc/kernel/module_64.c | 15 ++-
1 file changed, 6 insertions(+), 9
Fix a livepatch bug seen when reloading a patched module.
This is the powerpc counterpart to Song Liu's fix for a similar issue on
x86:
https://lkml.kernel.org/lkml/20230121004945.697003-2-s...@kernel.org
Josh Poimboeuf (2):
powerpc/module_64: Improve restore_r2() return semantics
powerpc
function was patched the first time. So the instruction
wasn't a nop as expected.
When the restore r2 instruction has already been patched in, detect that
and skip the warning and the instruction write.
Signed-off-by: Josh Poimboeuf
---
arch/powerpc/kernel/module_64.c | 14 --
1 file
On Mon, Nov 14, 2022 at 12:21:33PM +, Christophe Leroy wrote:
> Gentle ping ... Can this fix be merged ?
Thanks for the reminder. Looks good, I'll go ahead and take it.
--
Josh
On Tue, Oct 11, 2022 at 01:20:02PM -0700, Josh Poimboeuf wrote:
> On Mon, Oct 10, 2022 at 05:19:02PM +0530, Naveen N. Rao wrote:
> > All the above changes are down to compiler optimizations and shuffling due
> > to CONFIG_OBJTOOL being enabled and changing annot
On Mon, Oct 10, 2022 at 05:07:46PM +0530, Naveen N. Rao wrote:
> > +++ b/scripts/Makefile.lib
> > @@ -234,6 +234,7 @@ objtool_args =
> > \
> > $(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \
> > $(if
On Wed, Sep 28, 2022 at 08:44:27AM -0700, Nathan Chancellor wrote:
> This crash appears to just be a symptom of objtool erroring throughout
> the entire build, which means things like the jump label hacks do not
> get applied. I see a flood of
>
> error: objtool: --mnop requires --mcount
>
>
On Mon, Sep 12, 2022 at 06:31:14AM -0500, Segher Boessenkool wrote:
> Hi!
>
> On Fri, Sep 09, 2022 at 11:07:04AM -0700, Josh Poimboeuf wrote:
> > 2) Noreturn functions:
> >
> >There's no reliable way to determine which functions are designated
> >by th
On Tue, Sep 13, 2022 at 04:13:52PM +0200, Peter Zijlstra wrote:
> On Mon, Sep 12, 2022 at 01:50:04PM +0530, Sathvika Vasireddy wrote:
> > Christophe Leroy (4):
> > objtool: Fix SEGFAULT
> > objtool: Use target file endianness instead of a compiled constant
> > objtool: Use target file class
On Tue, Sep 13, 2022 at 03:51:44PM -0700, Indu Bhagat wrote:
> Curious to know what all features of objtool rely on the need to reverse
> engineer the control flow graph. Is it a larger set or it is only for ORC
> generation ?
Objtool features which rely on the CFG:
- Frame pointer rule
On Mon, Sep 12, 2022 at 02:17:36PM +, Michael Matz wrote:
> Hey,
Hi Michael,
Thanks for looking at this.
> On Mon, 12 Sep 2022, Borislav Petkov wrote:
>
> > Micha, any opinions on the below are appreciated.
> >
> > On Fri, Sep 09, 2022 at 11:07:04AM
Hi,
Here's a preview of what I'm planning to discuss at the LPC toolchains
microconference. Feel free to start the discussion early :-)
This is a proposal for some new minor GCC/Clang features which would
help objtool greatly.
Background
--
Objtool is a kernel-specific tool which
On Thu, May 12, 2022 at 02:52:40PM +, Christophe Leroy wrote:
> Hi Josh,
>
> Le 28/03/2022 à 21:59, Josh Poimboeuf a écrit :
> > On Sun, Mar 27, 2022 at 09:09:20AM +, Christophe Leroy wrote:
> >> What are current works in progress on objtool ? Should I wait Jo
the normal way.
Acked-by: Peter Zijlstra (Intel)
Acked-by: Sven Schnelle # s390
Reviewed-by: Mark Rutland
Tested-by: Mark Rutland [arm64]
Acked-by: Michael Ellerman (powerpc)
Acked-by: Catalin Marinas
Signed-off-by: Josh Poimboeuf
---
v2:
- fix ppc64le C macros (and actually test them)
arch
On Mon, May 09, 2022 at 10:31:14PM +1000, Michael Ellerman wrote:
> Embarrassingly, we have another copy of the logic, used in the C
> versions, they need updating too:
Oops, thanks for finding that.
> With that added it seems to be working correctly for me.
>
> Acked-by: Michael Ellerman
the normal way.
Signed-off-by: Josh Poimboeuf
---
arch/arm64/include/asm/asm-bug.h | 4 ++--
arch/powerpc/include/asm/bug.h | 5 +++--
arch/riscv/include/asm/bug.h | 4 ++--
arch/s390/include/asm/bug.h | 5 +++--
arch/x86/include/asm/bug.h | 2 +-
lib/bug.c
On Tue, Mar 29, 2022 at 05:32:18PM +, Christophe Leroy wrote:
>
>
> Le 29/03/2022 à 14:01, Michael Ellerman a écrit :
> > Josh Poimboeuf writes:
> >> On Sun, Mar 27, 2022 at 09:09:20AM +, Christophe Leroy wrote:
> >>> Second point is the endianess
On Mon, Mar 28, 2022 at 10:14:38PM +0200, Peter Zijlstra wrote:
> > FWIW, there have been some objtool patches for arm64 stack validation,
> > but the arm64 maintainers have been hesitant to get on board with
> > objtool, as it brings a certain maintenance burden. Especially for the
> > full
On Sun, Mar 27, 2022 at 09:09:20AM +, Christophe Leroy wrote:
> Second point is the endianess and 32/64 selection, especially when
> crossbuilding. There is already some stuff regarding endianess based on
> bswap_if_needed() but that's based on constant selection at build time
> and I
On Fri, Mar 18, 2022 at 04:21:37PM +0530, Sathvika Vasireddy wrote:
> This patchset adds support to implement 'objtool mcount' command.
>
> Right now, objtool is built if CONFIG_STACK_VALIDATION is enabled.
> And, '__mcount_loc' section is generated by objtool when --mcount
> option is passed to
TATIC_CALL_NULL() in that case.
>
> Signed-off-by: Christophe Leroy
Acked-by: Josh Poimboeuf
--
Josh
L_RET0_TRAMP(name) __PPC_SCT(name, "b
> .+20")
There's a PPC_SCT_RET0 macro for this "20" offset, might as well use a
stringified version of that for robustness/readability.
Otherwise it looks reasonable.
Acked-by: Josh Poimboeuf
--
Josh
l_transform() won't recognise it.
>
> In order to work properly, global single instance of __static_call_return0()
> is required.
>
> Fixes: 3f2a8fc4b15d ("static_call/x86: Add __static_call_return0()")
> Signed-off-by: Christophe Leroy
Acked-by: Josh Poimboeuf
--
Josh
On Thu, Jan 21, 2021 at 08:49:50AM +0100, Christoph Hellwig wrote:
> @@ -820,14 +796,25 @@ static int klp_init_object(struct klp_patch *patch,
> struct klp_object *obj)
> const char *name;
>
> obj->patched = false;
> - obj->mod = NULL;
Why was this line removed?
> if
On Tue, Apr 16, 2019 at 09:26:13PM +0200, Thomas Gleixner wrote:
> On Fri, 12 Apr 2019, Josh Poimboeuf wrote:
>
> > Configure arm64 runtime CPU speculation bug mitigations in accordance
> > with the 'mitigations=' cmdline option. This affects Meltdown, Spectre
> > v
On Tue, Apr 16, 2019 at 04:13:35PM +0200, Borislav Petkov wrote:
> On Fri, Apr 12, 2019 at 03:39:28PM -0500, Josh Poimboeuf wrote:
> > diff --git a/kernel/cpu.c b/kernel/cpu.c
> > index 38890f62f9a8..aed9083f8eac 100644
> > --- a/kernel/cpu.c
> > +++ b/kernel/cpu.c
>
1 - 100 of 296 matches
Mail list logo