Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

2024-11-21 Thread Josh Poimboeuf
On Thu, Nov 21, 2024 at 04:51:09PM +0100, Valentin Schneider wrote: > Okay so forcing the IPI for .noinstr patching lets us get rid of all the > force_ipi faff; however I would still want the special marking to tell > objtool "yep we're okay with this one", and still get warnings when a new > .noin

Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

2024-11-21 Thread Josh Poimboeuf
On Thu, Nov 21, 2024 at 12:00:20PM +0100, Peter Zijlstra wrote: > But yeah, this is not quite the same as not marking anything and simply > forcing the IPI when the target address is noinstr. > > And having written all that; perhaps that is the better solution, it > sticks the logic in text_poke a

Re: [RFC PATCH v3 09/15] objtool: Warn about non __ro_after_init static key usage in .noinstr

2024-11-20 Thread Josh Poimboeuf
ther flagged as __ro_after_init, or as forceful static keys. Any > occurrence of this new warning would be the result of a code change that > will need looking at. > > Suggested-by: Josh Poimboeuf > Signed-off-by: Valentin Schneider > --- > offset_of(static_key.type) and JUMP_T

Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

2024-11-20 Thread Josh Poimboeuf
On Wed, Nov 20, 2024 at 03:57:46PM +0100, Peter Zijlstra wrote: > On Wed, Nov 20, 2024 at 03:56:49PM +0100, Peter Zijlstra wrote: > > > But I think we can make the fall-back safer, we can simply force the IPI > > when we poke at noinstr code -- then NOHZ_FULL gets to keep the pieces, > > but at le

Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

2024-11-19 Thread Josh Poimboeuf
On Tue, Nov 19, 2024 at 04:34:53PM +0100, Valentin Schneider wrote: > +++ b/include/linux/jump_label.h > @@ -200,7 +200,8 @@ struct module; > #define JUMP_TYPE_FALSE 0UL > #define JUMP_TYPE_TRUE 1UL > #define JUMP_TYPE_LINKED 2UL > -#define JUMP_TYPE_MASK

Re: [RFC PATCH v3 06/15] jump_label: Add forceful jump label type

2024-11-19 Thread Josh Poimboeuf
On Tue, Nov 19, 2024 at 04:34:53PM +0100, Valentin Schneider wrote: > Later commits will cause objtool to warn about non __ro_after_init static > keys being used in .noinstr sections in order to safely defer instruction > patching IPIs targeted at NOHZ_FULL CPUs. Don't we need similar checking for

Re: [RFC PATCH v3 01/15] objtool: Make validate_call() recognize indirect calls to pv_ops[]

2024-11-19 Thread Josh Poimboeuf
t; > now: > > vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: call to > pv_ops[1]() leaves .noinstr.text section > > Signed-off-by: Valentin Schneider Acked-by: Josh Poimboeuf -- Josh

Re: [RFC PATCH v3 02/15] objtool: Flesh out warning related to pv_ops[] calls

2024-11-19 Thread Josh Poimboeuf
On Tue, Nov 19, 2024 at 04:34:49PM +0100, Valentin Schneider wrote: > I had to look into objtool itself to understand what this warning was > about; make it more explicit. > > Signed-off-by: Valentin Schneider Acked-by: Josh Poimboeuf -- Josh

Re: [PATCH v6 2/7] objtool: Fix unreachable instruction warnings for weak functions

2024-10-28 Thread Josh Poimboeuf
first node to compute the hole if hole.sym > > is empty. If there is no symbol in the section, the first node > > will be NULL, in which case, -1 is returned to skip the whole > > section. > > > > Co-developed-by: Han Shen > > Signed-off-by: Han Shen &

Re: [PATCH v4] Documentation: Document the Linux Kernel CVE process

2024-02-16 Thread Josh Poimboeuf
On Thu, Feb 15, 2024 at 01:10:55PM +0100, Greg Kroah-Hartman wrote: > +Note, due to the layer at which the Linux kernel is in a system, almost > +any bug might be exploitable to compromise the security of the kernel, > +but the possibility of exploitation is often not evident when the bug is > +fix

Re: [PATCH v2] Documentation/admin-guide: Embargoed hardware security issues

