Re: [PATCH] pstore: Fix bool initialization/comparison

2018-11-29 Thread Kees Cook
On Sat, Oct 7, 2017 at 7:24 AM Thomas Meyer wrote: > Bool initializations should use true and false. Bool tests don't need > comparisons. > > Signed-off-by: Thomas Meyer I totally missed this email (now over a year ago!) However, since it's still correct and applies, I've taken it for -next

Re: [PATCH] pstore: Fix bool initialization/comparison

2018-11-29 Thread Kees Cook
On Sat, Oct 7, 2017 at 7:24 AM Thomas Meyer wrote: > Bool initializations should use true and false. Bool tests don't need > comparisons. > > Signed-off-by: Thomas Meyer I totally missed this email (now over a year ago!) However, since it's still correct and applies, I've taken it for -next

Re: [PATCH 00/23 - V4] NFS: Remove generic RPC credentials.

2018-11-29 Thread NeilBrown
Hi, has anyone else had a chance to look at this yet? There is a small conflict now due to SUNRPC: Fix a bogus get/put in generic_key_to_expire() Should I resend with that fixed up? Thanks, NeilBrown On Wed, Nov 07 2018, NeilBrown wrote: > This is an updated version of a series I

Re: [PATCH v2 5/5] clk: samsung: exynos5433: add imem clock

2018-11-29 Thread Chanwoo Choi
Hi Kamil, On 2018년 11월 30일 00:51, Kamil Konieczny wrote: > Add imem clock for exynos5433. This will enable to use crypto Security s/clock/clocks > SubSystem (in short SSS) and SlimSSS IP blocks. > > Signed-off-by: Kamil Konieczny > --- > drivers/clk/samsung/clk-exynos5433.c | 189

Re: [PATCH 00/23 - V4] NFS: Remove generic RPC credentials.

2018-11-29 Thread NeilBrown
Hi, has anyone else had a chance to look at this yet? There is a small conflict now due to SUNRPC: Fix a bogus get/put in generic_key_to_expire() Should I resend with that fixed up? Thanks, NeilBrown On Wed, Nov 07 2018, NeilBrown wrote: > This is an updated version of a series I

Re: [PATCH v2 5/5] clk: samsung: exynos5433: add imem clock

2018-11-29 Thread Chanwoo Choi
Hi Kamil, On 2018년 11월 30일 00:51, Kamil Konieczny wrote: > Add imem clock for exynos5433. This will enable to use crypto Security s/clock/clocks > SubSystem (in short SSS) and SlimSSS IP blocks. > > Signed-off-by: Kamil Konieczny > --- > drivers/clk/samsung/clk-exynos5433.c | 189

[PATCH] misc: ti-st: make array read_ver_cmd static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the const array read_ver_cmd on the stack but instead make it static. Makes the object code smaller by 42 bytes: Before: textdata bss dec hex filename 172626928 192 243825f3e drivers/misc/ti-st/st_kim.o After: text

[PATCH] misc: ti-st: make array read_ver_cmd static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the const array read_ver_cmd on the stack but instead make it static. Makes the object code smaller by 42 bytes: Before: textdata bss dec hex filename 172626928 192 243825f3e drivers/misc/ti-st/st_kim.o After: text

[GIT PULL] pstore fix for v4.20-rc5

2018-11-29 Thread Kees Cook
Hi Linus, Please pull this pstore fix for v4.20-rc5. Thanks! -Kees The following changes since commit 1227daa43bce1318ff6fb54e6cd862b4f60245c7: pstore/ram: Clarify resource reservation labels (2018-10-22 07:11:58 -0700) are available in the Git repository at:

[GIT PULL] pstore fix for v4.20-rc5

2018-11-29 Thread Kees Cook
Hi Linus, Please pull this pstore fix for v4.20-rc5. Thanks! -Kees The following changes since commit 1227daa43bce1318ff6fb54e6cd862b4f60245c7: pstore/ram: Clarify resource reservation labels (2018-10-22 07:11:58 -0700) are available in the Git repository at:

[PATCH -next v2 04/12] pstore: Avoid duplicate call of persistent_ram_zap()

2018-11-29 Thread Kees Cook
From: Peng Wang When initialing a prz, if invalid data is found (no PERSISTENT_RAM_SIG), the function call path looks like this: ramoops_init_prz -> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap persistent_ram_zap As we can see, persistent_ram_zap() is called

[PATCH -next v2 04/12] pstore: Avoid duplicate call of persistent_ram_zap()

