Re: linux-next: tracebacks in workqueue.c/__flush_work()

2019-02-05 Thread Rusty Russell
Tetsuo Handa writes: > (Adding Chris Metcalf and Rusty Russell.) > > If NR_CPUS == 1 due to CONFIG_SMP=n, for_each_cpu(cpu, &has_work) loop does > not > evaluate "struct cpumask has_work" modified by cpumask_set_cpu(cpu, > &has_work) at > previous for_each

Re: [PATCH][RFC] module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity

2019-01-29 Thread Rusty Russell
Thanks taking on such a thankless task Thomas, Might have been overzealous in assuming a verionless GPL string meant "or later" (I'm happy for that for my own code, FWIW). My memory is fuzzy, but I don't think anyone cared at the time. Frankly, this should be autogenerated rather than "fixed" if

Re: [PATCH] modpost: remove leftover symbol prefix handling for module device table

2018-09-29 Thread Rusty Russell
Please send this to the module maintainer (CC'd). Masahiro Yamada writes: > Blackfin and metag were the only architectures that prefix symbols with > an underscore. They were removed by commit 4ba66a976072 ("arch: remove > blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), > res

Re: [PATCH] maintainers: drop Chris Wright from pvops

2017-10-26 Thread Rusty Russell
xt > > PARAVIRT_OPS INTERFACE > M: Juergen Gross > -M: Chris Wright > M: Alok Kataria > M: Rusty Russell > L: virtualizat...@lists.linux-foundation.org > -- > 2.12.3

Re: [PATCH] params: Align add_sysfs_param documentation with code

2017-09-22 Thread Rusty Russell
Jean Delvare writes: > This parameter is named kp, so the documentation should use that. > > Signed-off-by: Jean Delvare > Fixes: 9b473de87209 ("param: Fix duplicate module prefixes") > Cc: Rusty Russell Acked-by: Rusty Russell Thanks, Rusty. > --- > kern

Re: [PATCH v2 0/2] x86: paravirt related cleanup

2017-08-16 Thread Rusty Russell
r it to be removed with the paravirt infrastructure itself, but I think that's getting closer anyway. Acked-by: Rusty Russell > In case the patches make it to the tree there is quite some potential > for further simplification of paravirt stuff. Especially most of the > pv operations can be

[PATCH] MAINTAINERS: Remove from module & paravirt maintenance

2017-08-14 Thread Rusty Russell
code closely, of course, already feel that way themselves. [7] But set_bit finally takes a long! Seriously... [8] Though the ARRAY_SIZE macro and the poetry in lguest are a close second. [9] Actually, bitcoin is a nice reward too; it's like crystalized machine sweat! Signed-o

Re: [PATCH] Allow automatic kernel taint on unsigned module load to be disabled

2017-08-06 Thread Rusty Russell
Matthew Garrett writes: > On Sun, Aug 6, 2017 at 7:49 PM, Rusty Russell wrote: >> Matthew Garrett writes: >>> Binary modules will still be tainted by the license checker. The issue >>> is that if you want to enforce module signatures under *some* >>> c

Re: [PATCH] Allow automatic kernel taint on unsigned module load to be disabled

2017-08-06 Thread Rusty Russell
Matthew Garrett writes: > On Sat, Aug 5, 2017 at 11:54 PM, Rusty Russell wrote: >> Matthew Garrett writes: >>> Distributions may wish to provide kernels that permit loading of >>> unsigned modules based on certain policy decisions. >> >> Sorry, th

Re: [PATCH] Allow automatic kernel taint on unsigned module load to be disabled

2017-08-05 Thread Rusty Russell
Matthew Garrett writes: > Distributions may wish to provide kernels that permit loading of > unsigned modules based on certain policy decisions. Sorry, that's way too vague to accept this patch. So I'm guessing a binary module is behind this vagueness. If you want some other method than signing

Re: [PATCH] modpost: abort if a module name is too long

2017-05-27 Thread Rusty Russell
Wanlong Gao writes: > Folks, > > Any comments? I've CC'd the module maintainer, who can help with this :_ Cheers, Rusty. > On 2017/5/20 15:46, Xie XiuQi wrote: >> From: Wanlong Gao >> >> Module name has a limited length, but currently the build system >> allows the build finishing even if the

Re: [PATCH RFC 0/3] Improve stability of system clock

2017-05-21 Thread Rusty Russell
John Stultz writes: > On Wed, May 17, 2017 at 9:54 PM, Richard Cochran > wrote: >> On Wed, May 17, 2017 at 04:06:07PM -0700, John Stultz wrote: >>> On Wed, May 17, 2017 at 10:22 AM, Miroslav Lichvar >>> wrote: >>> > Is there a better way to run the timekeeping code in an userspace >>> > applica

Re: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction

2017-04-26 Thread Rusty Russell
Djalal Harouni writes: > Hi Rusty, > > On Mon, Apr 24, 2017 at 6:29 AM, Rusty Russell wrote: >> Djalal Harouni writes: >>> When value is (1), task must have CAP_SYS_MODULE to be able to trigger a >>> module auto-load operation, or CAP_NET_ADMIN for mod

Re: [PATCH v3 2/2] modules:capabilities: add a per-task modules autoload restriction

2017-04-23 Thread Rusty Russell
Djalal Harouni writes: > When value is (1), task must have CAP_SYS_MODULE to be able to trigger a > module auto-load operation, or CAP_NET_ADMIN for modules with a > 'netdev-%s' alias. Sorry, the magic 'netdev-' prefix is a crawling horror. To do this properly, you need to hand the capability (i

Re: [PATCH] x86/lguest/timer: set ->min_delta_ticks and ->max_delta_ticks

2017-04-02 Thread Rusty Russell
ll looks exclusively at the (untouched) ->min_delta_ns > and ->max_delta_ns. As soon as this has changed, a followup patch will > purge the initialization of ->min_delta_ns and ->max_delta_ns from this > driver. Acked-by: Rusty Russell > > Signed-off-by: Nicolai Stange

Re: [PATCH] module: fix memory leak on early load_module() failures

2017-02-11 Thread Rusty Russell
rs > (parse_args() returns an error) > o mod_sysfs_setup() fails > o we're a live patch module and copy_module_elf() fails > > Chances of running into this issue is really low. Good catch! Reviewed-by: Rusty Russell Cheers, Rusty. > > kmemleak splat: > &

Re: [PATCH] cpumask: add cpumask_any_and_but()

2017-02-07 Thread Rusty Russell
Mark Rutland writes: > In some cases, it's useful to be able to select a random cpu from the > intersection of two masks, excluding a particular CPU. Acked-by: Rusty Russell Thanks, Rusty. > For example, in some systems an uncore PMU is shared by a subset of > CPUs, and manag

Re: [PATCH] modules: mark __inittest/__exittest as __maybe_unused

2017-02-02 Thread Rusty Russell
Arnd Bergmann writes: > On Thu, Feb 2, 2017 at 10:25 AM, Rusty Russell wrote: >> Arnd Bergmann writes: >>> clang warns about unused inline functions by default: >>> >>> arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function >>> '__ini

Re: [PATCH] modules: mark __inittest/__exittest as __maybe_unused

2017-02-02 Thread Rusty Russell
Arnd Bergmann writes: > clang warns about unused inline functions by default: > > arch/arm/crypto/aes-cipher-glue.c:68:1: warning: unused function '__inittest' > [-Wunused-function] > arch/arm/crypto/aes-cipher-glue.c:69:1: warning: unused function '__exittest' > [-Wunused-function] > > As these

Re: [RFC] [PATCH] audit: log module name on init_module

2017-01-27 Thread Rusty Russell
Hi RGB! This should get acked by the new module maintainer (and your RH peer!) Jeyu, cc'd. Cheers, Rusty. Richard Guy Briggs writes: > This adds a new auxiliary record MODULE_INIT to the SYSCALL event. > > We get finit_module for free since it made most sense to hook this in to

Re: [PATCH v2 00/10] Finalize separation of extable.h from module.h

2017-01-23 Thread Rusty Russell
BTW, you missed Jeyu, the current module maintainer. Not that we care, I think, it's pretty trivial: Acked-by: Rusty Russell (module.h parts) Cheers, Rusty. Paul Gortmaker writes: > Some of the arch specific changes have already been picked up by the > arch maintainers in v1, so I

Re: [RFC] taint/module: Fix problems when out-of-kernel driver defines true or false

2017-01-02 Thread Rusty Russell
wn definitions of true and false. > > Fixes: 7fd8329ba502 ("taint/module: Clean up global and module taint flags > handling") > Signed-off-by: Larry Finger > Cc: Petr Mladek > Cc: Jessica Yu > Cc: Rusty Russell Acked-by: Rusty Russell Thanks, Rusty. > -

Re: [RFC 10/10] kmod: add a sanity check on module loading

2017-01-02 Thread Rusty Russell
"Luis R. Rodriguez" writes: >> Maybe a similar hack for try_then_request_module(), but many places seem >> to open-code request_module() so it's not as trivial... Hi Luis, Jessica (who is the main module maintainer now), Back from break, sorry about delay. > Right, out of ~350 request_m

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-20 Thread Rusty Russell
"Luis R. Rodriguez" writes: > OK -- if userspace messes up again it may be a bit hard to prove > unless we have a validation debug thing in place, would such a thing > in debug form be reasonable ? That makes perfect sense. Untested hack: diff --git a/fs/filesystems.c b/fs/filesystems.c index c

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-19 Thread Rusty Russell
"Luis R. Rodriguez" writes: > On Dec 16, 2016 9:54 PM, "Rusty Russell" wrote: > > AFAICT the mistake here is that kmod is returning "done, OK" when the > > module it is trying to load is already loading (but not finished > > loading). That

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-16 Thread Rusty Russell
"Luis R. Rodriguez" writes: > On Thu, Dec 15, 2016 at 10:57:42AM +1030, Rusty Russell wrote: >> "Luis R. Rodriguez" writes: >> > kmod has an optimization in place whereby if a some kernel code >> > uses request_module() on a module already load

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-14 Thread Rusty Russell
"Luis R. Rodriguez" writes: > kmod has an optimization in place whereby if a some kernel code > uses request_module() on a module already loaded we never bother > userspace as the module already is loaded. This is not true for > get_fs_type() though as it uses aliases. Well, the obvious thing to

Re: module: extend 'rodata=off' boot cmdline parameter to module mappings

2016-11-27 Thread Rusty Russell
affects RO/RW >>permissions, keeping NX set. >> >>This is the first step to make CONFIG_DEBUG_SET_MODULE_RONX mandatory >>(always-on) in the future as CONFIG_DEBUG_RODATA on x86 and arm64. >> >>Suggested-by: and Acked-by: Mark Rutland >>Signed-off-by: AKASHI Takahi

Re: [RFC PATCH v2 2/2] module: When modifying a module's text ignore modules which are going away too

2016-11-17 Thread Rusty Russell
uld be RW, before deallocation. > > This patch makes set_all_modules_text_ro() skip modules which are going > away too. > > Signed-off-by: Aaron Tomlin Acked-by: Rusty Russell Thanks! Rusty. > --- > kernel/module.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH -RFC] moduleparam: introduce core_param_named macro for non-modular code

2016-11-15 Thread Rusty Russell
Paul Gortmaker writes: > We have the case where module_param_named() in file "foo.c" for > parameter myparam translates that into the bootarg for the > non-modular use case as "foo.myparam=..." > > The problem exists where the use case with the filename and the > dot prefix is established, but the

Re: [PULL] modules: begin maintainer transition

2016-10-27 Thread Rusty Russell
Linus Torvalds writes: > On Tue, Oct 25, 2016 at 4:46 PM, Rusty Russell wrote: >> >> Rusty Russell (1): >> MAINTAINERS: Begin module maintainer transition > > Jessica, do you have a pgp key? And Rusty, have you signed it? That > makes the whole "pull si

Re: taint/module: Clean up global and module taint flags handling

2016-10-25 Thread Rusty Russell
Jiri Kosina writes: > On Fri, 23 Sep 2016, Jessica Yu wrote: > >> Hm, quick question, which tree would this patch go to? Though the >> cleanup is for modules, there is an indirect cross-tree dependency >> (taint_flag.module needs to be true for TAINT_LIVEPATCH for Josh's >> patch to still work as

Re: [RFC PATCH 1/2] module: Ensure a module's state is set accordingly during module coming cleanup code

2016-10-25 Thread Rusty Russell
tate; they seem OK. We actually do this in the init-failed path, so this should be OK. Acked-by: Rusty Russell Thanks, Rusty. > Signed-off-by: Aaron Tomlin > --- > kernel/module.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/module.c b/kernel/module.c

Re: [RFC PATCH 2/2] module: When modifying a module's text ignore modules which are going away too

2016-10-25 Thread Rusty Russell
Aaron Tomlin writes: > By default, during the access permission modification of a module's core > and init pages, we only ignore modules that are malformed. There is no > reason not to extend this to modules which are going away too. Well, it depends on all the callers (ie. ftrace): is that also

Re: [PATCH v2] modversions: treat symbol CRCs as 32 bit quantities on 64 bit archs

2016-10-25 Thread Rusty Russell
nasty wart with the relocation of crcs. If the ppc and arm maintainers are happy, I'm happy for Jessica to take it into her module tree. Acked-by: Rusty Russell Thanks, Rusty. > --- > v2: drop the change to struct modversion_info: it affects the layout of the > __versions

Re: [kernel-hardening] [PATCH] module: extend 'rodata=off' boot cmdline parameter to module mappings

2016-10-25 Thread Rusty Russell
ica as new module maintainer. Thanks! Rusty. >> > >> > This is the first step to make CONFIG_DEBUG_SET_MODULE_RONX mandatory >> > (always-on) in the future as CONFIG_DEBUG_RODATA on x86 and arm64. >> > >> > Suggested-by: Mark Rutland >> > Signed-off-b

[PULL] modules: begin maintainer transition

2016-10-25 Thread Rusty Russell
convince if you want your patches applied. She rocks, and is far more timely than me too! Cheers, Rusty. -------- Rusty Russell (1): MAINTAINERS: Begin module maintainer transition MAINTAINERS | 1 + 1 file changed, 1 insertion(+)

Re: module/taint: Automatically increase the buffer size for new taint flags

2016-09-08 Thread Rusty Russell
Jessica Yu writes: > I liked the enum idea because we got TAINT_FLAGS_COUNT for free :-) > however I think we need to switch back to the #defines because of the kbuild > error. > > The "Error: invalid operands...for `<<'" messages are related to the > __WARN_TAINT() macro (arch/arm64/include/asm/b

Re: [PATCH] module/taint: Automatically increase the buffer size for new taint flags

2016-09-07 Thread Rusty Russell
Petr Mladek writes: > The commit 66cc69e34e86a231 ("Fix: module signature vs tracepoints: > add new TAINT_UNSIGNED_MODULE") updated module_taint_flags() to > potentially print one more character. But it did not increase the > size of the corresponding buffers in m_show() and print_modules(). I ag

Re: [PATCH] tools/lguest: Don't bork the terminal in case of wrong args

2016-09-07 Thread Rusty Russell
Daniel Baluta writes: > On Tue, Dec 8, 2015 at 4:35 PM, Daniel Baluta wrote: >> Running lguest without arguments or with a wrong argument name >> borks the terminal, because the cleanup handler is set up too late >> in the initialization process. >> >> Signed-off-by: Daniel Baluta > > Hi Rusty,

Re: [PATCH] livepatch/module: make TAINT_LIVEPATCH module-specific

2016-08-25 Thread Rusty Russell
led. >> >> Reviewed-by: Chunyu Hu >> Signed-off-by: Josh Poimboeuf > > I like this change. > > Rusty, in case you're okay with it as well, could you please either > provide your Ack so that I could take it through livepatching.git? > Alternatively, if you pre

Re: [PULL] modules-next

2016-08-03 Thread Rusty Russell
Rusty Russell writes: > Linus Torvalds writes: >> So this feels wrong to me, can you guys please explain: ... >> I didn't actually pull the tree, I just reacted to the pull request itself. ... > I can pull them out of modules-next if you'd prefer. OK, removed th

Re: [PATCH 0309/1285] Replace numeric parameter like 0444 with macro

2016-08-02 Thread Rusty Russell
Baole Ni writes: > I find that the developers often just specified the numeric value > when calling a macro which is defined with a parameter for access permission. > As we know, these numeric value for access permission have had the > corresponding macro, > and that using macro can improve the r

Re: [PULL] modules-next

2016-08-01 Thread Rusty Russell
Linus Torvalds writes: > So this feels wrong to me, can you guys please explain: > > On Sun, Jul 31, 2016 at 9:02 PM, Rusty Russell wrote: >> >> Ben Hutchings (3): >> module: Invalidate signatures on force-loaded modules >> module: Disable MODULE_FO

[PULL] modules-next

2016-07-31 Thread Rusty Russell
hen tainting kernel Paul Gortmaker (2): exceptions: fork exception table content from module.h into extable.h extable.h: add stddef.h so "NULL" definition is not implicit Prarit Bhargava (1): modules: Add kernel parameter to blacklist modules Rusty Russell (2

Re: [PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context"

2016-07-28 Thread Rusty Russell
Vegard Nossum writes: > Seeing this, it occurs to me that we should probably add a taint here: Taint has traditionally meant "the user did something unsupported, take the bug report with a grain of salt". Such as force removing a module. So this seems wrong... Cheers, Rusty. > > BUG: sle

Re: [PATCH] extable.h: add stddef.h so "NULL" definition is not implicit

2016-07-27 Thread Rusty Russell
ince currently extable.h is > only used by module.h -- however, we will need this addition present > before we start migrating exception table users off module.h and onto > extable.h during the next release cycle. > > Cc: Rusty Russell > Signed-off-by: Paul Gortmaker > ---

Re: [PATCH 01/14] exceptions: fork exception table content from module.h into extable.h

2016-07-27 Thread Rusty Russell
that only need exception table stuff don't have an include > of module.h that brings in lots of extra stuff and just looks > generally out of place. > > Cc: Rusty Russell > Cc: Andrew Morton > Cc: Linus Torvalds > Signed-off-by: Paul Gortmaker > --- > includ

Re: [PATCH v5] Add kernel parameter to blacklist modules

2016-07-24 Thread Rusty Russell
Prarit Bhargava writes: > Rusty, this looks like it will work. I tested this by adding Applied. Hey, we got there in the end! Thanks for your patience, Rusty.

Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible

2016-07-24 Thread Rusty Russell
Greg KH writes: >> Adding a license here implies we accept that it's actually GPLv2 >> compatible. And IANAL. > > Note, at least lawyer has signed off on this. > > I'd like to see Richard do so as well. Sure, but as I said before I'm not applying it until we have accepted in-tree code which need

Re: [PATCH -next] module: use kmemdup rather than duplicating its implementation

2016-07-18 Thread Rusty Russell
weiyj...@163.com writes: > From: Wei Yongjun > > Use kmemdup rather than duplicating its implementation. > > Generated by: scripts/coccinelle/api/memdup.cocci > > Signed-off-by: Wei Yongjun Hi Wei! This code has been removed by other changes in modules-next, so your very nice cleanup is

Re: [PATCH v2] module.h: add copyleft-next >= 0.3.1 as GPL compatible

2016-07-18 Thread Rusty Russell
Greg KH writes: > On Thu, Jun 30, 2016 at 03:53:27PM -0700, Luis R. Rodriguez wrote: >> copyleft-next [0] [1] is an openly evolved copyleft license, its an >> effort to evolve copyleft without participation of the Church (TM) >> or State (R), completley openly to the extend development and >> disc

Re: [PATCH v3] Add kernel parameter to blacklist modules

2016-07-18 Thread Rusty Russell
me, p, len)) return true; if (p[len] == ',') len++; } return false; } Thanks, Rusty. > > Signed-off-by: Prarit Bhargava > Cc: Jonathan Corbet > Cc: Rusty Russell > Cc:

