Hi Petr,
On Thu, Mar 03, 2016 at 05:52:01PM +0100, Petr Mladek wrote:
> From: Balbir Singh
>
> Changelog v4:
> 1. Renamed klp_matchaddr() to klp_get_ftrace_location()
> and used it just to convert the function address.
> 2. Synced klp_write_module_reloc() with s390(); made i
On Mon, Mar 07, 2016 at 11:52:31PM +0100, Jiri Kosina wrote:
> On Mon, 7 Mar 2016, Michael Ellerman wrote:
>
> > > This aligns with my usual workflow, so that'd be my preferred way of doing
> > > things; i.e. you put all the ftrace changes into a separate topic branch,
> > > and then
> > >
> > > -
On Wed, Mar 09, 2016 at 03:01:46PM +0100, Petr Mladek wrote:
> LivePatch framework deserves some documentation, definitely.
> This is an attempt to provide some basic info. I hope that
> it will be useful for both LivePatch producers and also
> potential developers of the framework itself.
>
> Sig
On Thu, Apr 14, 2016 at 05:20:29PM +0200, Torsten Duwe wrote:
> On Thu, Apr 14, 2016 at 11:08:02PM +1000, Michael Ellerman wrote:
> > On Thu, 2016-04-14 at 14:57 +0200, Torsten Duwe wrote:
> >
> > > FTR: then I still have a few ppc64 hunks floating around to support
> > > certain consistency
> >
On Fri, Apr 15, 2016 at 09:22:49PM +1000, Michael Ellerman wrote:
> On Thu, 2016-04-14 at 11:41 -0500, Josh Poimboeuf wrote:
> > On Thu, Apr 14, 2016 at 05:20:29PM +0200, Torsten Duwe wrote:
> > > On Thu, Apr 14, 2016 at 11:08:02PM +1000, Michael Ellerman wrote:
> > > &g
On Mon, Apr 25, 2016 at 05:14:35PM +0200, Petr Mladek wrote:
> LivePatch framework deserves some documentation, definitely.
> This is an attempt to provide some basic info. I hope that
> it will be useful for both LivePatch producers and also
> potential developers of the framework itself.
>
> Sig
fset() errors from EINVAL -> ENOENT
- change proc file permissions S_IRUGO -> USR
- use klp_for_each_object/func helpers
Jiri Slaby (1):
livepatch/s390: reorganize TIF thread flag bits
Josh Poimboeuf (16):
x86/asm/head: clean up initial stack variable
x86/asm/head: use a common fun
d cleanups:
- Remove the unused init_rsp variable declaration.
- Remove the ".word 0" statement after the initial_stack definition
because it has no apparent function.
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/realmode.h | 2 +-
arch/x86/include/asm/smp.h | 3 ---
There are two different pieces of code for starting a CPU: start_cpu0()
and the end of secondary_startup_64(). They're identical except for the
stack setup. Combine the common parts into a shared start_cpu()
function.
Signed-off-by: Josh Poimboeuf
---
arch/x86/kernel/head_64.S
a stack at all
Make the idle tasks conform to the new stack bottom convention by
starting their stack at a sizeof(pt_regs) offset from the end of the
stack page.
Signed-off-by: Josh Poimboeuf
---
arch/x86/kernel/head_64.S | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
h the
intent of other users of the _stext symbol, and it also seems consistent
with what other architectures are already doing.
Signed-off-by: Josh Poimboeuf
---
arch/x86/kernel/vmlinux.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arc
-off-by: Josh Poimboeuf
---
include/linux/sched.h | 1 +
kernel/fork.c | 2 +-
kernel/sched/core.c | 4
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3d31572..fb364a0 100644
--- a/include/linux/sched.h
+++ b/include
In preparation for being able to determine whether a given stack trace
is reliable, allow the stacktrace_ops functions to propagate errors to
dump_trace().
Signed-off-by: Josh Poimboeuf
---
arch/x86/include/asm/stacktrace.h | 36 +++---
arch/x86/kernel/dumpstack.c | 31
Signed-off-by: Josh Poimboeuf
---
arch/Kconfig | 6
arch/x86/Kconfig | 1 +
arch/x86/kernel/dumpstack.c | 77
arch/x86/kernel/stacktrace.c | 24 ++
include/linux/kernel.h | 1 +
include/linux/stac
Create temporary stubs for klp_patch_pending() and klp_patch_task() so
we can add TIF_PATCH_PENDING to different architectures in separate
patches without breaking build bisectability.
Signed-off-by: Josh Poimboeuf
---
include/linux/livepatch.h | 7 ++-
kernel/livepatch/core.c | 3 +++
2
flags
so that it gets automatically included in the _TIF_ALLWORK_MASK macro.
This results in exit_to_usermode_loop() and klp_patch_task() getting
called when the bit is set.
Signed-off-by: Josh Poimboeuf
---
arch/x86/entry/common.c| 9 ++---
arch/x86/include/asm/thread_info.h | 2
do_notify_resume() and klp_patch_task() get called when the bit is set.
Signed-off-by: Josh Poimboeuf
---
arch/powerpc/include/asm/thread_info.h | 4 +++-
arch/powerpc/kernel/signal.c | 4
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/thread_info.h
From: Jiri Slaby
Group the TIF thread flag bits by their inclusion in the _TIF_WORK and
_TIF_TRACE macros.
Signed-off-by: Jiri Slaby
Signed-off-by: Josh Poimboeuf
---
arch/s390/include/asm/thread_info.h | 22 ++
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git
sk
is correctly migrated in all return paths from a syscall.
Signed-off-by: Miroslav Benes
Signed-off-by: Josh Poimboeuf
---
arch/s390/include/asm/thread_info.h | 2 ++
arch/s390/kernel/entry.S| 31 ++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --
gistered with ftrace and
added to the klp_ops func stack.
Also, since these states are binary, represent them with booleans
instead of ints.
Signed-off-by: Josh Poimboeuf
---
include/linux/livepatch.h | 17 ---
kernel/livepatch/core.c | 72 +++-
klp_patch_object()'s callers already ensure that the object is loaded,
so its call to klp_is_object_loaded() is unnecessary.
This will also make it possible to move the patching code into a
separate file.
Signed-off-by: Josh Poimboeuf
---
kernel/livepatch/core.c | 3 ---
1 file chang
Move functions related to the actual patching of functions and objects
into a new patch.c file.
Signed-off-by: Josh Poimboeuf
---
kernel/livepatch/Makefile | 2 +-
kernel/livepatch/core.c | 202 +--
kernel/livepatch/patch.c | 213
For the consistency model we'll need to know the sizes of the old and
new functions to determine if they're on the stacks of any tasks.
Signed-off-by: Josh Poimboeuf
---
include/linux/livepatch.h | 3 +++
kernel/livepatch/core.c | 16
2 files changed, 19 insertion
the /sys/kernel/livepatch//enabled file while
the transition is in progress. Then all the tasks will attempt to
converge back to the original patch state.
[1] https://lkml.kernel.org/r/20141107140458.ga21...@suse.cz
Signed-off-by: Josh Poimboeuf
---
Documentation/ABI/testing/sysfs-kernel-livepa
Expose the per-task patch state value so users can determine which tasks
are holding up completion of a patching operation.
Signed-off-by: Josh Poimboeuf
---
Documentation/filesystems/proc.txt | 18 ++
fs/proc/base.c | 15 +++
2 files changed, 33
27;s vulnerable.
- cpu_spec_mitigations=auto,nosmt: Enable all the default mitigations,
disabling SMT if needed by a mitigation.
Josh Poimboeuf (5):
cpu/speculation: Add 'cpu_spec_mitigations=' cmdline options
x86/speculation: Add support for 'cpu_spec_mitigations=' cmdline
Configure x86 runtime CPU speculation bug mitigations in accordance with
the 'cpu_spec_mitigations=' cmdline options. This affects Meltdown,
Spectre v2, Speculative Store Bypass, and L1TF.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
.../admin-gu
27;s vulnerable.
- cpu_spec_mitigations=auto,nosmt: Enable all the default mitigations,
disabling SMT if needed by a mitigation.
Currently, these options are placeholders which don't actually do
anything. They will be fleshed out in upcoming patches.
Signed-off-by: Josh Poimboeuf
---
.../admin-guide/k
Configure powerpc CPU runtime speculation bug mitigations in accordance
with the 'cpu_spec_mitigations=' cmdline options. This affects
Meltdown, Spectre v1, Spectre v2, and Speculative Store Bypass.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/a
Configure s390 runtime CPU speculation bug mitigations in accordance
with the 'cpu_spec_mitigations=' cmdline options. This affects Spectre
v1 and Spectre v2.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-guide/kernel-parameters.txt | 7 +++
Configure arm64 runtime CPU speculation bug mitigations in accordance
with the 'cpu_spec_mitigations=' cmdline options. This affects
Meltdown and Speculative Store Bypass.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-guide/kernel-paramete
On Thu, Apr 04, 2019 at 11:44:11AM -0500, Josh Poimboeuf wrote:
> Keeping track of the number of mitigations for all the CPU speculation
> bugs has become overwhelming for many users. It's getting more and more
> complicated to decide which mitigations are needed for a given
On Fri, Apr 05, 2019 at 03:12:11PM +0200, Borislav Petkov wrote:
> On Thu, Apr 04, 2019 at 11:44:11AM -0500, Josh Poimboeuf wrote:
> > Keeping track of the number of mitigations for all the CPU speculation
> > bugs has become overwhelming for many users. It's getting more and
On Fri, Apr 05, 2019 at 03:57:12PM +0200, Borislav Petkov wrote:
> > diff --git a/arch/x86/include/asm/processor.h
> > b/arch/x86/include/asm/processor.h
> > index 2bb3a648fc12..7e95b310f869 100644
> > --- a/arch/x86/include/asm/processor.h
> > +++ b/arch/x86/include/asm/processor.h
> > @@ -982,6
On Fri, Apr 05, 2019 at 03:39:58PM +0100, Steven Price wrote:
> On 04/04/2019 17:44, Josh Poimboeuf wrote:
> > Configure arm64 runtime CPU speculation bug mitigations in accordance
> > with the 'cpu_spec_mitigations=' cmdline options. This affects
> > Meltdo
On Fri, Apr 05, 2019 at 08:18:09AM -0700, Randy Dunlap wrote:
> On 4/5/19 6:57 AM, Borislav Petkov wrote:
> > On Thu, Apr 04, 2019 at 11:44:12AM -0500, Josh Poimboeuf wrote:
> >> Configure x86 runtime CPU speculation bug mitigations in accordance with
> >> the
On Fri, Apr 05, 2019 at 03:44:14PM +0100, Will Deacon wrote:
> Hi Josh,
>
> On Thu, Apr 04, 2019 at 11:44:15AM -0500, Josh Poimboeuf wrote:
> > Configure arm64 runtime CPU speculation bug mitigations in accordance
> > with the 'cpu_spec_mitigations=' cmdline opti
On Fri, Apr 05, 2019 at 05:26:50PM +0200, Borislav Petkov wrote:
> On Fri, Apr 05, 2019 at 09:31:01AM -0500, Josh Poimboeuf wrote:
> > My thinking was that the individual options could be used to override
> > the global option. But maybe that's overkill? I dunno.
>
On Fri, Apr 05, 2019 at 06:01:36PM +0200, Borislav Petkov wrote:
> Thinking about this more, we can shave off the first 4 chars and have it
> be:
>
> spec_mitigations=
>
> I think it is painfully clear which speculation mitigations we mean. And
> the other switches don't have "cpu_" prefixes too
On Wed, Apr 10, 2019 at 04:06:50PM +1000, Michael Ellerman wrote:
> Josh Poimboeuf writes:
> > Configure powerpc CPU runtime speculation bug mitigations in accordance
> > with the 'cpu_spec_mitigations=' cmdline options. This affects
> > Meltdown, Spectre v1, Sp
On Wed, Apr 10, 2019 at 02:10:01PM +0200, Thomas Gleixner wrote:
> On Wed, 10 Apr 2019, Michael Ellerman wrote:
> > Josh Poimboeuf writes:
> >
> > > On Fri, Apr 05, 2019 at 06:01:36PM +0200, Borislav Petkov wrote:
> > >> Thinking about this more, we can sha
gations=auto: [default] Enable all the default mitigations, but
leave SMT enabled, even if it's vulnerable.
- mitigations=auto,nosmt: Enable all the default mitigations, disabling
SMT if needed by a mitigation.
Josh Poimboeuf (5):
cpu/speculation: Add 'mitigations=' cmd
smt: Enable all the default mitigations, disabling
SMT if needed by a mitigation.
Currently, these options are placeholders which don't actually do
anything. They will be fleshed out in upcoming patches.
Signed-off-by: Josh Poimboeuf
---
.../admin-guide/kernel-paramet
Configure x86 runtime CPU speculation bug mitigations in accordance with
the 'mitigations=' cmdline option. This affects Meltdown, Spectre v2,
Speculative Store Bypass, and L1TF.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-gu
Configure powerpc CPU runtime speculation bug mitigations in accordance
with the 'mitigations=' cmdline option. This affects Meltdown, Spectre
v1, Spectre v2, and Speculative Store Bypass.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-gu
Configure s390 runtime CPU speculation bug mitigations in accordance
with the 'mitigations=' cmdline option. This affects Spectre v1 and
Spectre v2.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-guide/kernel-parameters.txt | 5 +++--
arch/s
Configure arm64 runtime CPU speculation bug mitigations in accordance
with the 'mitigations=' cmdline option. This affects Meltdown, Spectre
v2, and Speculative Store Bypass.
The default behavior is unchanged.
Signed-off-by: Josh Poimboeuf
---
NOTE: This is based on top of Jerem
Add ARM64 to the legend of architectures. It's already used in several
places in kernel-parameters.txt.
Suggested-by: Randy Dunlap
Signed-off-by: Josh Poimboeuf
---
Documentation/admin-guide/kernel-parameters.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/admin-
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
>
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
&
On Mon, Jan 14, 2019 at 11:46:59AM -0500, Joe Lawrence wrote:
> @@ -158,11 +158,21 @@ save_stack_trace_tsk_reliable(struct task_struct *tsk,
> return 1; /* invalid backlink, too far up. */
> }
>
> + /* We can only trust the bottom frame's backlink,
eption return
>
> arch/powerpc/Kconfig | 2 +-
> arch/powerpc/kernel/entry_64.S | 7 +++
> arch/powerpc/kernel/stacktrace.c | 74 +++++---
> 3 files changed, 47 insertions(+), 36 deletions(-)
Reviewed-by: Josh Poimboeuf
--
Josh
and comments are welcome.
>From c88ae39da0c0352f411aca8d9636990a442d47da Mon Sep 17 00:00:00 2001
From: Josh Poimboeuf
Date: Wed, 2 Nov 2011 16:41:24 -0500
Subject: [PATCH] Flush relocated instructions from data cache
After updating instructions with relocated addresses, flush them from
the da
On Fri, 2011-11-04 at 14:06 +0530, Suzuki Poulose wrote:
> On 11/03/11 05:06, Josh Poimboeuf wrote:
> > On Tue, 2011-10-25 at 17:23 +0530, Suzuki K. Poulose wrote:
> > @@ -137,6 +137,9 @@ get_type:
> > lwz r0, 8(r9) /* r_addend */
> > add r0,
On Tue, 2011-11-08 at 12:41 +0530, Suzuki Poulose wrote:
> What I was suggesting is, instead of flushing the cache in relocate(), lets
> do it
> like:
>
> for e.g, on 440x, (in head_44x.S :)
>
> #ifdef CONFIG_RELOCATABLE
> ...
> bl relocate
>
> #Flush the d-cache and invalidat
On Wed, 2011-11-09 at 12:03 +0530, Suzuki Poulose wrote:
> On Tue, 08 Nov 2011 10:19:05 -0600
> Josh Poimboeuf wrote:
>
> > On Tue, 2011-11-08 at 12:41 +0530, Suzuki Poulose wrote:
> > > What I was suggesting is, instead of flushing the cache in
> >
On Thu, 2011-11-10 at 08:01 +0530, Suzuki Poulose wrote:
> >> How about using clean_dcache_range() to flush the range runtime
> >> address range [ _stext, _end ] ? That would flush the entire
> >> instructions.
> >
> > Wouldn't that result in more cache flushing than the original solution?
> >
> >
-0-46a69b507...@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 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 u
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 d
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 reve
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
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 validatio
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 s
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
> >
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
>
> th
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 $(CONFIG_X86_KE
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 annotate_unreachable().
&
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 to
lp module's replacement function when
the original 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
---
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
po
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
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 !
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
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
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:
attribute.
[1] 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()
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:
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/includ
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:
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/k
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 Poim
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/loon
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
--- a
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/includ
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 Poim
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
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/in
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 Poim
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/
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
of
the 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_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 Poim
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/in
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/in
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
plain if an arch-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
Sign
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
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
> HOSTLD
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.
1 - 100 of 325 matches
Mail list logo