[PATCH v2 15/23] test_firmware: wrap custom sysfs load tests into helper

2017-11-20 Thread Luis R. Rodriguez
These can run on certain kernel configs. This will allow us later to enable these tests under the right kernel configurations. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 43 - 1 file changed, 28 insertions(+), 15 deletions

[PATCH v2 13/23] test_firmware: wrap sysfs timeout test into helper

2017-11-20 Thread Luis R. Rodriguez
This cannot run on all kernel builds. This will help us later skip this test on kernel configs where non-applicable. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 69 + 1 file changed, 37 insertions(+), 32 deletions(-) diff --git

[PATCH v2 16/23] test_firmware: enable custom fallback testing on limited kernel configs

2017-11-20 Thread Luis R. Rodriguez
old heuristics for now. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/config | 4 +++ tools/testing/selftests/firmware/fw_fallback.sh | 45 - 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/firmware/

[PATCH v2 17/23] test_firmware: replace syfs fallback check with kconfig_has helper

2017-11-20 Thread Luis R. Rodriguez
Now that we have a kconfig checker just use that instead of relying on testing a sysfs directory being present, since our requirements are spelled out. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH v2 19/23] firmware: add debug facility to emulate forcing sysfs fallback

2017-11-20 Thread Luis R. Rodriguez
does a simple enablement under certain situations we can just emulate this behaviour through a debugfs knob. This enables testing two of the tree possible kernel configs with the firmware loader with one kernel build. Signed-off-by: Luis R. Rodriguez --- drivers/base/Kconfig | 6

[PATCH v2 12/23] firmware: replace #ifdef over FW_OPT_FALLBACK with function checks

2017-11-20 Thread Luis R. Rodriguez
request_firmware_direct() always ignore fallback Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 40 +--- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index

[PATCH v2 14/23] test_firmware: wrap basic sysfs fallback tests into helper

2017-11-20 Thread Luis R. Rodriguez
These cannot run on all kernel builds. This will help us later skip this test on kernel configs where non-applicable. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 78 + 1 file changed, 41 insertions(+), 37 deletions(-) diff

[PATCH v2 18/23] firmware: enable to split firmware_class into separate target files

2017-11-20 Thread Luis R. Rodriguez
. Signed-off-by: Luis R. Rodriguez --- drivers/base/Makefile| 1 + drivers/base/{firmware_class.c => firmware_loader.c} | 0 2 files changed, 1 insertion(+) rename drivers/base/{firmware_class.c => firmware_loader.c} (100%) diff --git a/drivers/base/Makefile b/d

[PATCH v2 21/23] test_firmware: add a library for shared helpers

2017-11-20 Thread Luis R. Rodriguez
Both fw_fallback.sh and fw_filesystem.sh share a common set of boiler plate setup and tests. We can share these in a common place. While at it, move both test to use /bin/bash. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_fallback.sh | 69 ++--- tools

[PATCH v2 20/23] firmware: add debug facility to emulate disabling sysfs fallback

2017-11-20 Thread Luis R. Rodriguez
One can build a kernel without CONFIG_FW_LOADER_USER_HELPER being enabled, but testing it requires a unique kernel configuration most folks do not enable. This makes it hard to test. Provide a debugfs facility to enable us to emulate such kernels. Signed-off-by: Luis R. Rodriguez --- drivers

[PATCH v2 22/23] test_firmware: test the 3 firmware kernel configs using debugfs

2017-11-20 Thread Luis R. Rodriguez
or haven't enabled CONFIG_FW_LOADER_DEBUG we cannot run these dynamic tests, so just run both scripts just as we used to before. Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/Makefile| 2 +- tools/testing/selftests/firmware/config | 1 + tools/testing/sel

[PATCH v2 23/23] firmware: cleanup - group and document up private firmware parameters

2017-11-20 Thread Luis R. Rodriguez
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y [0] tools/testing/selftests/firmware/fw_fallback.sh [1] tools/testing/selftests/firmware/fw_filesystem.sh Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loader.c | 300 ++--- 1 file changed, 218 insertions

[PATCH v2 02/23] firmware: rename struct firmware_buf to struct fw_priv

2017-11-20 Thread Luis R. Rodriguez
reflect better what they are for. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 372 +- 1 file changed, 187 insertions(+), 185 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 82bc70f66996

[PATCH 1/5] firmware: add helper to unregister pm ops

2017-11-20 Thread Luis R. Rodriguez
This will be used later to unfold on error on init. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4b57cf5bc81d

[PATCH 4/5] firmware: fix detecting error on register_reboot_notifier()

2017-11-20 Thread Luis R. Rodriguez
register_reboot_notifier() can fail, detect this and address this failure. This has been broken since v3.11, however the chances of this failing here is really low. Fixes: fe304143b0c3d ("firmware: Avoid deadlock of usermodehelper lock at shutdown") Signed-off-by: Luis R. Rodriguez --

[PATCH 3/5] firmware: provide helpers for registering the syfs loader