2018-11-29 Thread Kees Cook
From: Peng Wang When initialing a prz, if invalid data is found (no PERSISTENT_RAM_SIG), the function call path looks like this: ramoops_init_prz -> persistent_ram_new -> persistent_ram_post_init -> persistent_ram_zap persistent_ram_zap As we can see, persistent_ram_zap() is called

[PATCH -next v2 01/12] pstore/ram: Correctly calculate usable PRZ bytes

2018-11-29 Thread Kees Cook
The actual number of bytes stored in a PRZ is smaller than the bytes requested by platform data, since there is a header on each PRZ. Additionally, if ECC is enabled, there are trailing bytes used as well. Normally this mismatch doesn't matter since PRZs are circular buffers and the leading

[PATCH -next v2 01/12] pstore/ram: Correctly calculate usable PRZ bytes

2018-11-29 Thread Kees Cook
The actual number of bytes stored in a PRZ is smaller than the bytes requested by platform data, since there is a header on each PRZ. Additionally, if ECC is enabled, there are trailing bytes used as well. Normally this mismatch doesn't matter since PRZs are circular buffers and the leading

[PATCH -next v2 07/12] pstore/ram: Add kern-doc for struct persistent_ram_zone

2018-11-29 Thread Kees Cook
The struct persistent_ram_zone wasn't well documented. This adds kern-doc for it. Signed-off-by: Kees Cook --- fs/pstore/ram_core.c | 10 + include/linux/pstore_ram.h | 46 +++--- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git

[PATCH -next v2 05/12] pstore/ram: Standardize module name in ramoops

2018-11-29 Thread Kees Cook
With both ram.c and ram_core.c built into ramoops.ko, it doesn't make sense to have differing pr_fmt prefixes. This fixes ram_core.c to use the module name (as ram.c already does). Additionally improves region reservation error to include the region name. Signed-off-by: Kees Cook ---

Re: [PATCH v4 4/6] coresight: Use PMU driver configuration for sink selection