Re: [PATCH] module: Do a WARN_ON_ONCE() for assert module mutex not held

2016-07-17 Thread Rusty Russell
Steven Rostedt writes: > When running with lockdep enabled, I triggered the WARN_ON() in the > module code that asserts when module_mutex or rcu_read_lock_sched are > not held. The issue I have is that this can also be called from the > dump_stack() code, causing us to enter an infinite loop... T

Re: modules: add ro_after_init support

2016-06-29 Thread Rusty Russell
Jessica Yu writes: > +++ Rusty Russell [29/06/16 10:38 +0930]: >>Jessica Yu writes: >>> Add ro_after_init support for modules by adding a new page-aligned section >>> in the module layout (after rodata) for ro_after_init data and enabling RO >>> protection for

Re: [PATCH 1/1] modules: add ro_after_init support

2016-06-28 Thread Rusty Russell
Jessica Yu writes: > Add ro_after_init support for modules by adding a new page-aligned section > in the module layout (after rodata) for ro_after_init data and enabling RO > protection for that section after module init runs. > > Signed-off-by: Jessica Yu I would prefer a "bool after_init" flag

Re: Freeing alternatives sections after module init?

2016-06-28 Thread Rusty Russell
Jessica Yu writes: > Hi Rusty, Hi Jessica, > I noticed that the module loader keeps .altinstructions and > .altinstr_replacement (which are normally freed after kernel init) in > core memory after module init, so these sections are never freed for > modules. > > In fact, the module loader seems