2017-11-20 Thread Luis R. Rodriguez
This makes init / exit much easier to read, and we can later reuse this code on other errors not captured yet. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/base

[PATCH 5/5] test_firmware: fix setting old custom fw path back on exit

2017-11-20 Thread Luis R. Rodriguez
if it was empty and set an empty space. Without this we end up having the temporary path always set after we run these tests. Fixes: 0a8adf58475 ("test: add firmware_class loader test") Signed-off-by: Luis R. Rodriguez --- tools/testing/selftests/firmware/fw_filesystem.sh | 5 - 1

[PATCH 0/5] firmware: few fixes for v4.15

2017-11-20 Thread Luis R. Rodriguez
;d let you decide if this should wait for v4.16 or be folded in for v4.15. The fixes are not critical as its very improbably you'll run into issues with them. The code folding helps make the fixes easier to manage and read. I let 0-day test over the weekend and no build issues were found.

[PATCH 2/5] firmware: fix capturing errors on fw_cache_init() on early init

2017-11-20 Thread Luis R. Rodriguez
CONFIG_PM_SLEEP into a helper. Fixes: 07646d9c0938d ("firmware loader: cache devices firmware during suspend/resume cycle") Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 45 ++- 1 file changed, 32 insertions(+), 13 deletions(-) di

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-15 Thread Luis R. Rodriguez
On Wed, Nov 15, 2017 at 02:56:57PM -0500, Mimi Zohar wrote: > On Wed, 2017-11-15 at 18:52 +0100, Luis R. Rodriguez wrote: > > On Wed, Nov 15, 2017 at 06:49:57AM -0500, Mimi Zohar wrote: > > > On Tue, 2017-11-14 at 21:50 +0100, Luis R. Rodriguez wrote: > > > > > &g

Re: [Regression/XFS/PM] Freeze tasks failed in xfsaild