2019-08-20 Thread Josh Poimboeuf
On Thu, Aug 15, 2019 at 11:25:05PM +0200, Greg Kroah-Hartman wrote: > +Contact > +--- > + > +The Linux kernel hardware security team is separate from the regular Linux > +kernel security team. > + > +The team only handles the coordination of embargoed hardware security > +issues. Reports of pu

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-08 Thread Josh Poimboeuf
On Thu, Nov 08, 2018 at 07:04:48PM +1100, Aleksa Sarai wrote: > On 2018-11-08, Aleksa Sarai wrote: > > I will attach what I have at the moment to hopefully explain what the > > issue I've found is (re-using the kretprobe architecture but with the > > shadow-stack idea). > > Here is the patch I ha

Re: [PATCH v3 1/2] kretprobe: produce sane stack traces

2018-11-02 Thread Josh Poimboeuf
On Fri, Nov 02, 2018 at 09:16:58AM -0400, Steven Rostedt wrote: > On Fri, 2 Nov 2018 17:59:32 +1100 > Aleksa Sarai wrote: > > > As an aside, I just tested with the frame unwinder and it isn't thrown > > off-course by kretprobe_trampoline (though obviously the stack is still > > wrong). So I think

Re: [PATCH v5 32/32] x86/mm: Add support to make use of Secure Memory Encryption

2017-05-19 Thread Josh Poimboeuf
On Fri, May 19, 2017 at 01:30:05PM +0200, Borislav Petkov wrote: > > it is called so early. I can get past it by adding: > > > > CFLAGS_mem_encrypt.o := $(nostackp) > > > > in the arch/x86/mm/Makefile, but that obviously eliminates the support > > for the whole file. Would it be better to split

Re: [PATCH] Documentation/livepatch: remove the limitation for schedule() patching

2017-01-09 Thread Josh Poimboeuf
On Mon, Jan 09, 2017 at 01:50:19PM +0100, Miroslav Benes wrote: > There is still one thing which I don't understand. Why __schedule() > (patched or the original) is not on the stack. The actual "sleep" > should happen in __switch_to_asm() which is C function now. And there is a > call to __switc

Re: [PATCH] Documentation/livepatch: remove the limitation for schedule() patching

2017-01-06 Thread Josh Poimboeuf
t; Of course __switch_to_asm() is not patchable for the reason described in > the section. But there is no __fentry__ call and I cannot imagine a > reason to do it anyway. > > Therefore, remove the paragraphs from the section. > > Signed-off-by: Miroslav Benes Acked-by: Josh Poi

Re: [PATCH v6 0/5] (mostly) Arch-independent livepatch

2016-03-23 Thread Josh Poimboeuf
on, as sscanf() takes care to put a null byte at the end of >the bufs. > - Fix compiler kbuild errors for the !CONFIG_LIVEPATCH case > - Fixed some small module.c nits For the series: Acked-by: Josh Poimboeuf Thanks Jessica! -- Josh -- To unsubscribe from this list: send the line

Re: module: preserve Elf information for livepatch modules

2016-03-22 Thread Josh Poimboeuf
On Tue, Mar 22, 2016 at 01:57:01PM -0400, Jessica Yu wrote: > +++ Josh Poimboeuf [21/03/16 09:06 -0500]: > >On Wed, Mar 16, 2016 at 03:47:04PM -0400, Jessica Yu wrote: > >>For livepatch modules, copy Elf section, symbol, and string information > >>from the load_info

Re: livepatch: reuse module loader code to write relocations

2016-03-21 Thread Josh Poimboeuf
On Mon, Mar 21, 2016 at 10:16:17PM +0100, Jiri Kosina wrote: > On Mon, 21 Mar 2016, Jessica Yu wrote: > > > Yes, this is a concern and I'm not sure what the best way to fix it > > is. If both MODULE_NAME_LEN and KSYM_NAME_LEN were straight up > > constants, then I think Josh's stringify approach w

Re: livepatch: reuse module loader code to write relocations