Re: [PATCH 10/12] lguest: Only descend into lguest directory when CONFIG_LGUEST is set

2016-06-20 Thread Rusty Russell
"Andrew F. Davis" writes: > When CONFIG_LGUEST is not set make will still descend into the lguest > directory but nothing will be built. This produces unneeded build > artifacts and messages in addition to slowing the build. Fix this here. > > Signed-off-by: Andrew F. Davis > --- > drivers/Makef

Re: [PATCH v2] Add kernel parameter to blacklist modules

2016-06-14 Thread Rusty Russell
name. > > [v2]: Rusty, use core_param() instead of __setup(), and drop struct which > simplifies things. > > Signed-off-by: Prarit Bhargava > Cc: Jonathan Corbet > Cc: Rusty Russell > Cc: linux-...@vger.kernel.org > --- > Documentation/kernel-para

Re: [PATCH] Add kernel parameter to blacklist modules

2016-06-13 Thread Rusty Russell
3] module dummy_module has been blacklisted. This module will > not load. > > Signed-off-by: Prarit Bhargava > Cc: Jonathan Corbet > Cc: Rusty Russell > Cc: linux-...@vger.kernel.org > --- > Documentation/kernel-parameters.txt |3 +++ > kernel/module.c

Re: [PATCH] cpumask: fix code comment

