On Mon, Jul 07, 2025 at 08:56:04AM -0700, Paul E. McKenney wrote:
> On Mon, Jul 07, 2025 at 09:50:50AM +0200, Peter Zijlstra wrote:
> > On Sat, Jul 05, 2025 at 01:23:27PM -0400, Joel Fernandes wrote:
> > > Recently while revising RCU's cpu online checks, there was some disc
On Mon, Jul 07, 2025 at 10:19:52AM -0400, Joel Fernandes wrote:
> From: Joel Fernandes
> Subject: [PATCH] smp: Document preemption and stop_machine() mutual exclusion
>
> Recently while revising RCU's cpu online checks, there was some discussion
> around how IPIs synchronize with hotplug.
>
> A
On Sat, Jul 05, 2025 at 01:23:27PM -0400, Joel Fernandes wrote:
> Recently while revising RCU's cpu online checks, there was some discussion
> around how IPIs synchronize with hotplug.
>
> Add comments explaining how preemption disable creates mutual exclusion with
> CPU hotplug's stop_machine mec
On Fri, Jun 27, 2025 at 09:55:30AM -0700, Josh Poimboeuf wrote:
> On Fri, Jun 27, 2025 at 12:48:18PM +0200, Peter Zijlstra wrote:
> > > +#define JUMP_TABLE_ENTRY(key, label) \
> > > + ".pushsection __jump_table, \"aM\", @pro
On Fri, Jun 27, 2025 at 10:34:15AM -0700, Josh Poimboeuf wrote:
> On Fri, Jun 27, 2025 at 12:53:28PM +0200, Peter Zijlstra wrote:
> > On Thu, Jun 26, 2025 at 04:55:29PM -0700, Josh Poimboeuf wrote:
> > > An upcoming patch will add the SHF_MERGE flag to x86 __jump_table and
&g
On Fri, Jun 27, 2025 at 09:36:08AM -0700, Josh Poimboeuf wrote:
> On Fri, Jun 27, 2025 at 12:29:30PM +0200, Peter Zijlstra wrote:
> > Naming seems inconsistent, there are:
> >
> > sym_has_sec(), sec_changed() and sec_size()
> >
> > which have the object
On Thu, Jun 26, 2025 at 04:55:29PM -0700, Josh Poimboeuf wrote:
> An upcoming patch will add the SHF_MERGE flag to x86 __jump_table and
> __bug_table so their entry sizes can be defined in inline asm.
>
> However, those sections have SHF_WRITE, which the Clang linker (lld)
> explicitly forbids com
On Thu, Jun 26, 2025 at 04:55:33PM -0700, Josh Poimboeuf wrote:
> @@ -193,7 +193,8 @@ static __always_inline __pure void *rip_rel_ptr(void *p)
> ".purgem extable_type_reg\n"
>
> # define _ASM_EXTABLE_TYPE(from, to, type) \
> - " .pushsection \"__ex_table\",\"a\"\n"
On Thu, Jun 26, 2025 at 04:55:32PM -0700, Josh Poimboeuf wrote:
> In preparation for the objtool klp diff subcommand, define the entry
> size for the .static_call_sites section in its ELF header. This will
> allow tooling to extract individual entries.
>
> Signed-off-by: Josh Poimboeuf
> ---
>
On Thu, Jun 26, 2025 at 04:55:31PM -0700, Josh Poimboeuf wrote:
> In preparation for the objtool klp diff subcommand, define the entry
> size for the __jump_table section in its ELF header. This will allow
> tooling to extract individual entries.
>
> Signed-off-by: Josh Poimboeuf
> ---
> arch/x
On Thu, Jun 26, 2025 at 04:55:16PM -0700, Josh Poimboeuf wrote:
> In preparation for the objtool klp diff subcommand, introduce a flag to
> identify __pfx_*() and __cfi_*() functions in advance so they don't need
> to be manually identified every time a check is needed.
>
> Signed-off-by: Josh Poi
On Thu, Jun 26, 2025 at 04:55:13PM -0700, Josh Poimboeuf wrote:
> @@ -177,11 +178,71 @@ static inline unsigned int elf_text_rela_type(struct
> elf *elf)
> return elf_addr_size(elf) == 4 ? R_TEXT32 : R_TEXT64;
> }
>
> +static inline bool sym_has_sec(struct symbol *sym)
> +{
> + return
On Thu, Jun 26, 2025 at 04:55:04PM -0700, Josh Poimboeuf wrote:
> find_symbol_hole_containing() fails to find a symbol hole (aka stripped
> weak symbol) if its section has no symbols before the hole. This breaks
> weak symbol detection if -ffunction-sections is enabled.
>
> Fix that by allowing t
Response is a bit weird because non-linear editing..
On Tue, Jun 24, 2025 at 08:10:57PM -0700, Boqun Feng wrote:
> + /* Whether the scan kthread has been scheduled to scan */
> + bool scheduled;
> +static int __noreturn shazptr_scan_kthread(void *unused)
> +{
> + for (;;) {
> +
On Tue, Jun 24, 2025 at 08:11:01PM -0700, Boqun Feng wrote:
> + /* Need preemption disable for using shazptr. */
> + guard(preempt)();
> +
> + /* Protect the list search with shazptr. */
> + guard(shazptr)(hash_head);
OK, this is the end of the series, and so far every single user
On Tue, Jun 24, 2025 at 08:10:57PM -0700, Boqun Feng wrote:
> +/* Scan structure for synchronize_shazptr(). */
> +struct shazptr_scan {
> + /* The scan kthread */
> + struct task_struct *thread;
> +
> + /* Wait queue for the scan kthread */
> + struct swait_queue_head wq;
> +
> +
On Tue, Jun 24, 2025 at 08:10:54PM -0700, Boqun Feng wrote:
> As its name suggests, simple hazard pointers (shazptr) is a
> simplification of hazard pointers [1]: it has only one hazard pointer
> slot per-CPU and is targeted for simple use cases where the read-side
> already has preemption disabled
On Tue, Jun 24, 2025 at 08:10:55PM -0700, Boqun Feng wrote:
> Add the refscale test for shazptr to measure the reader side
> performance.
>
> Signed-off-by: Boqun Feng
> ---
> kernel/rcu/refscale.c | 39 +++
> 1 file changed, 39 insertions(+)
>
> diff --git a
On Tue, Jun 24, 2025 at 08:10:56PM -0700, Boqun Feng wrote:
> +static void ref_shazptr_wc_read_section(const int nloops)
> +{
> + int i;
> +
> + for (i = nloops; i >= 0; i--) {
> + preempt_disable();
> + {
> + guard(shazptr)(ref_shazptr_read_sect
On Fri, Jun 13, 2025 at 10:26:37AM +0200, Alexis Lothoré wrote:
> Hi Peter,
>
> On Fri Jun 13, 2025 at 10:11 AM CEST, Peter Zijlstra wrote:
> > On Fri, Jun 13, 2025 at 09:37:11AM +0200, Alexis Lothoré (eBPF Foundation)
> > wrote:
> >> When the target functio
On Fri, Jun 13, 2025 at 09:37:11AM +0200, Alexis Lothoré (eBPF Foundation)
wrote:
> When the target function receives more arguments than available
> registers, the additional arguments are passed on stack, and so the
> generated trampoline needs to read those to prepare the bpf context,
> but als
On Thu, Jun 05, 2025 at 09:32:46AM +0200, Peter Zijlstra wrote:
> > But also, feel free to resurrect --backup, or you can yell at me to do
> > it as the backup code changed a bit.
>
> I have the patch somewhere, failed to send it out. I'll try and dig it
> out later
On Thu, Jun 05, 2025 at 03:44:23PM +0200, Petr Pavlu wrote:
> For instance:
>
> /*
>* Don't bother with non-allocated sections.
>*
>* An exception is the percpu section, which has separate allocations
>* for individual CPUs. We relocate the percpu section in
On Wed, Jun 04, 2025 at 05:19:51PM -0700, Josh Poimboeuf wrote:
> On Wed, May 28, 2025 at 12:34:53PM +0200, Peter Zijlstra wrote:
> > On Mon, May 26, 2025 at 12:52:40PM +0200, Peter Zijlstra wrote:
> > > On Fri, May 09, 2025 at 01:16:56PM -0700, Josh Poimboeuf wrote:
> >
On Mon, May 26, 2025 at 12:52:40PM +0200, Peter Zijlstra wrote:
> On Fri, May 09, 2025 at 01:16:56PM -0700, Josh Poimboeuf wrote:
> > It's common to use --dryrun on binaries that have already been
> > processed. Don't print the section skipping warnings in that case.
&g
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> +#define KLP_RELOC_SEC_PREFIX ".klp.rela."
> +#define KLP_SYM_PREFIX ".klp.sym."
This max symbol length test is getting more and more broken every day
:-)
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> diff --git a/tools/objtool/include/objtool/elf.h
> b/tools/objtool/include/objtool/elf.h
> index 4cfd09e66cb5..f62ac8081f27 100644
> --- a/tools/objtool/include/objtool/elf.h
> +++ b/tools/objtool/include/objtool/elf.h
> @@ -17,6 +1
Let me hand you a fresh bucket of curlies, you must've run out :-)
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> +static struct symbol *first_file_symbol(struct elf *elf)
> +{
> + struct symbol *sym;
> +
> + for_each_sym(elf, sym)
{
> + if (is_file_sym
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> +#define SEC_NAME_LEN 512
> #define SYM_NAME_LEN 512
>
> +static int validate_ffunction_fdata_sections(struct elf *elf)
> +{
> + struct symbol *sym;
> + bool found_text = false, found_data = false;
> +
> +
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
> index cdf385e54c69..ae4f83fcbadf 100644
> --- a/tools/objtool/arch/x86/decode.c
> +++ b/tools/objtool/arch/x86/decode.c
> @@ -95,6 +95,46 @@ s64 arch_in
On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:
> Without '-ffunction-sections -fdata-sections', reliable object diffing
> would be infeasible due to toolchain limitations:
>
> - For intra-file+intra-section references, the compiler might
> occasionally generated hard-coded
On Fri, May 09, 2025 at 01:17:06PM -0700, Josh Poimboeuf wrote:
> An upcoming patch will add the SHF_MERGE flag to x86 __jump_table and
> __bug_table so their entry sizes can be defined in inline asm.
>
> However, those sections have SHF_WRITE, which the Clang linker (lld)
> explicitly forbids com
On Fri, May 09, 2025 at 01:16:56PM -0700, Josh Poimboeuf wrote:
> It's common to use --dryrun on binaries that have already been
> processed. Don't print the section skipping warnings in that case.
Ah, I rather like this warning, it gives me an easy check to see if the
file has already been proce
On Fri, May 09, 2025 at 01:16:53PM -0700, Josh Poimboeuf wrote:
> In preparation for the objtool klp diff subcommand, introduce a flag to
> identify __pfx_*() and __cfi_*() functions in advance so they don't need
> to be manually identified every time a check is needed.
>
> Signed-off-by: Josh Poi
On Fri, May 09, 2025 at 01:16:52PM -0700, Josh Poimboeuf wrote:
> When ignore_unreachable_insn() looks for weak function holes which jump
> to their .cold functions, it assumes the parent function comes before
> the corresponding .cold function in the symbol table. That's not
> necessarily the cas
On Fri, May 09, 2025 at 01:16:42PM -0700, Josh Poimboeuf wrote:
> On x86, arch_dest_reloc_offset() hardcodes the addend adjustment to
> four, but the actual adjustment depends on the relocation type. Fix
> that.
> +s64 arch_insn_adjusted_addend(struct instruction *insn, struct reloc *reloc)
> {
On Wed, May 14, 2025 at 11:51:44AM +0200, Petr Mladek wrote:
> IMHO, it might be easier when it goes via tip. Peter, feel free to
> take it.
Done!
> Reviewed-by: Petr Mladek
> Tested-by: Petr Mladek
For some reason b4 didn't pick up these tags, added them manually and
force pushed it again.
On Tue, May 13, 2025 at 03:34:50PM +0200, Miroslav Benes wrote:
> Hi,
>
> thanks for the updated version.
>
> On Fri, 9 May 2025, Sebastian Andrzej Siewior wrote:
>
> > From: Peter Zijlstra
> >
> > With the goal of deprecating / removing VOLUNTARY preempt,
Instead of only accepting "module:${name}", extend it with a comma
separated list of module names and add tail glob support.
That is, something like: "module:foo-*,bar" is now possible.
Signed-off-by: Peter Zijlstra (Intel)
---
kernel/m
Designate the "module:${modname}" symbol namespace to mean: 'only
export to the named module'.
Notably, explicit imports of anything in the "module:" space is
forbidden.
Signed-off-by: Peter Zijlstra (Intel)
---
kernel/module/main.c | 33
Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle
the module name with s/-/_/g.
Since this happens late in the build, only the kernel needs to bother
with this, the modpost tool still sees the original name.
Reported-by: Sean Christopherson
Signed-off-by: Peter Zijlstra
Slight cleanup by using a for() loop instead of while(). This makes it
clearer what is the iteration and what is the actual work done.
Signed-off-by: Peter Zijlstra (Intel)
---
scripts/mod/modpost.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
--- a/scripts/mod/modpost.c
d
failures).
Requested-by: Masahiro Yamada
Requested-by: Christoph Hellwig
Signed-off-by: Peter Zijlstra (Intel)
---
Documentation/core-api/symbol-namespaces.rst | 22 ++
include/linux/export.h | 12 ++--
2 files changed, 32 insertions(+), 2
Hi!
Implement means for exports to be available to an explicit list of named
modules. By explicitly limiting the usage of certain exports, the abuse
potential/risk is greatly reduced.
Changes since v2:
- switch to "module:" prefix (Masahiro)
- removed some patch noise (Masahiro)
- strstarts()
On Mon, Dec 02, 2024 at 03:59:52PM +0100, Peter Zijlstra wrote:
> Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle
> the module name with s/-/_/g.
>
> Since this happens late in the build, only the kernel needs to bother
> with this, the modpost tool still se
On Sat, Feb 08, 2025 at 12:45:21AM +0900, Masahiro Yamada wrote:
> On Tue, Dec 3, 2024 at 12:11 AM Peter Zijlstra wrote:
> >
> > Instead of only accepting "MODULE_${name}", extend it with a comma
> > separated list of module names and add tail glob support.
On Fri, Feb 07, 2025 at 05:41:54PM +0900, Masahiro Yamada wrote:
> > +static bool verify_module_namespace(const char *namespace, const char
> > *modname)
> > +{
> > + size_t len, modlen = strlen(modname);
> > + const char *sep;
> > + bool glob;
> > +
> > + if (strncmp(name
On Fri, May 02, 2025 at 11:55:54AM +, Roy, Patrick wrote:
> Hi Peter,
>
> Are you still working on this patch series? I'm working on having KVM remove
> virtual machine memory from the kernel's direct map, to harden again
> speculative execution attacks [1]. At David H.'s LSF/MM/BPF task on
>
On Thu, May 01, 2025 at 01:42:35PM +0200, Peter Zijlstra wrote:
> On Wed, Oct 16, 2024 at 07:14:34PM -0700, John Hubbard wrote:
> > On 10/16/24 3:06 PM, Lorenzo Stoakes wrote:
> > > On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote:
> > > > On 10/16/2
On Wed, Oct 16, 2024 at 07:14:34PM -0700, John Hubbard wrote:
> On 10/16/24 3:06 PM, Lorenzo Stoakes wrote:
> > On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote:
> > > On 10/16/24 04:20, Lorenzo Stoakes wrote:
> ...
> > > > diff --git a/tools/testing/selftests/pidfd/pidfd.h
> > > > b/too
On Fri, Apr 25, 2025 at 09:06:26AM -0400, Liang, Kan wrote:
>
>
> On 2025-04-25 7:15 a.m., Peter Zijlstra wrote:
> > On Mon, Mar 24, 2025 at 05:30:50PM +, Mingwei Zhang wrote:
> >> From: Kan Liang
> >>
> >> Implement switch_guest_ctx inte
On Wed, Apr 16, 2025 at 03:22:02PM +0800, Mi, Dapeng wrote:
> Kindly ping... Any comments on this patch series? Thanks.
I suppose its mostly okay, just a few nits.
On Mon, Mar 24, 2025 at 05:30:50PM +, Mingwei Zhang wrote:
> From: Kan Liang
>
> Implement switch_guest_ctx interface for x86 PMU, switch PMI to dedicated
> KVM_GUEST_PMI_VECTOR at perf guest enter, and switch PMI back to
> NMI at perf guest exit.
>
> Signed-off-by: Xiong Zhang
> Signed-off
On Mon, Mar 24, 2025 at 05:30:45PM +, Mingwei Zhang wrote:
> @@ -6040,6 +6041,71 @@ void perf_put_mediated_pmu(void)
> }
> EXPORT_SYMBOL_GPL(perf_put_mediated_pmu);
>
> +static inline void perf_host_exit(struct perf_cpu_context *cpuctx)
> +{
> + perf_ctx_disable(&cpuctx->ctx, EVENT_GUE
On Mon, Mar 24, 2025 at 05:30:49PM +, Mingwei Zhang wrote:
> @@ -1822,7 +1835,7 @@ extern int perf_event_period(struct perf_event *event,
> u64 value);
> extern u64 perf_event_pause(struct perf_event *event, bool reset);
> int perf_get_mediated_pmu(void);
> void perf_put_mediated_pmu(void)
On Thu, Apr 24, 2025 at 11:30:39AM +0200, Benjamin Berg wrote:
> Not sure if something like that would be desirable upstream. This is
> happening for us when running the hostap "hwsim" tests inside UML (with
> time-travel). At least internally, we could carry a custom patch to add
> the lockdep_of
On Thu, Mar 27, 2025 at 09:38:46AM +0100, Arnd Bergmann wrote:
> My randconfig builds sometimes (around one in every 700 configs) run
> into this warning on x86:
>
> Symbol
> __pfx_sg1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nnng1h2i3j4k5l6m7ng1h2i3j4k5l6m7nng1h2i3j4k5l6m7ng1
On Wed, Mar 26, 2025 at 03:37:50PM +0100, Miroslav Benes wrote:
> If I remember correctly, we had something like this in the old kGraft
> implementation of the live patching (SUSE way). We exactly had a hook
> somewhere in the kthread freezing code. This looks much cleaner and as far
> as I kno
On Wed, Mar 26, 2025 at 10:49:10AM +0100, Petr Mladek wrote:
> On Mon 2025-03-24 14:49:09, Peter Zijlstra wrote:
> >
> > With the goal of deprecating / removing VOLUNTARY preempt, live-patch
> > needs to stop relying on cond_resched() to make forward progress.
> >
&g
tested only.
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/livepatch_sched.h | 15 +
include/linux/sched.h | 6 -
kernel/livepatch/transition.c | 30 ++---
kernel/sched/core.c | 50 +++--
4
On Mon, Mar 24, 2025 at 06:17:50PM +0530, Malaya Kumar Rout wrote:
> Static Analyis for bench_htab_mem.c with cppcheck:error
> tools/testing/selftests/x86/lam.c:585:3:
> error: Resource leak: file_fd [resourceLeak]
> tools/testing/selftests/x86/lam.c:593:3:
> error: Resource leak: file_fd [resource
On Thu, Feb 13, 2025 at 10:42:24AM -0500, Tamir Duberstein wrote:
> On Thu, Feb 13, 2025 at 6:59 AM Peter Zijlstra wrote:
> >
> > On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
> > > Convert this unit test to a KUnit test. This allows the test to bene
On Fri, Feb 14, 2025 at 10:45:31AM +0200, Mike Rapoport wrote:
> From: "Mike Rapoport (Microsoft)"
>
> The ROX memory allocations are part of a larger vmalloc allocation and
> annotating them with kmemleak_not_leak() confuses kmemleak.
>
> Skip kmemleak_not_leak() annotations for the ROX areas.
On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
> Convert this unit test to a KUnit test. This allows the test to benefit
> from the KUnit tooling. Note that care is taken to avoid test-ending
> assertions in worker threads, which is unsafe in KUnit (and wasn't done
> before this
On Thu, Jan 16, 2025 at 01:00:24PM -0800, Alexei Starovoitov wrote:
> On Thu, Jan 16, 2025 at 12:21 PM Paul E. McKenney wrote:
> >
> > +/*
> > + * Counts the new reader in the appropriate per-CPU element of the
> > + * srcu_struct. Returns a pointer that must be passed to the matching
> > + * src
.org/all/20241205215102.hrywu...@linutronix.de/
> - Splitted into smaller patches.
> - Converted all users.
Thanks for doing the cleanup!
Acked-by: Peter Zijlstra (Intel)
On Mon, Dec 02, 2024 at 03:59:47PM +0100, Peter Zijlstra wrote:
> Clean up the existing export namespace code along the same lines of
> 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to
> __section("foo")") and for the same reason, it is not desired
Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle
the module name with s/-/_/g.
Since this happens late in the build, only the kernel needs to bother
with this, the modpost tool still sees the original name.
Reported-by: Sean Christopherson
Signed-off-by: Peter Zijlstra
Requested-by: Masahiro Yamada
Requested-by: Christoph Hellwig
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/export.h | 26 --
1 file changed, 20 insertions(+), 6 deletions(-)
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -24,11 +24,23
Hi!
Implement a means for exports to be available only to an explicit list of named
modules. By explicitly limiting the usage of certain exports, the abuse
potential/risk is greatly reduced.
The first 'patch' is an awk scripts that cleans up the existing module
namespace code along the same lines
Signed-off-by: Peter Zijlstra (Intel)
---
scripts/mod/modpost.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1553,6 +1553,16 @@ static void mod_set_crcs(struct module *
free(buf);
}
+static
Signed-off-by: Peter Zijlstra (Intel)
---
scripts/mod/modpost.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1586,12 +1586,9 @@ static void read_symbols(const char *mod
license
Designate the "MODULE_${modname}" symbol namespace to mean: 'only
export to the named module'.
Notably, explicit imports of anything in the "MODULE_" space is
forbidden. Modules implicitly get the "MODULE_${modname}" namespace
added.
Signed-off-by: Pe
OL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada
Signed-off-by: Peter Zijlstra (Intel)
---
Documentation/core-api/symbol-namespaces.rst
Instead of only accepting "MODULE_${name}", extend it with a comma
separated list of module names and add tail glob support.
That is, something like: "MODULE_foo-*,bar" is now possible.
Signed-off-by: Peter Zijlstra (Intel)
---
kernel/m
On Tue, Nov 12, 2024 at 08:52:26PM +0100, Peter Zijlstra wrote:
> On Tue, Nov 12, 2024 at 09:56:20AM -0800, Sean Christopherson wrote:
>
> > This likely needs to be addressed in whatever chunk of code is enforcing the
> > namespaces. The s/-/_ behavior (and vice versa!) is *ve
On Mon, Nov 11, 2024 at 01:55:29PM +0100, Peter Zijlstra wrote:
> On Mon, Nov 11, 2024 at 03:36:25AM -0800, Christoph Hellwig wrote:
> > On Mon, Nov 11, 2024 at 11:54:31AM +0100, Peter Zijlstra wrote:
> > > Since sed doesn't like multi-line make sure all EXPORT_SYMBOL_NS
&g
On Tue, Nov 12, 2024 at 09:56:20AM -0800, Sean Christopherson wrote:
> This likely needs to be addressed in whatever chunk of code is enforcing the
> namespaces. The s/-/_ behavior (and vice versa!) is *very* baked into the
> kernel
> at this point, e.g. parameqn() will happily parse dashes or u
On Mon, Nov 11, 2024 at 10:36:16AM -0800, Sean Christopherson wrote:
> E.g. for x86, something like:
>
> #if IS_MODULE(CONFIG_KVM_AMD) && IS_MODULE(CONFIG_KVM_INTEL)
> #define KVM_VENDOR_MODULES kvm-amd,kvm-intel
> #elif IS_MODULE(CONFIG_KVM_AMD)
> #define KVM_VENDOR_MODULES kvm-amd
> #elif IS_MOD
On Mon, Nov 11, 2024 at 04:48:58PM -0800, Sean Christopherson wrote:
> On Mon, Nov 11, 2024, Peter Zijlstra wrote:
> > Hi!
> >
> > Implement a means for exports to be available only to an explicit list of
> > named
> > modules. By explicitly limiting the us
On Mon, Nov 11, 2024 at 03:36:25AM -0800, Christoph Hellwig wrote:
> On Mon, Nov 11, 2024 at 11:54:31AM +0100, Peter Zijlstra wrote:
> > Since sed doesn't like multi-line make sure all EXPORT_SYMBOL_NS
> > things are a single line.
>
> Eww. Just use coccinelle or anot
Signed-off-by: Peter Zijlstra (Intel)
---
scripts/mod/modpost.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1553,6 +1553,16 @@ static void mod_set_crcs(struct module *
free(buf);
}
+static
Instead of only accepting "MODULE_${name}", extend it with a comma
separated list of module names and add tail glob support.
That is, something like: "MODULE_foo-*,bar" is now possible.
Signed-off-by: Peter Zijlstra (Intel)
---
kernel/m
Designate the "MODULE_${modname}" symbol namespace to mean: 'only
export to the named module'.
Notably, explicit imports of anything in the "MODULE_" space is
forbidden. Modules implicitly get the "MODULE_${modname}" namespace
added.
Signed-off-by: Pe
Hi!
Implement a means for exports to be available only to an explicit list of named
modules. By explicitly limiting the usage of certain exports, the abuse
potential/risk is greatly reduced.
The first three 'patches' clean up the existing export namespace code along the
same lines of 33def8498fdd
Since sed doesn't like multi-line make sure all EXPORT_SYMBOL_NS
things are a single line.
Signed-off-by: Peter Zijlstra (Intel)
---
drivers/crypto/marvell/octeontx2/otx2_cptlf.c | 12
include/kunit/visibility.h|3 +--
sound/soc/codecs/tas2781-fmw
Signed-off-by: Peter Zijlstra (Intel)
---
scripts/mod/modpost.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1586,12 +1586,9 @@ static void read_symbols(const char *mod
license
Because Christoph and Masahiro-san asked for it :-)
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/export.h |3 +++
1 file changed, 3 insertions(+)
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -70,4 +70,7 @@
#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL
Signed-off-by: Peter Zijlstra (Intel)
---
include/linux/export.h |4 ++--
include/linux/module.h |2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -67,7 +67,7 @@
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
sed -i -e 's/MODULE_IMPORT_NS(\([^)]*\))/MODULE_IMPORT_NS("\1")/g' \
-e 's/\(EXPORT_SYMBOL_NS[^(]*\)(\([^,]*\), \([^)]*\))/\1(\2, "\3")/g'
$file;
done
Signed-off-by: Peter Zijlstra (Intel)
---
On Fri, Nov 08, 2024 at 04:28:58PM +0100, H. Peter Anvin wrote:
> >@@ -1700,11 +1715,7 @@ static void check_exports(struct module *mod)
> > s->crc_valid = exp->crc_valid;
> > s->crc = exp->crc;
> >
> >-basename = strrchr(mod->name, '/');
> >-if (base
On Thu, Nov 07, 2024 at 04:55:46PM +0900, Masahiro Yamada wrote:
> > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> > index 107393a8c48a..d1de3044ee03 100644
> > --- a/scripts/mod/modpost.c
> > +++ b/scripts/mod/modpost.c
> > @@ -1553,8 +1553,19 @@ static void mod_set_crcs(struct modu
On Thu, Nov 07, 2024 at 12:58:19PM +0100, Peter Zijlstra wrote:
> Anyway, let me see about doing that whole ',' parsing thing people seem
> to want.
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git module/namespace
Seems to work with very limited testing.
Hi,
I've been wanting $topic for a while, and having just stumbled into the
whole namespace thing by accident, I figured I'd give it a go, most if
the hard parts seem to have already been done.
It reserves and disallows imports on any "MODULE_${name}" namespace,
while it implicitly adds the same
On Mon, Nov 04, 2024 at 12:25:03PM +0100, Vlastimil Babka wrote:
> On 11/4/24 12:11, Vlastimil Babka wrote:
> >> __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4771
> >> alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
> >> stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:627
> >>
On Mon, Nov 04, 2024 at 12:45:06PM +0100, Peter Zijlstra wrote:
> diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c
> index 6310a180278b..ac9f6682bb2f 100644
> --- a/mm/kasan/generic.c
> +++ b/mm/kasan/generic.c
> @@ -521,12 +521,12 @@ size_t kasan_metadata_size(struct km
On Tue, Oct 22, 2024 at 12:07:35AM -0700, Christoph Hellwig wrote:
> On Tue, Oct 22, 2024 at 09:06:35AM +0200, Peter Zijlstra wrote:
> > What is returned is an array index -- and SRCU is currently built using
> > an array of size 2. Using larger arrays is conceivable (IIRC some
On Mon, Oct 21, 2024 at 08:30:43PM -0700, Paul E. McKenney wrote:
> Thoughts?
Thanks Paul!
Acked-by: Peter Zijlstra (Intel)
>
>
> commit 4433b7d3785d8d2a700f5ed5ca234c64bc63180e
> Author: Paul E. McKenney
On Mon, Oct 21, 2024 at 11:51:40PM -0700, Christoph Hellwig wrote:
> On Mon, Oct 21, 2024 at 03:13:05PM -0700, Paul E. McKenney wrote:
> > For almost 20 years, the int return value from srcu_read_lock() has
> > been always either zero or one. This commit therefore documents the
> > fact that it wi
On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote:
> + if (unlikely(task->flags & PF_EXIT_NOTIFY)) {
> + task_lock(task);
> + task->flags &= ~PF_EXIT_NOTIFY;
> + task_unlock(task);
> +
> @@ -413,6 +440,15 @@ static void cn_proc_mcast_ctl(struc
1 - 100 of 6027 matches
Mail list logo