Re: [PATCH] firmware: Fix security issue with request_firmware_into_buf()

2018-08-02 Thread Luis Chamberlain
On Wed, Aug 1, 2018, 4:26 PM Rishabh Bhatnagar wrote: > When calling request_firmware_into_buf() with the FW_OPT_NOCACHE flag > it is expected that firmware is loaded into buffer from memory. > But inside alloc_lookup_fw_priv every new firmware that is loaded is > added to the firmware cache

Re: [PATCH] firmware: Avoid caching firmware when FW_OPT_NOCACHE is set

2018-07-25 Thread Luis Chamberlain
On Thu, Jul 19, 2018 at 02:25:21PM -0700, Rishabh Bhatnagar wrote: > When calling request_firmware_into_buf(), we pass the FW_OPT_NOCACHE > flag with the intent of skipping the caching mechanism of the > firmware loader. Unfortunately, that doesn't work, because > alloc_lookup_fw_priv() isn't told

Re: [PATCH 1/1] Preventive patch in the proc file-system to handle NULL check.

2018-08-16 Thread Luis Chamberlain
On Thu, Aug 16, 2018 at 03:04:13PM +0530, Srikanth K H wrote: > If the make directory for "sys" interface fail's then its > dereferenced without even checking for its validity which > will lead to crash, hence added preventive code to check > for NULL and accordingly dereference. > >

Re: [PATCH] kernel/sysctl.c: remove duplicated include

2018-10-04 Thread Luis Chamberlain
#include > > #include > > -#include > > > > #include > > #include > > Reviewed-by: Richard Weinberger Acked-by: Luis Chamberlain Luis

[ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
Every now and then a project is born, and they decide to use Linux's kconfig to enable configuration of their project. As it stands we *know* kconfig is now used in at least over 12 different projects [0]. I myself added kconfig to one as well years ago. Even research reveals that kconfig has

Re: [kconfig-sat] [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
On Thu, Oct 04, 2018 at 01:09:00PM -0700, Josh Triplett wrote: > On Thu, Oct 04, 2018 at 01:02:49PM -0700, Luis Chamberlain wrote: > > Every now and then a project is born, and they decide to use Linux's > > kconfig to enable configuration of their project. As it stands we *kn

Re: [kconfig-sat] [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-10-04 Thread Luis Chamberlain
On Thu, Oct 04, 2018 at 01:41:18PM -0700, Josh Triplett wrote: > I would *love* to see Kconfig in Linux evolved to be more easily reused. This *can* happen. Let me itemize a few things off of my head I think would need to be done as its at least fresh in my head now: All we need from

Re: [PATCH] firmware: Always initialize the fw_priv list object

2018-10-01 Thread Luis Chamberlain
On Mon, Oct 01, 2018 at 03:27:03PM +0200, Niklas Cassel wrote: > On Thu, Sep 20, 2018 at 12:34:15AM -0700, Bjorn Andersson wrote: > > On Wed 19 Sep 22:22 PDT 2018, Greg Kroah-Hartman wrote: > > > > > On Wed, Sep 19, 2018 at 06:09:38PM -0700, Bjorn Andersson wrote: > > > > When freeing the fw_priv

Re: [PATCH] firmware: Always initialize the fw_priv list object

2018-10-01 Thread Luis Chamberlain
On Mon, Oct 01, 2018 at 11:32:16AM -0700, Bjorn Andersson wrote: > On Mon 01 Oct 11:18 PDT 2018, Luis Chamberlain wrote: > > > On Mon, Oct 01, 2018 at 03:27:03PM +0200, Niklas Cassel wrote: > > > On Thu, Sep 20, 2018 at 12:34:15AM -0700, Bjorn Andersson wrote: > > >

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 08:48:11AM -0600, Eric W. Biederman wrote: > Luis Chamberlain writes: > > > The logic seems sensible then, but are we implicating what a container > > does with its sysctl values onto the entire system? If so, sure, it > > seems you want this

Re: [RFC v3 06/19] arch: um: enable running kunit from User Mode Linux

2018-11-30 Thread Luis Chamberlain
On Fri, Nov 30, 2018 at 08:05:34AM -0600, Rob Herring wrote: > On Thu, Nov 29, 2018 at 9:37 PM Luis Chamberlain wrote: > > > > On Wed, Nov 28, 2018 at 03:26:03PM -0600, Rob Herring wrote: > > > On Wed, Nov 28, 2018 at 1:37 PM Brendan Higgins > > > wrote: &g

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 11:29:40PM -0600, Eric W. Biederman wrote: > Luis Chamberlain writes: > > Thanks for the description of how to run into the issue described but > > is there also a practical use case today where this is happening? I ask > > as it would be good

Re: [PATCH 2/2] selftests: firmware: add CONFIG_FW_LOADER_USER_HELPER_FALLBACK to config

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 09:12:16PM -0600, Dan Rue wrote: > CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y is required for fw_fallback.sh. > Without it, fw_fallback.sh fails with 'usermode helper disabled so > ignoring test'. Enable the config in selftest so that it gets built by > default. > >

Re: [PATCH 1/2] selftests: firmware: remove use of non-standard diff -Z option

2018-11-29 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 09:12:15PM -0600, Dan Rue wrote: > diff -Z is used to trim the trailing whitespace when comparing the > loaded firmware file with the source firmware file. However, per the > comment in the source code, -Z should not be necessary. In testing, the > input and output files

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-11-30 Thread Luis Chamberlain
Cheng, thanks for the patch! On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > If the number of input parameters is less than the total > parameters, an INVAL error will be returned. Do you mean EINVAL? > This patch ensure no error returned in this condition, just > like other

Re: Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-03 Thread Luis Chamberlain
On Mon, Dec 03, 2018 at 01:12:39PM +0800, cheng.lin...@zte.com.cn wrote: > >Cheng, thanks for the patch! > > > >On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > >> If the number of input parameters is less than the total > >> parameters, an INVAL error will be returned. > > > >Do you

Re: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax

2018-12-06 Thread Luis Chamberlain
* Arrays are not supported, keep this simple. *Do not* add > * support for them. > */ > if (vleft != 1) { > *lenp = 0; > return -EINVAL; > } > ... > } > > So, just __do_proc_doulongvec_mi

Re: Re: Re: [PATCH] proc/sysctl: fix return error forproc_doulongvec_minmax

2018-12-05 Thread Luis Chamberlain
On Wed, Dec 05, 2018 at 03:10:07PM +0800, cheng.lin...@zte.com.cn wrote: > > On Mon, Dec 03, 2018 at 01:12:39PM +0800, cheng.lin...@zte.com.cn wrote: > > > >Cheng, thanks for the patch! > > > > > > > >On Fri, Nov 30, 2018 at 02:35:17PM +0800, Cheng Lin wrote: > > > >> If the number of input

Re: [PATCH v2] sysctl: kselftests: fix test_modprobe issue

2018-11-21 Thread Luis Chamberlain
On Thu, Sep 06, 2018 at 06:22:54PM +0800, Lei Yang wrote: > when CONFIG_TEST_SYSCTL=y, there is no "/sys/module/test_sysctl/" > when CONFIG_TEST_SYSCTL=m, checking /sys/module/test_sysctl/ is > before kernel module loading > > you'll get below error message > root@intel-x86-64:/tmp/sysctl#

Re: [kconfig-sat] Re: [ANN] init-kconfig - easy way to embrace Linux's kconfig

2018-11-21 Thread Luis Chamberlain
On Fri, Oct 05, 2018 at 07:48:34PM +0900, Masahiro Yamada wrote: > Hi, > > > > On Fri, Oct 5, 2018 at 5:03 AM Luis Chamberlain wrote: > > > > Every now and then a project is born, and they decide to use Linux's > > kconfig to enable configuration of the

Re: test_kmod: BUG on module removal

2018-11-23 Thread Luis Chamberlain
On Sat, Oct 13, 2018 at 10:59:46AM -0700, Randy Dunlap wrote: > 4.19-rc7, on x86_64: > > modprobe test_kmod; rmmod test_kmod > > [ 199.033143] calling test_kmod_init+0x0/0x1000 [test_kmod] @ 1704 > [ 199.034636] misc test_kmod0: interface ready > [ 199.035468] initcall

[PATCH] test_kmod: fix rmmod double free

2018-11-23 Thread Luis Chamberlain
We double free the misc device string twice on rmmod, fix this. Without this we cannot remove the module without crashing. Cc: # for v4.12 and up Reported-by: Randy Dunlap Signed-off-by: Luis Chamberlain --- lib/test_kmod.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib

Re: [PATCH] fs: Make /proc/sys inodes be owned by global root.

2018-11-26 Thread Luis Chamberlain
On Mon, Nov 26, 2018 at 06:26:07PM +0100, Radoslaw Burny wrote: > Due to a recent commit (d151ddc00498 - fs: Update i_[ug]id_(read|write) > to translate relative to s_user_ns), Recent? This is commit is from 2014 and present upstream since v4.8. And the commit ID you mentioned in your commit log

Re: [PATCH v2 1/2] firmware: add nowarn variant of request_firmware_nowait()

2018-11-19 Thread Luis Chamberlain
On Mon, Nov 12, 2018 at 05:01:42PM +0100, Lucas Stach wrote: > Device drivers with optional firmware may still want to use the > asynchronous firmware loading interface. To avoid printing a > warining into the kernel log when the optional firmware is > absent, add a nowarn variant of this

Re: [PATCH -next] sysctl: fix memleak in proc_sys_call_handler()

2020-08-13 Thread Luis Chamberlain
o to free buff when copy_from_iter_full() is failed. > > Fixes: 1dea05cbc0d7 ("sysctl: Convert to iter interfaces") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang Acked-by: Luis Chamberlain Good catch. Luis > --- > fs/proc/proc_sysctl.c | 2 +- > 1 fi

Re: [PATCH 2/3] mm, page_poison: use static key more efficiently

2020-11-11 Thread Luis Chamberlain
On Fri, Oct 30, 2020 at 11:56:48PM +0100, Vlastimil Babka wrote: > On 10/30/20 5:27 PM, Luis Chamberlain wrote: > > On Mon, Oct 26, 2020 at 06:33:57PM +0100, Vlastimil Babka wrote: > > > Commit 11c9c7edae06 ("mm/page_poison.c: replace bool variable with static &g

Re: [PATCH] sysctl: move local variable in proc_do_large_bitmap() to proper scope

2020-11-13 Thread Luis Chamberlain
On Mon, Nov 09, 2020 at 05:26:37PM -0800, Tom Rix wrote: > > On 11/8/20 11:11 PM, Lukas Bulwahn wrote: > > make clang-analyzer caught my attention with: > > > > kernel/sysctl.c:1511:4: warning: Value stored to 'first' is never read \ > > [clang-analyzer-deadcode.DeadStores] > >

Re: [PATCH 2/3] mm, page_poison: use static key more efficiently

2020-10-30 Thread Luis Chamberlain
On Mon, Oct 26, 2020 at 06:33:57PM +0100, Vlastimil Babka wrote: > Commit 11c9c7edae06 ("mm/page_poison.c: replace bool variable with static > key") > changed page_poisoning_enabled() to a static key check. However, the function > is not inlined, so each check still involves a function call with

[PATCH] block: fix userspace documentation reference for del_gendisk()

2020-11-17 Thread Luis Chamberlain
Commit b5bd357cf8b ("block: add docs for gendisk / request_queue refcount helpers") has a typo where it references drivers for del_gendisk() when we instead meant userspace, as the reference is to the userspace experience. This fixes this. Signed-off-by: Luis Chamberlain --- block/g

Re: kconfig as a git subtree on Linux

2020-11-26 Thread Luis Chamberlain
On Thu, Nov 26, 2020 at 09:13:29AM +, Christoph Hellwig wrote: > On Wed, Nov 25, 2020 at 05:25:44PM +0000, Luis Chamberlain wrote: > > I'd like to propose we discuss the possibility of taking kconfig and > > making it a git subtree under the Linux kernel. This would allow >

Re: kconfig as a git subtree on Linux

2020-11-26 Thread Luis Chamberlain
On Thu, Nov 26, 2020 at 12:38:41PM +0200, Boris Kolpackov wrote: > Luis Chamberlain writes: > > > I'd like to propose we discuss the possibility of taking kconfig and > > making it a git subtree under the Linux kernel. This would allow > > other projects outside of the

kconfig as a git subtree on Linux

2020-11-25 Thread Luis Chamberlain
I'd like to propose we discuss the possibility of taking kconfig and making it a git subtree under the Linux kernel. This would allow other projects outside of the Linux kernel to be able to update their own copy / fork of kconfig in a jiffie *very* easily. Why? kconfig has far outlived its own

Re: [PATCH 3/3] firmware: add mutex fw_lock_fallback for race condition

2019-08-23 Thread Luis Chamberlain
On Fri, Aug 23, 2019 at 12:31:40PM +0200, Takashi Iwai wrote: > So, if any, we'd need put a mutex around the fallback loader code. > And, the mutex should be rather per device, not a global one. > > Or we may trick it by appending the second parallel caller into the > same wait queue, but the

Re: [PATCH 2/7] firmware: add offset to request_firmware_into_buf

2019-08-23 Thread Luis Chamberlain
On Thu, Aug 22, 2019 at 04:30:37PM -0700, Scott Branden wrote: > On 2019-08-22 2:12 p.m., Luis Chamberlain wrote: > > On Thu, Aug 22, 2019 at 01:07:41PM -0700, Scott Branden wrote: > > > On 2019-08-22 12:47 p.m., Luis Chamberlain wrote: > > > > This implies you havi

Re: [PATCH 1/7] fs: introduce kernel_pread_file* support

2019-08-23 Thread Luis Chamberlain
On Fri, Aug 23, 2019 at 12:55:30PM -0700, Scott Branden wrote: > Hi Takashi > > On 2019-08-23 5:29 a.m., Takashi Iwai wrote: > > On Thu, 22 Aug 2019 21:24:45 +0200, > > Scott Branden wrote: > > > Add kernel_pread_file* support to kernel to allow for partial read > > > of files with an offset into

Re: [PATCH 2/3] firmware: add offset to request_firmware_into_buf

2019-08-19 Thread Luis Chamberlain
On Thu, Aug 01, 2019 at 11:15:19AM -0700, Scott Branden wrote: > Hi Luis, > > On 2019-08-01 10:42 a.m., Luis Chamberlain wrote: > > On Thu, Aug 01, 2019 at 08:18:01AM +0200, Greg Kroah-Hartman wrote: > > > On Wed, Jul 31, 2019 at 05:18:32PM -0700, Scott Brande

Re: [PATCH 3/3] firmware: add mutex fw_lock_fallback for race condition

2019-08-19 Thread Luis Chamberlain
On Mon, Aug 19, 2019 at 09:19:51AM -0700, Scott Branden wrote: > To be honest, I find the entire firmware code sloppy. And that is after years of cleanup on my part. Try going back to v4.1 for instance, check the code out then for an incredible horrific sight :) > I don't think the

Re: XFS segementation fault with new linux 4.19.63

2019-08-06 Thread Luis Chamberlain
On Tue, Aug 06, 2019 at 07:23:18PM +1000, Dave Chinner wrote: > On Tue, Aug 06, 2019 at 09:10:57AM +0200, Kinky Nekoboi wrote: > > Addional info: > > > > this only occurs if kernel is compiled with: > > > > CONFIG_XFS_DEBUG=y > > > > running 4.19.64 without xfs debugging works fine > > I'm

Re: [PATCH v3] fs: Fix the default values of i_uid/i_gid on /proc/sys inodes.

2019-07-08 Thread Luis Chamberlain
ible to open the file for writing. > > Fixes: 0bd23d09b874 ("vfs: Don't modify inodes with a uid or gid unknown to > the vfs") > Cc: sta...@vger.kernel.org # v4.8+ > Signed-off-by: Radoslaw Burny Acked-by: Luis Chamberlain Andrew, When you get a chance, can you p

[ANN] kdevops - Linux kernel development devops framework

2019-08-16 Thread Luis Chamberlain
I'd like to announce my first release of kdevops [0] which I am happy to share with the community. The goal behind this project is to provide a modern devops framework for Linux kernel development. It is not a tests suite, it is designed to *use* *any* test suites, and more importantly, it allows

Re: [PATCH 1/3] test_firmware: add support for request_firmware_into_buf

2019-08-18 Thread Luis Chamberlain
t been added to test such api in test_firmware until now. > > Signed-off-by: Scott Branden Thanks for the patch! Acked-by: Luis Chamberlain Luis

Re: [PATCH 2/3] selftest: firmware: Add request_firmware_into_buf tests

2019-08-18 Thread Luis Chamberlain
On Thu, Aug 15, 2019 at 05:09:44PM -0700, Scott Branden wrote: > Add tests cases for checking request_firmware_into_buf api. > API was introduced into kernel with no testing present previously. > > Signed-off-by: Scott Branden Acked-by: Luis Chamberlain Luis

Re: [PATCH 3/3] firmware: add mutex fw_lock_fallback for race condition

2019-08-18 Thread Luis Chamberlain
On Thu, Aug 15, 2019 at 05:09:45PM -0700, Scott Branden wrote: > A race condition exists between _request_firmware_prepare checking > if firmware is assigned and firmware_fallback_sysfs creating a sysfs > entry (kernel trace below). To avoid such condition add a mutex > fw_lock_fallback to

Re: [PATCH REBASE v4 05/14] arm64, mm: Make randomization selected by generic topdown mmap layout

2019-07-24 Thread Luis Chamberlain
On Wed, Jul 24, 2019 at 01:58:41AM -0400, Alexandre Ghiti wrote: > diff --git a/mm/util.c b/mm/util.c > index 0781e5575cb3..16f1e56e2996 100644 > --- a/mm/util.c > +++ b/mm/util.c > @@ -321,7 +321,15 @@ unsigned long randomize_stack_top(unsigned long > stack_top) > } > > #ifdef

Re: [PATCH REBASE v4 12/14] mips: Replace arch specific way to determine 32bit task with generic version

2019-07-24 Thread Luis Chamberlain
On Wed, Jul 24, 2019 at 01:58:48AM -0400, Alexandre Ghiti wrote: > Mips uses TASK_IS_32BIT_ADDR to determine if a task is 32bit, but > this define is mips specific and other arches do not have it: instead, > use !IS_ENABLED(CONFIG_64BIT) || is_compat_task() condition. > > Signed-off-by: Alexandre

Re: [PATCH REBASE v4 00/14] Provide generic top-down mmap layout functions

2019-07-24 Thread Luis Chamberlain
Other than the two comments: Reviewed-by: Luis Chamberlain Luis

Dynamic source include for kconfig

2020-09-04 Thread Luis Chamberlain
Hey Masahiro, I ended up needing to do a dyanmic include of kconfig files to support custom / private vagrant boxes in a project I maintain. I figured out a way to do it, and not sure if it was intended, but it works:

Re: Dynamic source include for kconfig

2020-09-04 Thread Luis Chamberlain
On Fri, Sep 4, 2020 at 9:24 AM Luis Chamberlain wrote: > > Hey Masahiro, > > I ended up needing to do a dyanmic include of kconfig files to support > custom / private vagrant boxes in a project I maintain. I figured out > a way to do it, and not sure if it was intended, but i

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-18 Thread Luis Chamberlain
On Mon, May 18, 2020 at 03:16:45PM -0700, Jakub Kicinski wrote: > On Mon, 18 May 2020 21:22:02 +0000 Luis Chamberlain wrote: > > Indeed my issue with devlink is that it did not seem generic enough for > > all devices which use firmware and for which firmware can crash. Support >

Re: [PATCH v2 12/15] ath10k: use new module_firmware_crashed()

2020-05-19 Thread Luis Chamberlain
On Mon, May 18, 2020 at 06:23:33PM -0700, Brian Norris wrote: > On Sat, May 16, 2020 at 6:51 AM Johannes Berg > wrote: > > In addition, look what we have in iwl_trans_pcie_removal_wk(). If we > > detect that the device is really wedged enough that the only way we can > > still try to recover is

Re: [PATCH v5 5/7] blktrace: fix debugfs use after free

2020-05-19 Thread Luis Chamberlain
On Tue, May 19, 2020 at 04:44:08PM +0200, Greg KH wrote: > On Sat, May 16, 2020 at 03:19:54AM +0000, Luis Chamberlain wrote: > > struct dentry *blk_debugfs_root; > > +struct dentry *blk_debugfs_bsg = NULL; > > checkpatch didn't complain about "= NULL;"?

Re: [PATCH v4 2/4] sysctl: Move some boundary constants form sysctl.c to sysctl_vals

2020-05-19 Thread Luis Chamberlain
On Wed, May 20, 2020 at 09:14:08AM +0800, Xiaoming Ni wrote: > On 2020/5/19 12:44, Tetsuo Handa wrote: > > On 2020/05/19 12:31, Xiaoming Ni wrote: > > > Some boundary (.extra1 .extra2) constants (E.g: neg_one two) in > > > sysctl.c are used in multiple features. Move these variables to > > >

Re: [PATCH v4 0/4] cleaning up the sysctls table (hung_task watchdog)

2020-05-20 Thread Luis Chamberlain
On Wed, May 20, 2020 at 12:02:26PM +0800, Xiaoming Ni wrote: > On 2020/5/20 11:31, Andrew Morton wrote: > > On Tue, 19 May 2020 11:31:07 +0800 Xiaoming Ni > > wrote: > > > > > Kernel/sysctl.c > > > > eek! > > > > > > > > fs/proc/proc_sysctl.c| 2 +- > > >

Re: [PATCH v3 0/8] kernel: taint when the driver firmware crashes

2020-05-28 Thread Luis Chamberlain
On Wed, May 27, 2020 at 02:36:42PM -0700, Jakub Kicinski wrote: > On Wed, 27 May 2020 03:19:18 +0000 Luis Chamberlain wrote: > > I read your patch, and granted, I will accept I was under the incorrect > > assumption that this can only be used by networking devices, however it

Re: [PATCH v3 0/8] kernel: taint when the driver firmware crashes

2020-05-28 Thread Luis Chamberlain
On Thu, May 28, 2020 at 08:04:50AM -0700, Ben Greear wrote: > > Could you post your devlink RFC patches somewhere public? This cover letter provided a URL to these. Luis

Re: [RFC 1/2] devlink: add simple fw crash helpers

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 10:17:38AM -0700, Jakub Kicinski wrote: > On Fri, 22 May 2020 05:20:46 +0000 Luis Chamberlain wrote: > > > diff --git a/net/core/Makefile b/net/core/Makefile > > > index 3e2c378e5f31..6f1513781c17 100644 > > > --- a/net/core/Makefile

Re: [RFC 1/2] devlink: add simple fw crash helpers

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 10:46:07PM +0200, Johannes Berg wrote: > FWIW, I still completely disagree on that taint. You (Luis) obviously > have been running into a bug in that driver, I doubt the firmware > actually managed to wedge the hardware. This hasn't happened just once, its happed many

Re: [PATCH v2 10/15] soc: qcom: ipa: use new module_firmware_crashed()

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 03:52:44PM -0500, Alex Elder wrote: > On 5/22/20 12:28 AM, Luis Chamberlain wrote: > > OK thanks. Can the user be affected by this crash? If so how? Can > > we recover ? Is that always guaranteed? > > We can't guarantee anything about re

Re: [PATCH] firmware_loader: change enum fw_opt to u32

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 02:46:58PM -0700, Scott Branden wrote: > > /** > - * enum fw_opt - options to control firmware loading behaviour > + * fw_opt - options to control firmware loading behaviour > * > * @FW_OPT_UEVENT: Enables the fallback mechanism to send a kobject uevent > * when

Re: [PATCH v2 2/2] fs: avoid fdput() after failed fdget() in kernel_read_file_from_fd()

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 03:14:59PM -0700, Scott Branden wrote: > > > On 2020-05-22 2:59 p.m., Scott Branden wrote: > > Hi Luis, > > > > On 2020-05-13 7:19 a.m., Luis Chamberlain wrote: > > > On Wed, May 13, 2020 at 7:13 AM Luis Chamberlain > > >

Re: [PATCH] firmware_loader: change enum fw_opt to u32

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 03:49:05PM -0700, Scott Branden wrote: > Hi Luis, > > On 2020-05-22 3:45 p.m., Luis Chamberlain wrote: > > On Fri, May 22, 2020 at 02:46:58PM -0700, Scott Branden wrote: > > > /** > > > - * enum fw_opt - options to control firmware l

Re: [RFC 1/2] devlink: add simple fw crash helpers

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 04:23:55PM -0700, Steve deRosier wrote: > Specifically, I don't think we should set a taint flag when a driver > easily handles a routine firmware crash and is confident that things > have come up just fine again. In other words, triggering the taint in > every driver

Re: [PATCH v2] firmware_loader: change enum fw_opt to u32

2020-05-22 Thread Luis Chamberlain
On Fri, May 22, 2020 at 04:12:02PM -0700, Scott Branden wrote: > "enum fw_opt" is not used as an enum. > Change fw_opt to u32 as FW_OPT_* values are OR'd together. > > Signed-off-by: Scott Branden Acked-by: Luis Chamberlain Luis

Re: [PATCH] firmware_loader: change enum fw_opt to u32

2020-05-23 Thread Luis Chamberlain
On Sat, May 23, 2020 at 08:05:48AM +0200, Greg Kroah-Hartman wrote: > On Fri, May 22, 2020 at 11:00:25PM +0000, Luis Chamberlain wrote: > > On Fri, May 22, 2020 at 03:49:05PM -0700, Scott Branden wrote: > > > Hi Luis, > > > > > > On 2020-05-22 3:45 p.m., Lu

Re: [PATCH 3/4] selftests/sysctl: Fix to load test_sysctl module

2020-06-01 Thread Luis Chamberlain
is not > installed. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Luis Chamberlain Luis

Re: [PATCH 2/4] lib: Make test_sysctl initialized as module

2020-06-01 Thread Luis Chamberlain
always fails > to find the test module and is skipped. > > This makes test_sysctl.c initialized as a module by module_init() > and allow sysctl.sh to find the test module is loaded. > > Signed-off-by: Masami Hiramatsu Reviewed-by: Luis Chamberlain Luis

Re: [PATCH 1/4] lib: Make prime number generator independently selectable

2020-06-01 Thread Luis Chamberlain
; > Signed-off-by: Masami Hiramatsu Reviewed-by: Luis Chamberlain Luis

Re: [PATCH 4/4] selftests/sysctl: Make sysctl test driver as a module

2020-06-01 Thread Luis Chamberlain
atsu Reviewed-by: Luis Chamberlain Luis

Re: [PATCH v5 5/7] blktrace: fix debugfs use after free

2020-06-01 Thread Luis Chamberlain
On Wed, May 27, 2020 at 03:12:02AM +, Luis Chamberlain wrote: > You forgot to deal with partitions. Putting similar lipstick on the pig, > this is what I end up with, let me know if this seems agreeable: So even with the partition stuff in place, this approach still don't allow multipl

[PATCH v3 0/8] kernel: taint when the driver firmware crashes

2020-05-26 Thread Luis Chamberlain
, based on linux-next tag next-20200526 [1]. [0] https://lkml.kernel.org/r/20200519211531.3702593-1-k...@kernel.org [1] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20200526-taint-firmware-net-intro Luis Chamberlain (7): kernel.h: move taint and system state flags

[PATCH v3 6/8] bnxt_en: use new taint_firmware_crashed()

2020-05-26 Thread Luis Chamberlain
a taint flag allows us to annotate when this happens clearly. Cc: Michael Chan Cc: Luis Chamberlain Acked-by: Rafael Aquini Signed-off-by: Vasundhara Volam Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3 3/8] taint: add firmware crash taint support

2020-05-26 Thread Luis Chamberlain
of add_taint_module(), just make the flag unsigned int clear. Signed-off-by: Luis Chamberlain --- Documentation/admin-guide/tainted-kernels.rst | 6 ++ include/linux/kernel.h| 2 +- include/linux/module.h| 13 + include/trace/events

[PATCH v3 5/8] ath10k: use new taint_firmware_crashed()

2020-05-26 Thread Luis Chamberlain
Acked-by: Rafael Aquini Signed-off-by: Luis Chamberlain --- drivers/net/wireless/ath/ath10k/pci.c | 2 ++ drivers/net/wireless/ath/ath10k/sdio.c | 2 ++ drivers/net/wireless/ath/ath10k/snoc.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers

[PATCH v3 2/8] panic: add uevent support

2020-05-26 Thread Luis Chamberlain
logs. Since not everyone is, add support to throw some bones to userspace that something might be fishy. Let userspace figure out how to inform users, and what to do. Signed-off-by: Luis Chamberlain --- MAINTAINERS | 8 + include/linux/panic_events.h | 26

[PATCH v3 4/8] panic: make taint data type clearer

2020-05-26 Thread Luis Chamberlain
Let us be clearer about the the data type for the taint flag. Signed-off-by: Luis Chamberlain --- include/asm-generic/bug.h | 4 ++-- include/linux/kernel.h| 4 ++-- kernel/panic.c| 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/asm-generic

[PATCH v3 7/8] liquidio: use new taint_firmware_crashed()

2020-05-26 Thread Luis Chamberlain
to annotate when this happens clearly. Cc: Derek Chickles Cc: Satanand Burla Cc: Felix Manlunas Acked-by: Rafael Aquini Reviewed-by: Derek Chickles Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net

[PATCH v3 1/8] kernel.h: move taint and system state flags to uapi

2020-05-26 Thread Luis Chamberlain
The taint and system state flags will be used in a subsequent patch exposing these to userspace, so move them to uapi. We keep the TAINT_FLAGS_COUNT outside of uapi, as this value can change per release. Signed-off-by: Luis Chamberlain --- include/linux/kernel.h | 34

[PATCH v3 8/8] qed: use new taint_firmware_crashed()

2020-05-26 Thread Luis Chamberlain
to annotate when this happens clearly. Cc: Ariel Elior Cc: gr-everest-linux...@marvell.com Reviewed-by: Igor Russkikh Acked-by: Rafael Aquini Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/qlogic

Re: [PATCH v3 0/8] kernel: taint when the driver firmware crashes

2020-05-26 Thread Luis Chamberlain
On Tue, May 26, 2020 at 03:46:06PM -0700, Jakub Kicinski wrote: > On Tue, 26 May 2020 14:58:07 +0000 Luis Chamberlain wrote: > > To those new on CC -- this is intended to be a simple generic interface > > to the kernel to annotate when the firwmare has crashed leaving the >

Re: [PATCH v5 5/7] blktrace: fix debugfs use after free

2020-05-26 Thread Luis Chamberlain
On Tue, May 19, 2020 at 09:37:13AM -0700, Christoph Hellwig wrote: > I don't think we need any of that symlink stuff. Even if we want it > (which I don't), it should not be in a bug fix patch. > > In fact to fix the blktrace race I think we only need something like > this fairly trivial patch

Re: [PATCH v3 0/8] kernel: taint when the driver firmware crashes

2020-05-26 Thread Luis Chamberlain
On Tue, May 26, 2020 at 04:30:31PM -0700, Jakub Kicinski wrote: > On Tue, 26 May 2020 23:07:48 +0000 Luis Chamberlain wrote: > > On Tue, May 26, 2020 at 03:46:06PM -0700, Jakub Kicinski wrote: > > > On Tue, 26 May 2020 14:58:07 +0000 Luis Chamberlain wrote: > >

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Luis Chamberlain
On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote: > --- a/kernel/sysctl.c > +++ b/kernel/sysctl.c > @@ -3358,6 +3358,25 @@ int __init sysctl_init(void) > kmemleak_not_leak(hdr); > return 0; > } > + > +/* > + * The sysctl interface is used to modify the interface value, > +

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 03:27:22PM +0800, Xiaoming Ni wrote: > On 2020/5/29 15:09, Luis Chamberlain wrote: > > On Tue, May 19, 2020 at 11:31:08AM +0800, Xiaoming Ni wrote: > > > --- a/kernel/sysctl.c > > > +++ b/kernel/sysctl.c > > > @@ -3358,6 +33

[PATCH 07/13] test_sysctl: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
tifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- lib/test_sysctl.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/lib/test

[PATCH 10/13] eventpoll: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move epoll_table sysctl to fs/eventpoll.c and remove the clutter out of kernel/sysctl.c by using register_sysctl_subdir().. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/eventpoll.c | 10 +- include/linux/poll.h | 2 -- include/linux

[PATCH 11/13] random: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move random_table sysctl from kernel/sysctl.c to drivers/char/random.c and use register_sysctl_subdir() to help remove the clutter out of kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/char/random.c | 14 -- include

[PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

2020-05-29 Thread Luis Chamberlain
to place the new leaf files. So use a helper to do precisely this. Signed-off-by: Luis Chamberlain --- include/linux/sysctl.h | 11 +++ kernel/sysctl.c| 37 + 2 files changed, 48 insertions(+) diff --git a/include/linux/sysctl.h b/include/linux

[PATCH 09/13] firmware_loader: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni Move the firmware config sysctl table to fallback_table.c and use the new register_sysctl_subdir() helper. This removes the clutter from kernel/sysctl.c. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- drivers/base/firmware_loader/fallback.c | 4

[PATCH 08/13] inotify: simplify sysctl declaration with register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
From: Xiaoming Ni move inotify_user sysctl to inotify_user.c and use the new register_sysctl_subdir() helper. Signed-off-by: Xiaoming Ni Signed-off-by: Luis Chamberlain --- fs/notify/inotify/inotify_user.c | 11 ++- include/linux/inotify.h | 3 --- kernel/sysctl.c

[PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
tifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- fs/ocfs2/stackglue.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --g

[PATCH 04/13] i915: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
c2.E2; identifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/gpu/drm/i915/i915_perf.c | 22 +- 1 file changed, 1 insertion(+), 21

[PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Luis Chamberlain
The way to create a subdirectory from the base set of directories is a bit obscure, so provide a helper which makes this clear, and also helps remove boiler plate code required to do this work. Signed-off-by: Luis Chamberlain --- include/linux/sysctl.h | 7 +++ kernel/sysctl.c| 16

[PATCH 03/13] hpet: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
tifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/char/hpet.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a

[PATCH 13/13] fs: move binfmt_misc sysctl to its own file

2020-05-29 Thread Luis Chamberlain
This moves the binfmt_misc sysctl to its own file to help remove clutter from kernel/sysctl.c. Signed-off-by: Luis Chamberlain --- fs/binfmt_misc.c | 1 + kernel/sysctl.c | 7 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index

[PATCH 02/13] cdrom: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
tifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/cdrom/cdrom.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git

[PATCH 05/13] macintosh/mac_hid.c: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
tifier c2.base; identifier c3.header; @@ header = -register_sysctl_table(base); +register_sysctl_subdir(E2, E1, sysctls); Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain --- drivers/macintosh/mac_hid.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletion

[PATCH 00/13] sysctl: spring cleaning

2020-05-29 Thread Luis Chamberlain
seems reasonable we'll kdocify this a bit too. This code has been boot tested without issues, and I'm letting 0day do its thing to test against many kconfig builds. If you however spot any issues please let us know. Luis Chamberlain (9): sysctl: add new register_sysctl_subdir() helper cdrom

Re: [PATCH v5 5/7] blktrace: fix debugfs use after free

2020-05-29 Thread Luis Chamberlain
On Wed, May 27, 2020 at 06:15:10PM -0700, Bart Van Assche wrote: > On 2020-05-26 20:12, Luis Chamberlain wrote: > > + /* > > +* Blktrace needs a debugsfs name even for queues that don't register > > +* a gendisk, so it lazily registers the debugfs directory. But th

Re: [PATCH v4 1/4] sysctl: Add register_sysctl_init() interface

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 04:33:01PM +0800, Xiaoming Ni wrote: > On 2020/5/29 15:36, Luis Chamberlain wrote: > > On Fri, May 29, 2020 at 03:27:22PM +0800, Xiaoming Ni wrote: > > > On 2020/5/29 15:09, Luis Chamberlain wrote: > > > > On Tue, May 19, 2020 at 11:31

Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Luis Chamberlain
On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci s

  1   2   3   4   5   6   >