2017-11-15 Thread Luis R. Rodriguez
On Wed, Nov 15, 2017 at 12:40:43AM +0100, Rafael J. Wysocki wrote: > On Wednesday, November 15, 2017 12:07:30 AM CET Dave Chinner wrote: > Can we stop here and be constructive going forward, please? Then let's stop this nonsense and get to work. > > > So what do you think should be done, specific

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-15 Thread Luis R. Rodriguez
On Wed, Nov 15, 2017 at 06:49:57AM -0500, Mimi Zohar wrote: > On Tue, 2017-11-14 at 21:50 +0100, Luis R. Rodriguez wrote: > > > Johannes made cfg80211 recently just use request_firmware() now via commit > > on > > linux-next 90a53e4432 ("cfg80211: implement regdb sig

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-14 Thread Luis R. Rodriguez
On Tue, Nov 14, 2017 at 12:18:54PM -0800, Linus Torvalds wrote: > This is all theoretical security masturbation. The _real_ attacks have > been elsewhere. In my research on this front I'll have to agree with this, in terms of justification and there are only *two* arguments which I've so far have

Re: [Regression/XFS/PM] Freeze tasks failed in xfsaild

2017-11-14 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 12:37:00PM -0800, Dan Williams wrote: > On Mon, Nov 13, 2017 at 12:14 PM, Luis R. Rodriguez wrote: > > On Mon, Nov 13, 2017 at 06:31:39PM +0800, Yu Chen wrote: > >> The xfs-buf/dm-1 should be freezed according to > >> commit 8018ec083c72 ("x

Re: [Cocci] [PATCH v3] coccinelle: fix parallel build with CHECK=scripts/coccicheck

2017-11-14 Thread Luis R. Rodriguez
On Tue, Nov 14, 2017 at 06:04:49PM +0900, Masahiro Yamada wrote: > diff --git a/scripts/coccicheck b/scripts/coccicheck > index 040a8b1..7da82a1 100755 > --- a/scripts/coccicheck > +++ b/scripts/coccicheck > @@ -70,6 +64,13 @@ if [ "$C" = "1" -o "$C" = "2" ]; then > # Take only the last argume

Re: [RFC PATCH v2] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-13 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 08:51:54PM +0100, Luis R. Rodriguez wrote: > On Mon, Nov 13, 2017 at 02:36:47PM -0500, Mimi Zohar wrote: > > On Mon, 2017-11-13 at 20:05 +0100, Luis R. Rodriguez wrote: > > > > + * fw_lockdown_read_file - prevent loading of unsigned firmware > >

Re: [RFC PATCH v2] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-13 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 03:11:12PM -0500, Mimi Zohar wrote: > On Mon, 2017-11-13 at 20:51 +0100, Luis R. Rodriguez wrote: > > On Mon, Nov 13, 2017 at 02:36:47PM -0500, Mimi Zohar wrote: > > > > Huh, I kind of lost you here.  What does "it" refer to in the above

Re: [RFC PATCH v2] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-13 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 02:36:47PM -0500, Mimi Zohar wrote: > On Mon, 2017-11-13 at 20:05 +0100, Luis R. Rodriguez wrote: > > > + * fw_lockdown_read_file - prevent loading of unsigned firmware > > > + * @file: pointer to firmware > > > + * @read_id: caller identifi

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-13 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 07:50:35PM +0100, Luis R. Rodriguez wrote: > On Fri, Nov 10, 2017 at 08:45:06AM -0500, Mimi Zohar wrote: > It does not mean we don't have to support hashes from the start, we can, > however that could require a driver change where its hash is specified or &g

Re: [RFC PATCH v2] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-13 Thread Luis R. Rodriguez
On Mon, Nov 13, 2017 at 06:43:34AM -0500, Mimi Zohar wrote: > If the kernel is locked down and IMA-appraisal is not enabled, prevent > loading of unsigned firmware. > > Signed-off-by: Mimi Zohar > --- > Changelog v2: > - Invert kernel_is_locked_down() test (Luis Rodriquez) > - Increase LSM name m

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-13 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 08:45:06AM -0500, Mimi Zohar wrote: > On Fri, 2017-11-10 at 02:46 +0100, Luis R. Rodriguez wrote: > > On Thu, Nov 09, 2017 at 10:48:43AM +0900, AKASHI, Takahiro wrote: > > > On Wed, Nov 08, 2017 at 08:46:26PM +0100, Luis R. Rodriguez wrote: > >

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-13 Thread Luis R. Rodriguez
On Sat, Nov 11, 2017 at 02:32:40AM +, Alan Cox wrote: > > My assumption here is: > > 1) there are some less important and so security-insensitive firmwares, > >by which I mean that such firmwares won't be expected to be signed in > >terms of vulnerability or integrity. > >(I can't g

Re: [PATCH] firmware: cleanup - group and document up private firmware parameters

2017-11-10 Thread Luis R. Rodriguez
On Mon, Sep 18, 2017 at 05:15:01PM +0200, Greg KH wrote: > On Thu, Sep 14, 2017 at 03:54:22PM -0700, Luis R. Rodriguez wrote: > > +enum fw_priv_reqs { > > + FW_PRIV_REQ_FALLBACK= 1 << 0, > > + FW_PRIV_REQ_FALLBACK_UEVENT = 1 <<

Re: [PATCH] firmware: cleanup - group and document up private firmware parameters

2017-11-10 Thread Luis R. Rodriguez
On Fri, Sep 15, 2017 at 10:30:46AM +0200, Martin Fuzzey wrote: > On 15/09/17 00:54, Luis R. Rodriguez wrote: > > The above benefits makes the code much easier to understand and maintain. > > Yes I agree it is much cleaner that way. > > A couple of nitpicks below. >

Re: [PATCH] umh: Optimize 'proc_cap_handler()'

2017-11-10 Thread Luis R. Rodriguez
On Fri, Oct 20, 2017 at 09:33:31PM +0200, Christophe JAILLET wrote: > If 'write' is 0, we can avoid a call to spin_lock/spin_unlock. > > Signed-off-by: Christophe JAILLET Thanks for the patch! Acked-by: Luis R. Rodriguez I'll bounce a copy to Andrew for i

Re: [PATCH v2 5/6] firmware: Add request_firmware_prefer_user() function

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 10:08:19PM +0100, Pali Rohár wrote: > On Friday 10 November 2017 21:26:01 Luis R. Rodriguez wrote: > > On Fri, Nov 10, 2017 at 12:38:27AM +0100, Pali Rohár wrote: > > > This function works pretty much like request_firmware(), but it prefer > > > u

Re: [RFC PATCH v1] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 04:02:55PM -0500, Mimi Zohar wrote: > If the kernel is locked down and IMA-appraisal is not enabled, prevent > loading of unsigned firmware. > > Signed-off-by: Mimi Zohar > --- > > Changelog v1: > - Lots of minor changes Kconfig, Makefile, fw_lsm.c for such a small patch

Re: [RFC PATCH] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 12:13 PM, Mimi Zohar wrote: > On Fri, 2017-11-10 at 12:58 -0500, Mimi Zohar wrote: >> >> + >> +static struct security_hook_list fw_lockdown_hooks[] = { >> + LSM_HOOK_INIT(fw_lockdown_file_check, fw_lockdown_bprm_check) > > Sigh, that should have be: > LSM_HOOK_I

Re: [PATCH v2 5/6] firmware: Add request_firmware_prefer_user() function

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 12:26 PM, Luis R. Rodriguez wrote: > even if you *leave* the flag in place and a driver required > this, but the kernel was compiled without CONFIG_FW_LOADER_USER_HELPER then > calling fw_load_from_user_helper would just already return -ENOENT, as such it > w

Re: [PATCH v2 5/6] firmware: Add request_firmware_prefer_user() function

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 12:38:27AM +0100, Pali Rohár wrote: > This function works pretty much like request_firmware(), but it prefer > usermode helper. If usermode helper fails then it fallback to direct > access. Useful for dynamic or model specific firmware data. > > Signed-off-by: Pali Rohár >

Re: [RFC PATCH] fw_lockdown: new micro LSM module to prevent loading unsigned firmware

2017-11-10 Thread Luis R. Rodriguez
On Fri, Nov 10, 2017 at 12:58:23PM -0500, Mimi Zohar wrote: > Hi David, > > If you are interested in preventing the loading of unsigned firmware, > the patch below is straight forward.  The patch has ONLY been tested > with IMA-appraisal enabled, and works as intended - allowing only > signed firm

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-09 Thread Luis R. Rodriguez
On Thu, Nov 09, 2017 at 10:48:43AM +0900, AKASHI, Takahiro wrote: > On Wed, Nov 08, 2017 at 08:46:26PM +0100, Luis R. Rodriguez wrote: > > But perhaps I'm not understanding the issue well, let me know. > > My point is quite simple: > my_deviceA_init() { >

Re: [RFC] hung task: check specific tasks for long uninterruptible sleep state

2017-11-08 Thread Luis R. Rodriguez
On Wed, Nov 08, 2017 at 11:58:13AM +0530, Lingutla Chandrasekhar wrote: > khungtask by default monitors all tasks for long unterruptible sleep. > This change introduces a sysctl option, /proc/sys/kernel/ > hung_task_selective_monitoring, to enable monitoring selected tasks. > If this sysctl option

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-08 Thread Luis R. Rodriguez
On Wed, Nov 08, 2017 at 03:01:09PM -0500, Mimi Zohar wrote: > > > > Or reflect that IMA-appraisal, if enabled, will enforce firmware being > > > validly signed. > > > > But FWICT lockdown is a built-in kernel thingy, unless lockdown implies IMA > > it would not be the place to refer to it. > > >

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-08 Thread Luis R. Rodriguez
On Wed, Nov 08, 2017 at 03:15:54PM +0900, AKASHI, Takahiro wrote: > Luis, > > Thank you for this heads-up. > > On Wed, Nov 08, 2017 at 12:07:00AM +0100, Luis R. Rodriguez wrote: > > On Thu, Nov 02, 2017 at 06:10:41PM -0400, Mimi Zohar wrote: > > > On Thu, 2017-11-02

Re: [PATCH 5/5] driver core: Remove redundant license text

2017-11-08 Thread Luis R. Rodriguez
t was removed. > > Cc: Greg Kroah-Hartman > Cc: Johannes Berg > Cc: "Luis R. Rodriguez" > Signed-off-by: Greg Kroah-Hartman > --- > drivers/base/attribute_container.c | 2 -- > drivers/base/bus.c | 3 --- > driver

Re: [PATCH 0/2] selftests: firmware: skip testing unsupported features

2017-11-08 Thread Luis R. Rodriguez
o kernel merge these patches as well when relevant. If you can resend with that tag, or if Shuah is willing to amend the commit log with them if you provide it: Acked-by: Luis R. Rodriguez Luis

Re: [PATCH] umh: Optimize 'proc_cap_handler()'

2017-11-07 Thread Luis R. Rodriguez
On Fri, Oct 20, 2017 at 09:33:31PM +0200, Christophe JAILLET wrote: > If 'write' is 0, we can avoid a call to spin_lock/spin_unlock. > > Signed-off-by: Christophe JAILLET Sorry for the delay, I was travelling and will start nose diving now. I hope to have a concrete review and answer by tomorro

Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown

2017-11-07 Thread Luis R. Rodriguez
On Thu, Nov 02, 2017 at 06:10:41PM -0400, Mimi Zohar wrote: > On Thu, 2017-11-02 at 22:04 +, David Howells wrote: > > Mimi Zohar wrote: > > > > > > Only validly signed device firmware may be loaded. > > > > > > fw_get_filesystem_firmware() calls kernel_read_file_from_path() to > > > read the

Re: WTF? Re: [PATCH] License cleanup: add SPDX GPL-2.0 license identifier to files with no license

2017-11-07 Thread Luis R. Rodriguez
On Tue, Nov 07, 2017 at 09:26:48PM +0100, Greg Kroah-Hartman wrote: > On Tue, Nov 07, 2017 at 11:28:46AM -0800, Christoph Hellwig wrote: > > On Tue, Nov 07, 2017 at 02:15:26PM -0500, Theodore Ts'o wrote: > > > On Tue, Nov 07, 2017 at 06:46:58PM +, Alan Cox wrote: > > > > > Given that it had no

Re: [PATCH] freezer: Fix typo in commnent to function freezable_schedule_timeout()

2017-11-07 Thread Luis R. Rodriguez
On Sun, Nov 05, 2017 at 03:27:32AM +0530, Himanshu Jha wrote: > Signed-off-by: Himanshu Jha FWIW, Suggested-by: Luis R. Rodriguez Acked-by: Luis R. Rodriguez

Re: [PATCH] scsi: Use vzalloc instead of vmalloc/memset

2017-11-07 Thread Luis R. Rodriguez
mail. Right now you just spammed tons of people and the changes may be preferred to go upstream atomically per driver, always assume this first. Other than this, feel free to add to each of the patches you created: Acked-by: Luis R. Rodriguez

Re: [PATCH] firmware: raspberrypi: Eliminate use of time_to_tm

2017-11-07 Thread Luis R. Rodriguez
On Sun, Nov 05, 2017 at 03:21:46AM +0530, Himanshu Jha wrote: > time_to_tm function is deprecated due to y2038 problem, therefore use > time64_to_tm instead. Use ./scripts/get_maintainer.pl foo.patch and resend with the respective folks addressed to as needed (To or Cc as indicated by the script).

[PATCH] Documentation: Add Luis R. Rodriguez to list of enforcement statement endorsers

2017-11-07 Thread Luis R. Rodriguez
Add my name to the list. Signed-off-by: Luis R. Rodriguez --- Documentation/process/kernel-enforcement-statement.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/process/kernel-enforcement-statement.rst b/Documentation/process/kernel-enforcement-statement.rst index

Re: [RFC] xfs: fix reporting supported extra file attributes for statx()

2017-10-31 Thread Luis R. Rodriguez
On Tue, Oct 31, 2017 at 3:27 PM, Darrick J. Wong wrote: > On Tue, Oct 31, 2017 at 03:13:05PM -0700, Luis R. Rodriguez wrote: >> statx(2) notes that any attribute that is not indicated as supported by >> stx_attributes_mask has no usable value. Commit 5f955f26f3d42d ("xfs:

[RFC] xfs: fix reporting supported extra file attributes for statx()

2017-10-31 Thread Luis R. Rodriguez
supported making reporting them rather useless for the pedantic userspace author. $ git describe --contains 5f955f26f3d42d04aba65590a32eb70eedb7f37d v4.11-rc6~5^2^2~2 Fixes: 5f955f26f3d42d ("xfs: report crtime and attribute flags to statx") Signed-off-by: Luis R. Rodriguez --- Its unclear

Re: [PATCH -tip] sched/swait: Annotate swait's special use

2017-10-20 Thread Luis R. Rodriguez
gt; (such as current users). > > Update the comments before kernel hipsters start thinking swait is the > cool thing to do. > > Signed-off-by: Davidlohr Bueso Thanks, I was busy. Acked-by: Luis R. Rodriguez Luis

Re: [PATCH] firmware: add firmware to new device's devres list for second time cache

2017-10-04 Thread Luis R. Rodriguez
On Tue, Aug 22, 2017 at 03:52:46PM +0800, Kai-Heng Feng wrote: > Currently, firmware will only be chached if assign_firmware_buf() gets > called. True, but also more importantly we peg the fw cache to the device via devres *iff* the firmware actually was found. We do this so that we don't try to l

Re: btusb "firmware request while host is not available" at resume

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 3, 2017 at 5:20 PM, Luis R. Rodriguez wrote: > the ordering devised currently there is: > > o device driver pm ops called > o notifier for suspend issued - *going to suspend* > o userspace frozen > o filesystem freeze > > On the way back up this or

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 11:15:07PM +0200, Rafael J. Wysocki wrote: > On Tuesday, October 3, 2017 8:59:00 PM CEST Rafael J. Wysocki wrote: > > On Tuesday, October 3, 2017 8:53:13 PM CEST Luis R. Rodriguez wrote: > > > Now that all filesystems which used to rely on kthread > &

Re: btusb "firmware request while host is not available" at resume

2017-10-03 Thread Luis R. Rodriguez
On Mon, Oct 02, 2017 at 04:34:11PM +0800, Kai-Heng Feng wrote: > Hi Luis, > > On Thu, Sep 14, 2017 at 1:39 AM, Luis R. Rodriguez wrote: > [snipped] > > Would a fw_cache_hint(device, name_list) be reasonable then sometime > > *before* > > suspend? All this would

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 03:09:53PM -0600, Shuah Khan wrote: > On Tue, Oct 3, 2017 at 3:00 PM, Jiri Kosina wrote: > > On Tue, 3 Oct 2017, Pavel Machek wrote: > > > >> > Again, I agree that the (rare) kthreads that are actually "creating" new > >> > I/O have to be somehow frozen and require special

Re: [RFC 2/5] fs: freeze on suspend and thaw on resume

2017-10-03 Thread Luis R. Rodriguez
On Wed, Oct 04, 2017 at 07:58:41AM +1100, Dave Chinner wrote: > On Tue, Oct 03, 2017 at 11:53:10AM -0700, Luis R. Rodriguez wrote: > > diff --git a/fs/super.c b/fs/super.c > > index d45e92d9a38f..ce8da8b187b1 100644 > > --- a/fs/super.c > > +++ b/fs/super.c >

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
On Wed, Oct 04, 2017 at 08:04:49AM +1100, Dave Chinner wrote: > On Tue, Oct 03, 2017 at 11:53:13AM -0700, Luis R. Rodriguez wrote: > > Now that all filesystems which used to rely on kthread > > freezing have been converted to filesystem freeze/thawing > > we can remove the k

Re: [RFC 0/5] fs: replace kthread freezing with filesystem freeze/thaw

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 01:47:55PM -0700, Matthew Wilcox wrote: > On Tue, Oct 03, 2017 at 10:05:11PM +0200, Luis R. Rodriguez wrote: > > On Wed, Oct 04, 2017 at 03:33:01AM +0800, Ming Lei wrote: > > > Even though this patch can make kthread to not do I/O during > > &g

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 10:12:04PM +0200, Pavel Machek wrote: > On Tue 2017-10-03 11:53:13, Luis R. Rodriguez wrote: > > Now that all filesystems which used to rely on kthread > > freezing have been converted to filesystem freeze/thawing > > we can remove the kernel kthread

Re: [RFC 2/5] fs: freeze on suspend and thaw on resume

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 08:32:39PM +, Bart Van Assche wrote: > On Tue, 2017-10-03 at 22:23 +0200, Luis R. Rodriguez wrote: > > On Tue, Oct 03, 2017 at 08:02:22PM +, Bart Van Assche wrote: > > > On Tue, 2017-10-03 at 11:53 -0700, Luis R. Rodriguez wrote: &g

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 08:21:42PM +, Bart Van Assche wrote: > On Tue, 2017-10-03 at 22:17 +0200, Jiri Kosina wrote: > > On Tue, 3 Oct 2017, Bart Van Assche wrote: > > > What about the many drivers outside filesystems that use the > > > set_freezable() / try_to_freeze() / wait_event_freezable(

Re: [RFC 2/5] fs: freeze on suspend and thaw on resume

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 08:02:22PM +, Bart Van Assche wrote: > On Tue, 2017-10-03 at 11:53 -0700, Luis R. Rodriguez wrote: > > +static bool super_allows_freeze(struct super_block *sb) > > +{ > > + return !!(sb->s_type->fs_flags & FS_FREEZE_ON_SUSPEND);

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-03 Thread Luis R. Rodriguez
On Tue, Oct 03, 2017 at 03:59:30PM -0400, Theodore Ts'o wrote: > On Tue, Oct 03, 2017 at 11:53:12AM -0700, Luis R. Rodriguez wrote: > > @@ -4926,7 +4926,7 @@ static int ext4_unfreeze(struct super_block *sb) > > ext4_set_feature_journ

Re: [RFC 0/5] fs: replace kthread freezing with filesystem freeze/thaw

2017-10-03 Thread Luis R. Rodriguez
On Wed, Oct 04, 2017 at 03:33:01AM +0800, Ming Lei wrote: > On Tue, Oct 03, 2017 at 11:53:08AM -0700, Luis R. Rodriguez wrote: > > INFO: task kworker/u8:8:1320 blocked for more than 10 seconds. > > Tainted: GE 4.13.0-next-20170907+ #88 > > "

[RFC 2/5] fs: freeze on suspend and thaw on resume

2017-10-03 Thread Luis R. Rodriguez
dding freezer semantics onto its kthreads without need. These also will need to be reviewed later. This is based on prior work originally by Rafael Wysocki and later by Jiri Kosina. Signed-off-by: Luis R. Rodriguez --- fs/super.c

[RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-03 Thread Luis R. Rodriguez
This also removes the superflous freezer calls as they are no longer needed. We need to avoid sync call on thaw as otherwise we end up with a stall on bio_submit(). Signed-off-by: Luis R. Rodriguez --- fs/ext4/super.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff

[RFC 0/5] fs: replace kthread freezing with filesystem freeze/thaw

2017-10-03 Thread Luis R. Rodriguez
patch to put final nail on the kthread freezer coffin. [0] https://lwn.net/Articles/662703/ [1] https://bugzilla.suse.com/show_bug.cgi?id=1043449 [2] http://alpss.at/ Thoughts? Rants? Luis R. Rodriguez (5): fs: add iterate_supers_reverse() fs: freeze on suspend and thaw on resume xfs: allow

[RFC 1/5] fs: add iterate_supers_reverse()

2017-10-03 Thread Luis R. Rodriguez
There are use cases where we wish to traverse the superblock list in reverse order. This particular implementation will also enable to capture errors. Signed-off-by: Luis R. Rodriguez --- fs/super.c | 43 +++ include/linux/fs.h | 1 + 2 files

[RFC 5/5] pm: remove kernel thread freezing

2017-10-03 Thread Luis R. Rodriguez
Now that all filesystems which used to rely on kthread freezing have been converted to filesystem freeze/thawing we can remove the kernel kthread freezer. Signed-off-by: Luis R. Rodriguez --- Documentation/power/freezing-of-tasks.txt | 9 -- drivers/xen/manage.c | 6

[RFC 3/5] xfs: allow fs freeze on suspend/hibernation

2017-10-03 Thread Luis R. Rodriguez
This also removes the freezer calls on the XFS kthread as they are no longer needed. Signed-off-by: Luis R. Rodriguez --- fs/xfs/xfs_super.c | 3 ++- fs/xfs/xfs_trans_ail.c | 7 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c

[PATCH] sysctl: remove duplicate UINT_MAX check on do_proc_douintvec_conv()

2017-09-19 Thread Luis R. Rodriguez
do_proc_douintvec_conv() has two UINT_MAX checks, we can remove one. This has no functional changes other than fixing a compiler warning: kernel/sysctl.c:2190]: (warning) Identical condition '*lvalp>UINT_MAX', second condition is always false Reported-by: David Binderman Signed-o

[PATCH] firmware: cleanup - group and document up private firmware parameters

2017-09-14 Thread Luis R. Rodriguez
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y [0] tools/testing/selftests/firmware/fw_fallback.sh [1] tools/testing/selftests/firmware/fw_filesystem.sh Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_class.c | 249 +++--- 1 file changed, 184 insertions

Re: [PATCH 4.13 20/27] Revert "firmware: add sanity check on shutdown/suspend"

2017-09-13 Thread Luis R. Rodriguez
On Wed, Sep 13, 2017 at 12:30:44PM -0700, Linus Torvalds wrote: > Yes, the movement of the locking might need to be reverted too - but > only if it actually shows problems. This speeds up the cleanup of that crap UMH code so I'm happy to wait to hear if just the move the UMH lock it creates an iss

Re: [PATCH 4.13 20/27] Revert "firmware: add sanity check on shutdown/suspend"

2017-09-13 Thread Luis R. Rodriguez
Rafeal a question for you below. On Tue, Sep 12, 2017 at 09:11:46PM -0700, Linus Torvalds wrote: > On Tue, Sep 12, 2017 at 5:47 PM, Greg Kroah-Hartman > wrote: > > > >> If reverting this commit please consider reverting also commit > >> 06a45a93e7d34a ("firmware: move umh try locks into the umh c

Re: btusb "firmware request while host is not available" at resume

2017-09-13 Thread Luis R. Rodriguez
On Wed, Sep 13, 2017 at 08:52:15AM +0200, Marcel Holtmann wrote: > > I checked and prior to commit 81f95076281f ("firmware: add sanity check on > > shutdown/suspend") and commit 06a45a93e7d34aa ("firmware: move umh try locks > > into the umh code") I believe we could end up also failing at a firmwa

Re: [PATCH 4.13 20/27] Revert "firmware: add sanity check on shutdown/suspend"

2017-09-12 Thread Luis R. Rodriguez
On Tue, Sep 12, 2017 at 05:47:58PM -0700, Greg Kroah-Hartman wrote: > On Tue, Sep 12, 2017 at 07:20:08PM +0200, Luis R. Rodriguez wrote: > > On Tue, Sep 12, 2017 at 10:00:00AM -0700, Greg Kroah-Hartman wrote: > > > 4.13-stable review patch. If anyone has any objections, please

Re: [PATCH 4.13 20/27] Revert "firmware: add sanity check on shutdown/suspend"

2017-09-12 Thread Luis R. Rodriguez
d the revert fixed it for him too. If testing against old behaviour the right way would be to also revert commit 06a45a93e7d34a ("firmware: move umh try locks into the umh code"). Luis > > Reported-by: Linus Torvalds > Pointed-at-by: Greg Kroah-Hartman > Tested-by: Gab

Re: btusb "firmware request while host is not available" at resume

2017-09-12 Thread Luis R. Rodriguez
On Mon, Sep 11, 2017 at 05:48:52PM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 11, 2017 at 10:06:51PM +0200, Luis R. Rodriguez wrote: > > On Mon, Sep 11, 2017 at 12:29:55PM -0700, Greg Kroah-Hartman wrote: > > > On Mon, Sep 11, 2017 at 07:11:38PM +0200, Luis R. Rodriguez wro

Re: btusb "firmware request while host is not available" at resume

2017-09-12 Thread Luis R. Rodriguez
On Tue, Sep 12, 2017 at 07:13:42AM +0200, Marcel Holtmann wrote: > >> If something needs to be fixed, can you make a patch showing that? Or > >> do we also need to revert anything else as well to get back to a "better > >> working" state? > > > > I took a look at the driver and it seems that btus

Re: btusb "firmware request while host is not available" at resume

2017-09-11 Thread Luis R. Rodriguez
On Mon, Sep 11, 2017 at 5:13 PM, Gabriel C wrote: > On 11.09.2017 22:06, Luis R. Rodriguez wrote: >> >> On Mon, Sep 11, 2017 at 12:29:55PM -0700, Greg Kroah-Hartman wrote: >>> >>> On Mon, Sep 11, 2017 at 07:11:38PM +0200, Luis R. Rodriguez wrote: >>>>

Re: btusb "firmware request while host is not available" at resume

2017-09-11 Thread Luis R. Rodriguez
On Mon, Sep 11, 2017 at 12:29:55PM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 11, 2017 at 07:11:38PM +0200, Luis R. Rodriguez wrote: > > On Mon, Sep 11, 2017 at 06:46:47AM -0700, Greg Kroah-Hartman wrote: > > > To confirm, reverting this fixes the problem I was see

Re: btusb "firmware request while host is not available" at resume

2017-09-11 Thread Luis R. Rodriguez
On Mon, Sep 11, 2017 at 06:46:47AM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 11, 2017 at 07:12:44AM +0200, Marcel Holtmann wrote: > > Hi Linus, > > > > >> Yes 81f95076281f is to blame.. After reverting it all is fine again. > > >> > > >> 15 resume cycles on the one laptop , 10 on the other w

Re: [PATCH v2] sched: check user input value of sysctl_sched_time_avg

2017-09-06 Thread Luis R. Rodriguez
On Mon, Sep 04, 2017 at 03:54:23PM +0800, Ethan Zhao wrote: > Peter, > > > On 2017/9/4 15:49, Peter Zijlstra wrote: > > On Sat, Sep 02, 2017 at 02:57:32PM +0800, Ethan Zhao wrote: > > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > > > index 6648fbb..609bed2 100644 > > > --- a/kernel/sysctl.c

Re: [RFC PATCH v2 5/7] Documentation: Add three sysctls for smart idle poll

2017-08-29 Thread Luis R. Rodriguez
On Tue, Aug 29, 2017 at 11:46:39AM +, Yang Zhang wrote: > To reduce the cost of poll, we introduce three sysctl to control the > poll time. This commit does not describe in any way the fact that these knobs are all for and only for PARAVIRT. > diff --git a/Documentation/sysctl/kernel.txt b/Do

Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2017-08-10 Thread Luis R. Rodriguez
On Fri, Jun 30, 2017 at 11:35:41PM +0200, Arend van Spriel wrote: > On 23-06-17 23:53, Luis R. Rodriguez wrote: > > On Tue, May 16, 2017 at 10:41:08AM +0200, Arend Van Spriel wrote: > >> On 16-5-2017 1:13, Luis R. Rodriguez wrote: > >>> Since no upstream delta is ne

[PATCH 1/4] kmod: split out umh code into its own file

2017-08-10 Thread Luis R. Rodriguez
There's a slew of usermode helper users and kmod is just one of them. Split out the usermode helper code into its own file to keep the logic and focus split up. This change provides no functional changes. Signed-off-by: Luis R. Rodriguez --- MAINTAINERS | 6 + kernel/Makefile

[PATCH 4/4] kmod: move #ifdef CONFIG_MODULES wrapper to Makefile

2017-08-10 Thread Luis R. Rodriguez
The entire file is now conditionally compiled only when CONFIG_MODULES is enabled, and this this is a bool. Just move this conditional to the Makefile as its easier to read this way. Signed-off-by: Luis R. Rodriguez --- kernel/Makefile | 3 ++- kernel/kmod.c | 3 --- 2 files changed, 2

[PATCH 3/4] kmod: split off umh headers into its own file

2017-08-10 Thread Luis R. Rodriguez
In the future usermode helper users do not need to carry in all the of kmod headers declarations. Since kmod.h still includes umh.h this change has no functional changes, each umh user can be cleaned up separately later and with time. Signed-off-by: Luis R. Rodriguez --- MAINTAINERS

[PATCH 2/4] MAINTAINERS: clarify kmod is just a kernel module loader

2017-08-10 Thread Luis R. Rodriguez
This should make it clearer what the kmod code is now that the umh code is split out separately. Signed-off-by: Luis R. Rodriguez --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9a32a397f694..a3677eaacd1e 100644 --- a

[PATCH 0/4] kmod: few code cleanups to split out umh code

2017-08-10 Thread Luis R. Rodriguez
s OK. If there are any issues or questions please let me know. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20170810-kmod-for-v4.14 Luis R. Rodriguez (4): kmod: split out umh code into its own file MAINTAINERS: clarify kmod is just a kernel module loader

Re: [PATCH V5 1/2] firmware: add more flexible request_firmware_async function

2017-08-10 Thread Luis R. Rodriguez
On Thu, Aug 03, 2017 at 05:55:18AM +, Coelho, Luciano wrote: > On Thu, 2017-08-03 at 08:23 +0300, Kalle Valo wrote: > > "Luis R. Rodriguez" writes: > > > > > > +int request_firmware_nowait(struct module *module, bool uevent, > > > > +

Re: [PATCH V5 1/2] firmware: add more flexible request_firmware_async function

2017-08-10 Thread Luis R. Rodriguez
On Thu, Aug 03, 2017 at 08:23:00AM +0300, Kalle Valo wrote: > "Luis R. Rodriguez" writes: > > >> +int request_firmware_nowait(struct module *module, bool uevent, > >> + const char *name, struct device *device, gfp_t gfp, > &g

Re: [PATCH v4 0/5] firmware: pending fixes for v4.14-rc1

2017-08-09 Thread Luis R. Rodriguez
On Wed, Aug 02, 2017 at 10:55:38PM +0200, Luis R. Rodriguez wrote: > On Thu, Jul 20, 2017 at 01:13:37PM -0700, Luis R. Rodriguez wrote: > > Greg, > > > > this is the series of pending fixes for v4.14-rc1. They depend on the > > series of fixes just posted for v4.13-fi

<    1   2   3   4   5   6   7   8   9   10   >