2018-11-29 Thread Mathieu Poirier
Hi Greg, On Thu, Nov 29, 2018 at 08:49:36AM +0100, Greg KH wrote: > On Wed, Nov 28, 2018 at 03:01:16PM -0700, Mathieu Poirier wrote: > > This patch uses the PMU driver configuration held in event::hw::drv_config > > to select a sink for each event that is created (the old sysFS way of > > working

[PATCH -next v2 07/12] pstore/ram: Add kern-doc for struct persistent_ram_zone

2018-11-29 Thread Kees Cook
The struct persistent_ram_zone wasn't well documented. This adds kern-doc for it. Signed-off-by: Kees Cook --- fs/pstore/ram_core.c | 10 + include/linux/pstore_ram.h | 46 +++--- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git

[PATCH -next v2 05/12] pstore/ram: Standardize module name in ramoops

2018-11-29 Thread Kees Cook
With both ram.c and ram_core.c built into ramoops.ko, it doesn't make sense to have differing pr_fmt prefixes. This fixes ram_core.c to use the module name (as ram.c already does). Additionally improves region reservation error to include the region name. Signed-off-by: Kees Cook ---

Re: [PATCH v4 4/6] coresight: Use PMU driver configuration for sink selection

2018-11-29 Thread Mathieu Poirier
Hi Greg, On Thu, Nov 29, 2018 at 08:49:36AM +0100, Greg KH wrote: > On Wed, Nov 28, 2018 at 03:01:16PM -0700, Mathieu Poirier wrote: > > This patch uses the PMU driver configuration held in event::hw::drv_config > > to select a sink for each event that is created (the old sysFS way of > > working

[PATCH -next v2 08/12] pstore: Improve and update some comments and status output

2018-11-29 Thread Kees Cook
This improves and updates some comments: - dump handler comment out of sync from calling convention - fix kern-doc typo and improves status output: - reminder that only kernel crash dumps are compressed - do not be silent about ECC infrastructure failures Signed-off-by: Kees Cook ---

[PATCH -next v2 06/12] pstore/ram: Report backend assignments with finer granularity

2018-11-29 Thread Kees Cook
In order to more easily perform automated regression testing, this adds pr_debug() calls to report each prz allocation which can then be verified against persistent storage. Specifically, seeing the dividing line between header, data, any ECC bytes. (And the general assignment output is updated to

Re: [GIT PULL] SELinux fixes for v4.20 (#2)

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 11:48:40 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git > tags/selinux-pr-20181129 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f92a2ebb3d5588720a33d4f22d55b4ba24f94da6 Thank you! --

[PATCH] fpga: mgr: altera-ps-spi: make array dummy static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the const array dummy on the stack but instead make it static. Makes the object code smaller by 26 bytes: Before: textdata bss dec hex filename 73712032 0940324bb drivers/fpga/altera-ps-spi.o After: textdata

Re: [GIT PULL] s390 patches for 4.20 #3

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 13:16:38 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-4.20-3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3578f19143b0a792bcd0ecb19f9295e2da563b54 Thank you! -- Deet-doot-dot, I am a

Re: [GIT PULL] sound fixes for 4.20-rc5

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 11:22:45 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git > tags/sound-4.20-rc5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b905e2db5cc42e64f8169474448f16083c535abe Thank you! -- Deet-doot-dot,

[PATCH -next v2 08/12] pstore: Improve and update some comments and status output

2018-11-29 Thread Kees Cook
This improves and updates some comments: - dump handler comment out of sync from calling convention - fix kern-doc typo and improves status output: - reminder that only kernel crash dumps are compressed - do not be silent about ECC infrastructure failures Signed-off-by: Kees Cook ---

[PATCH -next v2 06/12] pstore/ram: Report backend assignments with finer granularity

2018-11-29 Thread Kees Cook
In order to more easily perform automated regression testing, this adds pr_debug() calls to report each prz allocation which can then be verified against persistent storage. Specifically, seeing the dividing line between header, data, any ECC bytes. (And the general assignment output is updated to

Re: [GIT PULL] SELinux fixes for v4.20 (#2)

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 11:48:40 -0500: > git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git > tags/selinux-pr-20181129 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f92a2ebb3d5588720a33d4f22d55b4ba24f94da6 Thank you! --

[PATCH] fpga: mgr: altera-ps-spi: make array dummy static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the const array dummy on the stack but instead make it static. Makes the object code smaller by 26 bytes: Before: textdata bss dec hex filename 73712032 0940324bb drivers/fpga/altera-ps-spi.o After: textdata

Re: [GIT PULL] s390 patches for 4.20 #3

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 13:16:38 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-4.20-3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3578f19143b0a792bcd0ecb19f9295e2da563b54 Thank you! -- Deet-doot-dot, I am a

Re: [GIT PULL] sound fixes for 4.20-rc5

2018-11-29 Thread pr-tracker-bot
The pull request you sent on Thu, 29 Nov 2018 11:22:45 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git > tags/sound-4.20-rc5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b905e2db5cc42e64f8169474448f16083c535abe Thank you! -- Deet-doot-dot,

[RFT PATCH 1/4] Documentation: DT: arm: add support for sockets defining package boundaries

2018-11-29 Thread Atish Patra
From: Sudeep Holla The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of

[PATCH -next v2 10/12] pstore: Map PSTORE_TYPE_* to strings

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" In later patches we will need to map types to names, so create a constant table for that which can also be used in different parts of old and new code. This saves the type in the PRZ which will be useful in later patches. Instead of having an explicit

[RFT PATCH 0/4] Unify CPU topology across ARM64 & RISC-V

2018-11-29 Thread Atish Patra
The cpu-map DT entry in ARM64 can describe the CPU topology in much better way compared to other existing approaches. RISC-V can easily adopt this binding to represent it's own CPU topology. Thus, both cpu-map DT binding and topology parsing code can be moved to a common location so that RISC-V or

[PATCH -next v2 10/12] pstore: Map PSTORE_TYPE_* to strings

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" In later patches we will need to map types to names, so create a constant table for that which can also be used in different parts of old and new code. This saves the type in the PRZ which will be useful in later patches. Instead of having an explicit

[RFT PATCH 0/4] Unify CPU topology across ARM64 & RISC-V

2018-11-29 Thread Atish Patra
The cpu-map DT entry in ARM64 can describe the CPU topology in much better way compared to other existing approaches. RISC-V can easily adopt this binding to represent it's own CPU topology. Thus, both cpu-map DT binding and topology parsing code can be moved to a common location so that RISC-V or

[RFT PATCH 1/4] Documentation: DT: arm: add support for sockets defining package boundaries

2018-11-29 Thread Atish Patra
From: Sudeep Holla The current ARM DT topology description provides the operating system with a topological view of the system that is based on leaf nodes representing either cores or threads (in an SMT system) and a hierarchical set of cluster nodes that creates a hierarchical topology view of

[RFT PATCH 2/4] dt-binding: cpu-topology: Move cpu-map to a common binding.

2018-11-29 Thread Atish Patra
cpu-map binding can be used to described cpu topology for both RISC-V & ARM. It makes more sense to move the binding to document to a common place. The relevant discussion can be found here. https://lkml.org/lkml/2018/11/6/19 Signed-off-by: Atish Patra --- .../{arm/topology.txt =>

[RFT PATCH 3/4] cpu-topology: Move cpu topology code to common code.

2018-11-29 Thread Atish Patra
Both RISC-V & ARM64 are using cpu-map device tree to describe their cpu topology. It's better to move the relevant code to a common place instead of duplicate code. Signed-off-by: Atish Patra --- arch/arm64/include/asm/topology.h | 22 --- arch/arm64/kernel/topology.c | 303

[RFT PATCH 4/4] RISC-V: Parse cpu topology during boot.

2018-11-29 Thread Atish Patra
Currently, there are no topology defined for RISC-V. Parse the cpu-map node from device tree and setup the cpu topology. CPU topology after applying the patch. $cat /sys/devices/system/cpu/cpu2/topology/core_siblings_list 0-3 $cat /sys/devices/system/cpu/cpu3/topology/core_siblings_list 0-3 $cat

[RFT PATCH 4/4] RISC-V: Parse cpu topology during boot.

2018-11-29 Thread Atish Patra
Currently, there are no topology defined for RISC-V. Parse the cpu-map node from device tree and setup the cpu topology. CPU topology after applying the patch. $cat /sys/devices/system/cpu/cpu2/topology/core_siblings_list 0-3 $cat /sys/devices/system/cpu/cpu3/topology/core_siblings_list 0-3 $cat

[RFT PATCH 2/4] dt-binding: cpu-topology: Move cpu-map to a common binding.

2018-11-29 Thread Atish Patra
cpu-map binding can be used to described cpu topology for both RISC-V & ARM. It makes more sense to move the binding to document to a common place. The relevant discussion can be found here. https://lkml.org/lkml/2018/11/6/19 Signed-off-by: Atish Patra --- .../{arm/topology.txt =>

[RFT PATCH 3/4] cpu-topology: Move cpu topology code to common code.

2018-11-29 Thread Atish Patra
Both RISC-V & ARM64 are using cpu-map device tree to describe their cpu topology. It's better to move the relevant code to a common place instead of duplicate code. Signed-off-by: Atish Patra --- arch/arm64/include/asm/topology.h | 22 --- arch/arm64/kernel/topology.c | 303

[PATCH -next v2 03/12] pstore: Remove needless lock during console writes

2018-11-29 Thread Kees Cook
Since the console writer does not use the preallocated crash dump buffer any more, there is no reason to perform locking around it. Fixes: 70ad35db3321 ("pstore: Convert console write to use ->write_buf") Signed-off-by: Kees Cook Reviewed-by: Joel Fernandes (Google) --- fs/pstore/platform.c |

[PATCH -next v2 02/12] pstore: Do not use crash buffer for decompression

2018-11-29 Thread Kees Cook
The pre-allocated compression buffer used for crash dumping was also being used for decompression. This isn't technically safe, since it's possible the kernel may attempt a crashdump while pstore is populating the pstore filesystem (and performing decompression). Instead, just allocate a separate

[PATCH -next v2 03/12] pstore: Remove needless lock during console writes

2018-11-29 Thread Kees Cook
Since the console writer does not use the preallocated crash dump buffer any more, there is no reason to perform locking around it. Fixes: 70ad35db3321 ("pstore: Convert console write to use ->write_buf") Signed-off-by: Kees Cook Reviewed-by: Joel Fernandes (Google) --- fs/pstore/platform.c |

[PATCH -next v2 02/12] pstore: Do not use crash buffer for decompression

2018-11-29 Thread Kees Cook
The pre-allocated compression buffer used for crash dumping was also being used for decompression. This isn't technically safe, since it's possible the kernel may attempt a crashdump while pstore is populating the pstore filesystem (and performing decompression). Instead, just allocate a separate

[PATCH -next v2 11/12] pstore/ram: Simplify ramoops_get_next_prz() arguments

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" (1) remove type argument from ramoops_get_next_prz() Since we store the type of the prz when we initialize it, we no longer need to pass it again in ramoops_get_next_prz() since we can just use that to setup the pstore record. So lets remove it from the argument

[PATCH -next v2 12/12] pstore/ram: Do not treat empty buffers as valid

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" The ramoops backend currently calls persistent_ram_save_old() even if a buffer is empty. While this appears to work, it is does not seem like the right thing to do and could lead to future bugs so lets avoid that. It also prevents misleading prints in the logs

[PATCH -next v2 09/12] pstore: Replace open-coded << with BIT()

2018-11-29 Thread Kees Cook
Minor clean-up to use BIT() (as already done in pstore_ram.h). Signed-off-by: Kees Cook --- include/linux/pstore.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 81669aa80027..f46e5df76b58 100644 ---

[PATCH -next v2 11/12] pstore/ram: Simplify ramoops_get_next_prz() arguments

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" (1) remove type argument from ramoops_get_next_prz() Since we store the type of the prz when we initialize it, we no longer need to pass it again in ramoops_get_next_prz() since we can just use that to setup the pstore record. So lets remove it from the argument

[PATCH -next v2 12/12] pstore/ram: Do not treat empty buffers as valid

2018-11-29 Thread Kees Cook
From: "Joel Fernandes (Google)" The ramoops backend currently calls persistent_ram_save_old() even if a buffer is empty. While this appears to work, it is does not seem like the right thing to do and could lead to future bugs so lets avoid that. It also prevents misleading prints in the logs

[PATCH -next v2 09/12] pstore: Replace open-coded << with BIT()

2018-11-29 Thread Kees Cook
Minor clean-up to use BIT() (as already done in pstore_ram.h). Signed-off-by: Kees Cook --- include/linux/pstore.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 81669aa80027..f46e5df76b58 100644 ---

[PATCH -next v2 00/12] pstore: various clean-ups

2018-11-29 Thread Kees Cook
This is a collection of clean-ups from Joel Fernandes, Peng Wang, and myself. I wanted to put the entire series up for review since they've changed a bit from their earlier incarnations. I intend to push them to next shortly... Thanks! -Kees Joel Fernandes (Google) (3): pstore: Map

[PATCH -next v2 00/12] pstore: various clean-ups

2018-11-29 Thread Kees Cook
This is a collection of clean-ups from Joel Fernandes, Peng Wang, and myself. I wanted to put the entire series up for review since they've changed a bit from their earlier incarnations. I intend to push them to next shortly... Thanks! -Kees Joel Fernandes (Google) (3): pstore: Map

Re: [PATCH v8 1/2] seccomp: add a return code to trap to userspace

2018-11-29 Thread Tycho Andersen
On Mon, Oct 29, 2018 at 04:40:30PM -0600, Tycho Andersen wrote: > + resp.id = req.id; > + resp.error = -512; /* -ERESTARTSYS */ > + resp.val = 0; > + > + EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, ), 0); So, it turns out this *doesn't* work, and the reason this test was

Re: [PATCH v8 1/2] seccomp: add a return code to trap to userspace

2018-11-29 Thread Tycho Andersen
On Mon, Oct 29, 2018 at 04:40:30PM -0600, Tycho Andersen wrote: > + resp.id = req.id; > + resp.error = -512; /* -ERESTARTSYS */ > + resp.val = 0; > + > + EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, ), 0); So, it turns out this *doesn't* work, and the reason this test was

[PATCH 07/12] fs/locks: allow a lock request to block other requests.

2018-11-29 Thread NeilBrown
Currently, a lock can block pending requests, but all pending requests are equal. If lots of pending requests are mutually exclusive, this means they will all be woken up and all but one will fail. This can hurt performance. So we will allow pending requests to block other requests. Only the

[PATCH 06/12] fs/locks: use properly initialized file_lock when unlocking.

2018-11-29 Thread NeilBrown
Both locks_remove_posix() and locks_remove_flock() use a struct file_lock without calling locks_init_lock() on it. This means the various list_heads are not initialized, which will become a problem with a later patch. So change them both to initialize properly. For flock locks, this involves

[PATCH 07/12] fs/locks: allow a lock request to block other requests.

2018-11-29 Thread NeilBrown
Currently, a lock can block pending requests, but all pending requests are equal. If lots of pending requests are mutually exclusive, this means they will all be woken up and all but one will fail. This can hurt performance. So we will allow pending requests to block other requests. Only the

[PATCH 06/12] fs/locks: use properly initialized file_lock when unlocking.

2018-11-29 Thread NeilBrown
Both locks_remove_posix() and locks_remove_flock() use a struct file_lock without calling locks_init_lock() on it. This means the various list_heads are not initialized, which will become a problem with a later patch. So change them both to initialize properly. For flock locks, this involves

[PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-29 Thread NeilBrown
When we find an existing lock which conflicts with a request, and the request wants to wait, we currently add the request to a list. When the lock is removed, the whole list is woken. This can cause the thundering-herd problem. To reduce the problem, we make use of the (new) fact that a pending

[PATCH 11/12] fs/locks: merge posix_unblock_lock() and locks_delete_block()

2018-11-29 Thread NeilBrown
posix_unblock_lock() is not specific to posix locks, and behaves nearly identically to locks_delete_block() - the former returning a status while the later doesn't. So discard posix_unblock_lock() and use locks_delete_block() instead, after giving that function an appropriate return value.

[PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-29 Thread NeilBrown
When we find an existing lock which conflicts with a request, and the request wants to wait, we currently add the request to a list. When the lock is removed, the whole list is woken. This can cause the thundering-herd problem. To reduce the problem, we make use of the (new) fact that a pending

[PATCH 11/12] fs/locks: merge posix_unblock_lock() and locks_delete_block()

2018-11-29 Thread NeilBrown
posix_unblock_lock() is not specific to posix locks, and behaves nearly identically to locks_delete_block() - the former returning a status while the later doesn't. So discard posix_unblock_lock() and use locks_delete_block() instead, after giving that function an appropriate return value.

[PATCH 12/12] fs/locks: remove unnecessary white space.

2018-11-29 Thread NeilBrown
- spaces before tabs, - spaces at the end of lines, - multiple blank lines, - blank lines before EXPORT_SYMBOL, can all go. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields --- fs/locks.c | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff

[PATCH 12/12] fs/locks: remove unnecessary white space.

2018-11-29 Thread NeilBrown
- spaces before tabs, - spaces at the end of lines, - multiple blank lines, - blank lines before EXPORT_SYMBOL, can all go. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields --- fs/locks.c | 33 - 1 file changed, 12 insertions(+), 21 deletions(-) diff

[PATCH 08/12] fs/locks: always delete_block after waiting.

2018-11-29 Thread NeilBrown
Now that requests can block other requests, we need to be careful to always clean up those blocked requests. Any time that we wait for a request, we might have other requests attached, and when we stop waiting, we must clean them up. If the lock was granted, the requests might have been moved to

[PATCH 05/12] ocfs2: properly initial file_lock used for unlock.

2018-11-29 Thread NeilBrown
Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields ---

[PATCH 03/12] NFS: use locks_copy_lock() to copy locks.

2018-11-29 Thread NeilBrown
Using memcpy() to copy lock requests leaves the various list_head in an inconsistent state. As we will soon attach a list of conflicting request to another pending request, we need these lists to be consistent. So change NFS to use locks_init_lock/locks_copy_lock instead of memcpy. Signed-off-by:

[PATCH 04/12] gfs2: properly initial file_lock used for unlock.

2018-11-29 Thread NeilBrown
Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields ---

[PATCH 09/12] fs/locks: change all *_conflict() functions to return bool.

2018-11-29 Thread NeilBrown
posix_locks_conflict() and flock_locks_conflict() both return int. leases_conflict() returns bool. This inconsistency will cause problems for the next patch if not fixed. So change posix_locks_conflict() and flock_locks_conflict() to return bool. Also change the locks_conflict() helper. And

[PATCH 03/12] NFS: use locks_copy_lock() to copy locks.

2018-11-29 Thread NeilBrown
Using memcpy() to copy lock requests leaves the various list_head in an inconsistent state. As we will soon attach a list of conflicting request to another pending request, we need these lists to be consistent. So change NFS to use locks_init_lock/locks_copy_lock instead of memcpy. Signed-off-by:

[PATCH 04/12] gfs2: properly initial file_lock used for unlock.

2018-11-29 Thread NeilBrown
Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields ---

[PATCH 09/12] fs/locks: change all *_conflict() functions to return bool.

2018-11-29 Thread NeilBrown
posix_locks_conflict() and flock_locks_conflict() both return int. leases_conflict() returns bool. This inconsistency will cause problems for the next patch if not fixed. So change posix_locks_conflict() and flock_locks_conflict() to return bool. Also change the locks_conflict() helper. And

[PATCH 08/12] fs/locks: always delete_block after waiting.

2018-11-29 Thread NeilBrown
Now that requests can block other requests, we need to be careful to always clean up those blocked requests. Any time that we wait for a request, we might have other requests attached, and when we stop waiting, we must clean them up. If the lock was granted, the requests might have been moved to

[PATCH 05/12] ocfs2: properly initial file_lock used for unlock.

2018-11-29 Thread NeilBrown
Rather than assuming all-zeros is sufficient, use the available API to initialize the file_lock structure use for unlock. VFS-level changes will soon make it important that the list_heads in file_lock are always properly initialized. Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields ---

[PATCH 02/12] fs/locks: split out __locks_wake_up_blocks().

2018-11-29 Thread NeilBrown
This functionality will be useful in future patches, so split it out from locks_wake_up_blocks(). Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields --- fs/locks.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/locks.c b/fs/locks.c

[PATCH 02/12] fs/locks: split out __locks_wake_up_blocks().

2018-11-29 Thread NeilBrown
This functionality will be useful in future patches, so split it out from locks_wake_up_blocks(). Signed-off-by: NeilBrown Reviewed-by: J. Bruce Fields --- fs/locks.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/fs/locks.c b/fs/locks.c

[PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-29 Thread NeilBrown
struct file lock contains an 'fl_next' pointer which is used to point to the lock that this request is blocked waiting for. So rename it to fl_blocker. The fl_blocked list_head in an active lock is the head of a list of blocked requests. In a request it is a node in that list. These are two

[PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-29 Thread NeilBrown
struct file lock contains an 'fl_next' pointer which is used to point to the lock that this request is blocked waiting for. So rename it to fl_blocker. The fl_blocked list_head in an active lock is the head of a list of blocked requests. In a request it is a node in that list. These are two

[PATCH 00/12 v6] fs/locks: avoid thundering-herd wake-ups

2018-11-29 Thread NeilBrown
This series has the fixes for the recently reported performance regressions merged into the patches which caused them. It also has a couple of little fixes that have been mentioned on the list, and that Jeff had merged into his copy. Thanks, NeilBrown --- NeilBrown (12): fs/locks: rename

[PATCH 00/12 v6] fs/locks: avoid thundering-herd wake-ups

2018-11-29 Thread NeilBrown
This series has the fixes for the recently reported performance regressions merged into the patches which caused them. It also has a couple of little fixes that have been mentioned on the list, and that Jeff had merged into his copy. Thanks, NeilBrown --- NeilBrown (12): fs/locks: rename

Re: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification

2018-11-29 Thread Bjorn Helgaas
On Thu, Nov 29, 2018 at 08:13:12PM +0100, Lukas Wunner wrote: > On Thu, Nov 29, 2018 at 06:57:37PM +, alex_gagn...@dellteam.com wrote: > > On 11/29/2018 11:36 AM, Bjorn Helgaas wrote: > > > On Wed, Nov 28, 2018 at 06:08:24PM -0600, Alexandru Gagniuc wrote: > > >> A warning is generated when a

Re: [PATCH] PCI: pciehp: Report degraded links via link bandwidth notification

2018-11-29 Thread Bjorn Helgaas
On Thu, Nov 29, 2018 at 08:13:12PM +0100, Lukas Wunner wrote: > On Thu, Nov 29, 2018 at 06:57:37PM +, alex_gagn...@dellteam.com wrote: > > On 11/29/2018 11:36 AM, Bjorn Helgaas wrote: > > > On Wed, Nov 28, 2018 at 06:08:24PM -0600, Alexandru Gagniuc wrote: > > >> A warning is generated when a

[PATCH] power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the array cpcap_battery_irqs on the stack but instead make it static. Makes the object code smaller by 99 bytes: Before: textdata bss dec hex filename 136732448 0 161213ef9 cpcap-battery.o After: textdata bss

Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64

2018-11-29 Thread Linus Torvalds
On Thu, Nov 29, 2018 at 12:25 PM Josh Poimboeuf wrote: > > On Thu, Nov 29, 2018 at 11:27:00AM -0800, Andy Lutomirski wrote: > > > > I propose a different solution: > > > > As in this patch set, we have a direct and an indirect version. The > > indirect version remains exactly the same as in this

[PATCH v2 0/6] crypto: x86_64 optimized XChaCha and NHPoly1305 (for Adiantum)

2018-11-29 Thread Eric Biggers
Hello, This series optimizes the Adiantum encryption mode for x86_64 by adding SSE2 and AVX2 accelerated implementations of NHPoly1305, specifically the NH part; and by modifying the existing x86_64 SSSE3/AVX2/AVX-512VL ChaCha20 implementation to support XChaCha20 and XChaCha12. This greatly

[PATCH] power: supply: cpcap-battery: make array cpcap_battery_irqs static, shrinks object size

2018-11-29 Thread Colin King
From: Colin Ian King Don't populate the array cpcap_battery_irqs on the stack but instead make it static. Makes the object code smaller by 99 bytes: Before: textdata bss dec hex filename 136732448 0 161213ef9 cpcap-battery.o After: textdata bss

Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64

2018-11-29 Thread Linus Torvalds
On Thu, Nov 29, 2018 at 12:25 PM Josh Poimboeuf wrote: > > On Thu, Nov 29, 2018 at 11:27:00AM -0800, Andy Lutomirski wrote: > > > > I propose a different solution: > > > > As in this patch set, we have a direct and an indirect version. The > > indirect version remains exactly the same as in this

[PATCH v2 0/6] crypto: x86_64 optimized XChaCha and NHPoly1305 (for Adiantum)

2018-11-29 Thread Eric Biggers
Hello, This series optimizes the Adiantum encryption mode for x86_64 by adding SSE2 and AVX2 accelerated implementations of NHPoly1305, specifically the NH part; and by modifying the existing x86_64 SSSE3/AVX2/AVX-512VL ChaCha20 implementation to support XChaCha20 and XChaCha12. This greatly

RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-29 Thread Chanho Min
> Chanho Min wrote: > > > > > > > On Mon, 26 Nov 2018 06:36:37 +0100, > > > > > Chanho Min wrote: > > > > > > > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non- > atomic > > > > > > PCM > > > > > > stream") fixes deadlock for non-atomic PCM stream. But, This > patch > > > > >

RE: [PATCH] ALSA: pcm: Fix starvation on down_write_nonblock()

2018-11-29 Thread Chanho Min
> Chanho Min wrote: > > > > > > > On Mon, 26 Nov 2018 06:36:37 +0100, > > > > > Chanho Min wrote: > > > > > > > > > > > > Commit 67ec1072b053 ("ALSA: pcm: Fix rwsem deadlock for non- > atomic > > > > > > PCM > > > > > > stream") fixes deadlock for non-atomic PCM stream. But, This > patch > > > > >

[PATCH 0/2] ARM: dts: enable CPU frequency scaling on Meson8/Meson8b

2018-11-29 Thread Martin Blumenstingl
This series enables CPU frequency scaling on Meson8 and Meson8b. On these SoCs all CPU cores are using the same clock, so all cores will always run at the same frequency. On Meson8b this is pretty straight-forward by taking the frequency and voltage table from Amlogic's 3.10 vendor kernel and

[PATCH 0/2] ARM: dts: enable CPU frequency scaling on Meson8/Meson8b

2018-11-29 Thread Martin Blumenstingl
This series enables CPU frequency scaling on Meson8 and Meson8b. On these SoCs all CPU cores are using the same clock, so all cores will always run at the same frequency. On Meson8b this is pretty straight-forward by taking the frequency and voltage table from Amlogic's 3.10 vendor kernel and

[PATCH 2/2] ARM: dts: meson: meson8b: add the CPU OPP tables

2018-11-29 Thread Martin Blumenstingl
The values are taken from Amlogic's 3.10 kernel sources. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b.dtsi | 66 ++ 1 file changed, 66 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index

[PATCH 2/2] ARM: dts: meson: meson8b: add the CPU OPP tables

2018-11-29 Thread Martin Blumenstingl
The values are taken from Amlogic's 3.10 kernel sources. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b.dtsi | 66 ++ 1 file changed, 66 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index

[PATCH 1/2] ARM: dts: meson: meson8: add the CPU OPP table

2018-11-29 Thread Martin Blumenstingl
The values are taken from Amlogic's 3.10 kernel sources. Their sources have a "meson8m2_n200_2G.dtd" which defines a different voltage table: - 0.86V for 96MHz - (values in between omitted) - 1.14V for 1.992GHz The reason for this is simply the hardware design because the voltage regulator on

[PATCH 1/2] ARM: dts: meson: meson8: add the CPU OPP table

2018-11-29 Thread Martin Blumenstingl
The values are taken from Amlogic's 3.10 kernel sources. Their sources have a "meson8m2_n200_2G.dtd" which defines a different voltage table: - 0.86V for 96MHz - (values in between omitted) - 1.14V for 1.992GHz The reason for this is simply the hardware design because the voltage regulator on

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