2016-06-08 Thread Rusty Russell
Geliang Tang writes: > Fix code comment for cpumask_parse(). > > Signed-off-by: Geliang Tang Acked-by: Rusty Russell (CC'd triv...@kernel.org). Thanks, Rusty. > --- > include/linux/cpumask.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --gi

Re: Adding module support for __ro_after_init

2016-06-04 Thread Rusty Russell
Kees Cook writes: > Hi Rusty, > > I'd love to get your thoughts on the best way to support > __ro_after_init markings for modules. Are the r/o markings done after > module __init runs? If so, this should make things easy, and then we > just need to move .data..ro_after_init into .rodata at link ti

Re: [PATCH 1/3] module: Invalidate signatures on force-loaded modules

2016-04-27 Thread Rusty Russell
Ben Hutchings writes: > On Tue, 2016-04-26 at 20:07 +0930, Rusty Russell wrote: >> Ben Hutchings writes: >> > - if (info->len > markerlen && >> > + /* >> > +  * Require flags == 0, as a module with version information >>

Re: [PATCH 1/3] module: Invalidate signatures on force-loaded modules

2016-04-26 Thread Rusty Russell
Ben Hutchings writes: > Signing a module should only make it trusted by the specific kernel it > was built for, not anything else. Loading a signed module meant for a > kernel with a different ABI could have interesting effects. > Therefore, treat all signatures as invalid when a module is > forc

Re: [PATCH] module: Issue warnings when tainting kernel

2016-04-12 Thread Rusty Russell
Libor Pechacek writes: > While most of the locations where a kernel taint bit is set are accompanied > with a warning message, there are two which set their bits silently. If > the tainting module gets unloaded later on, it is almost impossible to tell > what was the reason for setting the flag.

Re: [PATCH v2] module: fix noreturn attribute for __module_put_and_exit()

2016-04-12 Thread Rusty Russell
Jiri Kosina writes: > On Wed, 30 Mar 2016, Jiri Kosina wrote: > >> > __module_put_and_exit() is makred noreturn in module.h declaration, but is >> > lacking the attribute in the definition, which makes some tools (such as >> > sparse) unhappy. Amend the definition with the attribute as well (and >

Re: [PATCH v4 07/14] tools/lguest: force disable tboot and apm

2016-04-10 Thread Rusty Russell
; > Signed-off-by: Luis R. Rodriguez Nice, thanks! Acked-by: Rusty Russell Cheers, Rusty.

[tip:x86/urgent] lguest, x86/entry/32: Fix handling of guest syscalls using interrupt gates

2016-04-01 Thread tip-bot for Rusty Russell
Commit-ID: f87e0434a3bedeb5e4d75d96d9f3ad424dae6b33 Gitweb: http://git.kernel.org/tip/f87e0434a3bedeb5e4d75d96d9f3ad424dae6b33 Author: Rusty Russell AuthorDate: Fri, 1 Apr 2016 12:15:46 +1030 Committer: Ingo Molnar CommitDate: Fri, 1 Apr 2016 08:58:13 +0200 lguest, x86/entry/32: Fix

Re: [PATCH 11/12] x86/entry/32: Change INT80 to be an interrupt gate

2016-03-31 Thread Rusty Russell
again was a bit of a trip. Thanks! Rusty. --- From: Rusty Russell Subject: lguest: fix handling of guest syscalls using interrupt gates. In a798f091113e ("x86/entry/32: Change INT80 to be an interrupt gate") Andy broke lguest. This is because lguest had special code to allow the 0x80

Re: [PATCH v6 2/5] module: preserve Elf information for livepatch modules

2016-03-31 Thread Rusty Russell
+++++++-- > 2 files changed, 147 insertions(+), 3 deletions(-) Acked-by: Rusty Russell (I guess that takes precedence over "Reviewed-by", which I did too). Thanks, Rusty. > diff --git a/include/linux/module.h b/include/linux/module.h > index 2bb0c30.

Re: [PATCH v2] module: fix noreturn attribute for __module_put_and_exit()

2016-03-31 Thread Rusty Russell
Jiri Kosina writes: > __module_put_and_exit() is makred noreturn in module.h declaration, but is > lacking the attribute in the definition, which makes some tools (such as > sparse) unhappy. Amend the definition with the attribute as well (and > reformat the declaration so that it uses more common

Re: [PATCH v2] module: fix noreturn attribute for __module_put_and_exit()

2016-03-31 Thread Rusty Russell
Jiri Kosina writes: > On Mon, 21 Mar 2016, Jiri Kosina wrote: > >> __module_put_and_exit() is makred noreturn in module.h declaration, but is >> lacking the attribute in the definition, which makes some tools (such as >> sparse) unhappy. Amend the definition with the attribute as well (and >> refo

Re: A problem about loading module

2016-03-28 Thread Rusty Russell
"zhaogongyi.jxjian" writes: > My question is when my module_init defined as: > void __init__ func_init(*) > then the ret will be alterable,it depends on specifically running env,that's > what we want? Hi, This will not work reliably. You must define your init as int __init

Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted()

2016-03-22 Thread Rusty Russell
in the common case. > > Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell Thanks! Rusty. > --- > init/main.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/init/main.c b/init/main.c > index b3c6e363ae18..d76d94cd537c 100644 > -

Re: [PATCH] module: fix noreturn attribute for __module_put_and_exit()

2016-03-19 Thread Rusty Russell
Jiri Kosina writes: > __module_put_and_exit() is makred noreturn in module.h declaration, but is > lacking the attribute in the definition, which makes some tools (such as > sparse) unhappy. Amend the definition with the attribute as well (and > reformat the declaration so that it uses more com

Re: [PATCH 0/3] Livepatch module notifier cleanup

2016-03-09 Thread Rusty Russell
Jessica Yu writes: > These are the remaining 3 patches that came from the original ftrace/livepatch > module notifier patchset found here: https://lkml.org/lkml/2016/2/8/1180 Please add my Acked-by to the first and third. Cheers, Rusty. > Basically, the patchset does a bit of module.c cleanup (

Re: [PATCH 2/3] modules: set mod->state to GOING before going notifiers are called

2016-03-09 Thread Rusty Russell
Jessica Yu writes: > In load_module(), the going notifiers are called during error handling > when an error occurs after the coming notifiers have already been called. > However, a module's state is still MODULE_STATE_COMING when the going > notifiers are called in the error path. To be consistent

Re: [PATCH v5 1/2] cpumask: export cpumask_any_but

2016-03-02 Thread Rusty Russell
Jacob Pan writes: > Export cpumask_any_but() for module use. This will be used by drivers > such as intel_rapl to locate an active cpu on a socket. > > Signed-off-by: Jacob Pan Acked-by: Rusty Russell Thanks! Rusty. > --- > lib/cpumask.c | 1 + > 1 file changed, 1

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-29 Thread Rusty Russell
Jiri Kosina writes: > On Wed, 10 Feb 2016, Rusty Russell wrote: > >> > Remove the livepatch module notifier in favor of directly enabling and >> > disabling patches to modules in the module loader. Hard-coding the >> > function calls ensures that ftr

Re: [PATCH] cpumask: remove incorrect information from comment

2016-02-29 Thread Rusty Russell
Eric Biggers writes: > Since commit cdfdef75e795f ("cpumask: only allocate nr_cpumask_bits."), > this comment above cpumask_size() is no longer relevant. > > Signed-off-by: Eric Biggers Acked-by: Rusty Russell > --- > include/linux/cpumask.h | 2 -- > 1 file c

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

2016-02-09 Thread Rusty Russell
in such case though. > > The problem is that we set the three values above in the COMMING > state. They were even set in the LIVE state before this patch. True. Indeed, I have a fix for exactly this queued in my fixes tree, and am about to send Linus a pull req. Below is the fix I went w

Re: [PATCH v4 4/4] livepatch/module: remove livepatch module notifier

2016-02-09 Thread Rusty Russell
Jessica Yu writes: > Remove the livepatch module notifier in favor of directly enabling and > disabling patches to modules in the module loader. Hard-coding the > function calls ensures that ftrace_module_enable() is run before > klp_module_coming() during module load, and that klp_module_going()

[PULL] module fixes (stable)

2016-02-09 Thread Rusty Russell
this cycle (livepatch), but wanted these in now. Thanks, Rusty. Luis R. Rodriguez (1): modules: fix modparam async_probe request Rusty Russell (2): module: wrapper for symbol name. modules: fix longstanding /proc

Re: [PATCH 6/6] kconfig option for TRIM_UNUSED_EXPSYMS

2016-02-09 Thread Rusty Russell
Nicolas Pitre writes: > On Tue, 9 Feb 2016, Christoph Hellwig wrote: > >> On Mon, Feb 08, 2016 at 03:28:35PM -0500, Nicolas Pitre wrote: >> > The config option to enable it all. >> >> Just enable it by default.. > > :-) > > Viro took the opposite view with this patch: > > http://lkml.org/lkml/201

Re: [PATCH 6/6] kconfig option for TRIM_UNUSED_EXPSYMS

2016-02-08 Thread Rusty Russell
Nicolas Pitre writes: > The config option to enable it all. > > Signed-off-by: Nicolas Pitre Nice series! In case you need it, here's my Ack. Despite the overlap with modules, it's all build trickery, so best via Sam's tree. Acked-by: Rusty Russell Thanks, Rusty.

Re: livepatch/module: remove livepatch module notifier

2016-02-07 Thread Rusty Russell
Jessica Yu writes: > +++ Petr Mladek [04/02/16 15:39 +0100]: >>On Mon 2016-02-01 20:17:36, Jessica Yu wrote: > [ snipped since email is getting long ] >>> diff --git a/kernel/module.c b/kernel/module.c >>> index b05d466..71c77ed 100644 >>> --- a/kernel/module.c >>> +++ b/kernel/module.c >>> @@ -53

Re: [PATCH v2 0/2] Fix ordering of ftrace/livepatch calls on module load and unload

2016-02-04 Thread Rusty Russell
Linus through my tree. > > If you get Rusty's acks, you can add my: > > Reviewed-by: Steven Rostedt > > on the first patch and take it through your tree. Agreed. Acked-by: Rusty Russell (module.c parts) Cheers, Rusty.

[PATCH 3/3] modules: fix longstanding /proc/kallsyms vs module insertion race.

2016-02-04 Thread Rusty Russell
ne inside the struct module itself (it could also have been allocated at the end of the module core, but that's probably overkill). Reported-by: Weilong Chen Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111541 Cc: sta...@kernel.org Signed-off-by: Rusty Russell --- include/l

[PATCH 1/3] modules: fix modparam async_probe request

2016-02-04 Thread Rusty Russell
used. This was overlooked when the form in which in-kernel async probe support was reworked a bit... Fix this as originally intended. Cc: Hannes Reinecke Cc: Dmitry Torokhov Cc: sta...@vger.kernel.org (4.2+) Signed-off-by: Luis R. Rodriguez Signed-off-by: Rusty Russell [minimized] Signed-off-

[PATCH 2/3] module: wrapper for symbol name.

2016-02-04 Thread Rusty Russell
This trivial wrapper adds clarity and makes the following patch smaller. Cc: sta...@kernel.org Signed-off-by: Rusty Russell --- kernel/module.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 2149f7003e49

[PATCH 0/3] module stable fixes.

2016-02-04 Thread Rusty Russell
case, but not fix it for the other kallsyms users). If no complaints, I'll send Linus a pull req. Thanks! Rusty. Luis R. Rodriguez (1): modules: fix modparam async_probe request Rusty Russell (2): module: wrapper for symbol name. modules: fix longstanding /proc/kallsyms vs module

Re: [Bug 111541] Race between cat /proc/kallsyms and rmmod

2016-02-03 Thread Rusty Russell
bugzilla-dae...@bugzilla.kernel.org writes: > https://bugzilla.kernel.org/show_bug.cgi?id=111541 > > --- Comment #8 from Weilong Chen --- > (In reply to Rusty Russell from comment #7) >> Rusty Russell writes: >> > And there are other places with the same issue. This

Re: [Bug 111541] Race between cat /proc/kallsyms and rmmod

2016-02-01 Thread Rusty Russell
Rusty Russell writes: > And there are other places with the same issue. This is a more > complex, but I think worth it (actually two patches, rolled into one > for testing): And this one actually works... diff --git a/include/linux/module.h b/include/linux/module.h index 456

Re: [Bug 111541] Race between cat /proc/kallsyms and rmmod

2016-02-01 Thread Rusty Russell
Peter Zijlstra writes: > Adding lkml to Cc so that there is an actual email record of this. > > (I could for example not reply to Masami's later entries). > > On Mon, Feb 01, 2016 at 12:02:01PM +1030, Rusty Russell wrote: >> > https://bugzilla.kernel.org/show_bug.cgi

Duplicated module names

2016-01-28 Thread Rusty Russell
Lucas De Marchi writes: > Hi! > > CC'ing Rusty and mailing lists Thanks. > Rusty and ohers: it looks like both CONFIG_CRC32 and > CONFIG_CRYPTO_CRC32 can be compiled as module, and they generate > modules with the same name, crc32. Could that be fixed? Gah. Looks like it's been that way since

Re: [PATCH 0/4] support for text-relative kallsyms table

2016-01-26 Thread Rusty Russell
Ard Biesheuvel writes: > On 21 January 2016 at 07:45, Ard Biesheuvel wrote: >> On 21 January 2016 at 06:10, Rusty Russell wrote: >>> Ard Biesheuvel writes: >>>> This implements text-relative kallsyms address tables. This was developed >>>&g

Re: [PATCH v2] mm: make apply_to_page_range more robust

2016-01-20 Thread Rusty Russell
David Rientjes writes: > On Wed, 20 Jan 2016, Mika Penttilä wrote: > >> Recent changes (4.4.0+) in module loader triggered oops on ARM. >> >> can be 0 triggering the bug BUG_ON(addr >= end);. >> >> The call path is SyS_init_module()->set_memory_xx()->apply_to_page_range(), >> and apply_to_

Re: [PATCH 0/4] support for text-relative kallsyms table

2016-01-20 Thread Rusty Russell
Ard Biesheuvel writes: > This implements text-relative kallsyms address tables. This was developed > as part of my series to implement KASLR/CONFIG_RELOCATABLE for arm64, but > I think it may be beneficial to other architectures as well, so I am > presenting it as a separate series. Nice work! A

Re: [PATCH v2] ftrace/module: Call clean up function when module init fails early

2016-01-06 Thread Rusty Russell
Steven Rostedt writes: > [ Bah, I forgot to commit the ftrace.h part, lucky I test on another > box than what I compile test on ;-) ] Acked-by: Rusty Russell Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a m

Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()'

2015-12-15 Thread Rusty Russell
patterns >> across the kernel. There won't be any unsafe API left. > > Sure, I guess that won't hurt, and we could quietly start deprecating the > zalloc pattern just to avoid the redundancy in the long run.. I like the zalloc naming, it's clear. But the series lo

  1   2   3   4   5   6   7   8   9   10   >