2016-03-21 Thread Josh Poimboeuf
On Mon, Mar 21, 2016 at 03:18:32PM -0400, Jessica Yu wrote: > +++ Miroslav Benes [21/03/16 14:55 +0100]: > >On Wed, 16 Mar 2016, Jessica Yu wrote: > > > >[...] > > > >>+struct klp_buf { > >>+ char symname[KSYM_SYMBOL_LEN]; > > > >I think it is better to make this KSYM_NAME_LEN. KSYM_SYMBOL_LEN lo

Re: [PATCH v5 4/6] livepatch: reuse module loader code to write relocations

2016-03-21 Thread Josh Poimboeuf
On Mon, Mar 21, 2016 at 11:46:51AM -0500, Josh Poimboeuf wrote: > On Mon, Mar 21, 2016 at 05:31:57PM +0100, Petr Mladek wrote: > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > > index 780f00c..2aa20fa 100644 > > > --- a/kernel/livepatch/core.

Re: [PATCH v5 4/6] livepatch: reuse module loader code to write relocations

2016-03-21 Thread Josh Poimboeuf
On Mon, Mar 21, 2016 at 05:31:57PM +0100, Petr Mladek wrote: > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > index 780f00c..2aa20fa 100644 > > --- a/kernel/livepatch/core.c > > +++ b/kernel/livepatch/core.c > > +static int klp_resolve_symbols(Elf_Shdr *relasec, struct module

Re: [PATCH v5 5/6] samples: livepatch: mark as livepatch module

2016-03-21 Thread Josh Poimboeuf
On Wed, Mar 16, 2016 at 03:47:07PM -0400, Jessica Yu wrote: > Mark the module as a livepatch module so that the module loader can > appropriately identify and initialize it. > > Signed-off-by: Jessica Yu > --- > samples/livepatch/livepatch-sample.c | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH v5 4/6] livepatch: reuse module loader code to write relocations

2016-03-21 Thread Josh Poimboeuf
On Wed, Mar 16, 2016 at 03:47:06PM -0400, Jessica Yu wrote: > Reuse module loader code to write relocations, thereby eliminating the need > for architecture specific relocation code in livepatch. Specifically, reuse > the apply_relocate_add() function in the module loader to write relocations > ins

Re: [PATCH v5 2/6] module: preserve Elf information for livepatch modules

2016-03-21 Thread Josh Poimboeuf
On Wed, Mar 16, 2016 at 03:47:04PM -0400, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. Persist copies of the > original symbol table and string table. > > Livepatch manages its own relocation sections

Re: [RFC PATCH v4 0/6] (mostly) Arch-independent livepatch

2016-02-08 Thread Josh Poimboeuf
On Mon, Feb 08, 2016 at 03:54:22PM +0100, Miroslav Benes wrote: > On Wed, 3 Feb 2016, Jessica Yu wrote: > > > Jessica Yu (6): > > Elf: add livepatch-specific Elf constants > > module: preserve Elf information for livepatch modules > > module: s390: keep mod_arch_specific for livepatch module

Re: [RFC PATCH v4 4/6] livepatch: reuse module loader code to write relocations

2016-02-08 Thread Josh Poimboeuf
On Wed, Feb 03, 2016 at 08:11:09PM -0500, Jessica Yu wrote: > Reuse module loader code to write relocations, thereby eliminating the need > for architecture specific relocation code in livepatch. Specifically, reuse > the apply_relocate_add() function in the module loader to write relocations > ins

Re: [RFC PATCH v4 2/6] module: preserve Elf information for livepatch modules

2016-02-08 Thread Josh Poimboeuf
On Wed, Feb 03, 2016 at 08:11:07PM -0500, Jessica Yu wrote: > For livepatch modules, copy Elf section, symbol, and string information > from the load_info struct in the module loader. Persist copies of the > original symbol table and string table. > > Livepatch manages its own relocation sections

Re: module: s390: keep mod_arch_specific for livepatch modules

2016-02-04 Thread Josh Poimboeuf
On Wed, Feb 03, 2016 at 08:37:52PM -0500, Jessica Yu wrote: > +++ Jessica Yu [03/02/16 20:11 -0500]: > >Livepatch needs to utilize the symbol information contained in the > >mod_arch_specific struct in order to be able to call the s390 > >apply_relocate_add() function to apply relocations. Keep a r