Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Tobin C. Harding
On Tue, May 01, 2018 at 09:39:02PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 09:33:39 +1000 > "Tobin C. Harding" wrote: > > > diff --git a/drivers/char/random.c b/drivers/char/random.c > > index 031d18b31e0f..3a66507ea60b 100644 > > --- a/drivers/char/random.c > > +++

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Tobin C. Harding
On Tue, May 01, 2018 at 09:39:02PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 09:33:39 +1000 > "Tobin C. Harding" wrote: > > > diff --git a/drivers/char/random.c b/drivers/char/random.c > > index 031d18b31e0f..3a66507ea60b 100644 > > --- a/drivers/char/random.c > > +++

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread tcharding
On Tue, May 01, 2018 at 09:45:07PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 11:27:58 +1000 > tcharding wrote: > > > On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > > > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > > >

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread tcharding
On Tue, May 01, 2018 at 09:45:07PM -0400, Steven Rostedt wrote: > On Wed, 2 May 2018 11:27:58 +1000 > tcharding wrote: > > > On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > > > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > > > > > > > This option should

[PATCH] net/xfrm: Fix lookups for states with spi == 0

2018-05-01 Thread Dmitry Safonov
It seems to be a valid use case to add xfrm state without Security Parameter Indexes (SPI) value associated: ip xfrm state add src $src dst $dst proto $proto mode $mode sel src $src dst $dst $algo The bad thing is that it's currently impossible to get/delete the state without SPI:

[PATCH] net/xfrm: Fix lookups for states with spi == 0

2018-05-01 Thread Dmitry Safonov
It seems to be a valid use case to add xfrm state without Security Parameter Indexes (SPI) value associated: ip xfrm state add src $src dst $dst proto $proto mode $mode sel src $src dst $dst $algo The bad thing is that it's currently impossible to get/delete the state without SPI:

Re: recent patch "x86/acpi: Prevent X2APIC id 0xffffffff from being accounted"

2018-05-01 Thread Dou Liyang
At 04/27/2018 08:09 PM, Jan Beulich wrote: On 27.04.18 at 10:32, wrote: At 04/27/2018 03:21 PM, Jan Beulich wrote: I've just stumbled across this commit, and I'm wondering if that's actually correct (I too have at least one system where such IDs are reported in

Re: recent patch "x86/acpi: Prevent X2APIC id 0xffffffff from being accounted"

2018-05-01 Thread Dou Liyang
At 04/27/2018 08:09 PM, Jan Beulich wrote: On 27.04.18 at 10:32, wrote: At 04/27/2018 03:21 PM, Jan Beulich wrote: I've just stumbled across this commit, and I'm wondering if that's actually correct (I too have at least one system where such IDs are reported in MADT): For offline/absent

linux-next: manual merge of the net-next tree with the net tree

2018-05-01 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: include/net/ip6_route.h between commit: edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6") from the net tree and commit: 93c2fb253d17 ("net/ipv6: Rename fib6_info struct elements") from the net-next tree. I

linux-next: manual merge of the net-next tree with the net tree

2018-05-01 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: include/net/ip6_route.h between commit: edd7ceb78296 ("ipv6: Allow non-gateway ECMP for IPv6") from the net tree and commit: 93c2fb253d17 ("net/ipv6: Rename fib6_info struct elements") from the net-next tree. I

Re: [PATCH v9 24/27] dt-bindings: timer: new bindings for TI DaVinci timer

2018-05-01 Thread David Lechner
Sekhar, On 04/27/2018 09:05 AM, Rob Herring wrote: On Thu, Apr 26, 2018 at 07:17:42PM -0500, David Lechner wrote: This adds new device tree bindings for the timer IP block of TI DaVinci-like SoCs. Signed-off-by: David Lechner --- v9 changes: - new patch in v9

Re: [PATCH v9 24/27] dt-bindings: timer: new bindings for TI DaVinci timer

2018-05-01 Thread David Lechner
Sekhar, On 04/27/2018 09:05 AM, Rob Herring wrote: On Thu, Apr 26, 2018 at 07:17:42PM -0500, David Lechner wrote: This adds new device tree bindings for the timer IP block of TI DaVinci-like SoCs. Signed-off-by: David Lechner --- v9 changes: - new patch in v9

Re: [PATCH v9 03/27] clk: davinci: psc: allow for dev == NULL

2018-05-01 Thread David Lechner
On 05/01/2018 09:02 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: +static inline void *_devm_kzalloc(struct device *dev, size_t size, gfp_t flags) +{ + if (dev) + return devm_kzalloc(dev, size, flags); + + return kzalloc(size, flags); +}

Re: [PATCH v9 03/27] clk: davinci: psc: allow for dev == NULL

2018-05-01 Thread David Lechner
On 05/01/2018 09:02 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: +static inline void *_devm_kzalloc(struct device *dev, size_t size, gfp_t flags) +{ + if (dev) + return devm_kzalloc(dev, size, flags); + + return kzalloc(size, flags); +}

Re: [PATCH v2] f2fs: fix to avoid race during access gc_thread pointer

2018-05-01 Thread Chao Yu
On 2018/4/28 10:36, Jaegeuk Kim wrote: > On 04/27, Chao Yu wrote: >> On 2018/4/27 0:03, Jaegeuk Kim wrote: >>> On 04/24, Chao Yu wrote: Thread A Thread BThread C - f2fs_remount - stop_gc_thread - f2fs_sbi_store

Re: [PATCH v2] f2fs: fix to avoid race during access gc_thread pointer

2018-05-01 Thread Chao Yu
On 2018/4/28 10:36, Jaegeuk Kim wrote: > On 04/27, Chao Yu wrote: >> On 2018/4/27 0:03, Jaegeuk Kim wrote: >>> On 04/24, Chao Yu wrote: Thread A Thread BThread C - f2fs_remount - stop_gc_thread - f2fs_sbi_store

Re: [PATCH v9 02/27] clk: davinci: da850-pll: change PLL0 to CLK_OF_DECLARE

2018-05-01 Thread David Lechner
On 05/01/2018 08:46 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: PLL0 on davinci/da850-type device needs to be registered early in boot because it is needed for clocksource/clockevent. Change the driver to use CLK_OF_DECLARE for this special case.

Re: [PATCH v9 02/27] clk: davinci: da850-pll: change PLL0 to CLK_OF_DECLARE

2018-05-01 Thread David Lechner
On 05/01/2018 08:46 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: PLL0 on davinci/da850-type device needs to be registered early in boot because it is needed for clocksource/clockevent. Change the driver to use CLK_OF_DECLARE for this special case.

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread Steven Rostedt
On Wed, 2 May 2018 11:27:58 +1000 tcharding wrote: > On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > > > > This option should NOT be enabled on production kernels. > > > > I

[PATCH] softirq: reorder trace_softirqs_on to prevent lockdep splat

2018-05-01 Thread Joel Fernandes
I'm able to reproduce a lockdep splat with config options: CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y and CONFIG_PREEMPTIRQ_EVENTS=y $ echo 1 > /d/tracing/events/preemptirq/preempt_enable/enable --- [ 26.112609] DEBUG_LOCKS_WARN_ON(current->softirqs_enabled) [ 26.112636] WARNING: CPU:

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread Steven Rostedt
On Wed, 2 May 2018 11:27:58 +1000 tcharding wrote: > On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > > > > This option should NOT be enabled on production kernels. > > > > I think with your fixes to

[PATCH] softirq: reorder trace_softirqs_on to prevent lockdep splat

2018-05-01 Thread Joel Fernandes
I'm able to reproduce a lockdep splat with config options: CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y and CONFIG_PREEMPTIRQ_EVENTS=y $ echo 1 > /d/tracing/events/preemptirq/preempt_enable/enable --- [ 26.112609] DEBUG_LOCKS_WARN_ON(current->softirqs_enabled) [ 26.112636] WARNING: CPU:

Re: [PATCH v9 01/27] clk: davinci: pll: allow dev == NULL

2018-05-01 Thread David Lechner
On 05/01/2018 08:27 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: This modifies the TI DaVinci PLL clock driver to allow for the case when dev == NULL. On some (most) SoCs that use this driver, the PLL clock needs to be registered during early boot because it is

Re: [PATCH v9 01/27] clk: davinci: pll: allow dev == NULL

2018-05-01 Thread David Lechner
On 05/01/2018 08:27 AM, Sekhar Nori wrote: On Friday 27 April 2018 05:47 AM, David Lechner wrote: This modifies the TI DaVinci PLL clock driver to allow for the case when dev == NULL. On some (most) SoCs that use this driver, the PLL clock needs to be registered during early boot because it is

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Steven Rostedt
On Wed, 2 May 2018 09:33:39 +1000 "Tobin C. Harding" wrote: > diff --git a/drivers/char/random.c b/drivers/char/random.c > index 031d18b31e0f..3a66507ea60b 100644 > --- a/drivers/char/random.c > +++ b/drivers/char/random.c > @@ -1725,26 +1725,28 @@

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Steven Rostedt
On Wed, 2 May 2018 09:33:39 +1000 "Tobin C. Harding" wrote: > diff --git a/drivers/char/random.c b/drivers/char/random.c > index 031d18b31e0f..3a66507ea60b 100644 > --- a/drivers/char/random.c > +++ b/drivers/char/random.c > @@ -1725,26 +1725,28 @@ EXPORT_SYMBOL(del_random_ready_callback); >

Re: [PATCH v2] f2fs: avoid stucking GC due to atomic write

2018-05-01 Thread Chao Yu
On 2018/4/28 10:34, Jaegeuk Kim wrote: > On 04/27, Chao Yu wrote: >> On 2018/4/26 23:54, Jaegeuk Kim wrote: >>> On 04/24, Chao Yu wrote: f2fs doesn't allow abuse on atomic write class interface, so except limiting in-mem pages' total memory usage capacity, we need to limit

Re: [PATCH v2] f2fs: avoid stucking GC due to atomic write

2018-05-01 Thread Chao Yu
On 2018/4/28 10:34, Jaegeuk Kim wrote: > On 04/27, Chao Yu wrote: >> On 2018/4/26 23:54, Jaegeuk Kim wrote: >>> On 04/24, Chao Yu wrote: f2fs doesn't allow abuse on atomic write class interface, so except limiting in-mem pages' total memory usage capacity, we need to limit

[lkp-robot] [EXP rcu] aa09766fd9: BUG:spinlock_trylock_failure_on_UP_on_CPU

2018-05-01 Thread kernel test robot
FYI, we noticed the following commit (built with gcc-7): commit: aa09766fd96b09ef68c4cc0e09869d16c1c11182 ("EXP rcu: Diagnostics for grace-period hangs") https://git.kernel.org/cgit/linux/kernel/git/paulmck/linux-rcu.git dev.2018.04.27a in testcase: boot on test machine: qemu-system-x86_64

[lkp-robot] [EXP rcu] aa09766fd9: BUG:spinlock_trylock_failure_on_UP_on_CPU

2018-05-01 Thread kernel test robot
FYI, we noticed the following commit (built with gcc-7): commit: aa09766fd96b09ef68c4cc0e09869d16c1c11182 ("EXP rcu: Diagnostics for grace-period hangs") https://git.kernel.org/cgit/linux/kernel/git/paulmck/linux-rcu.git dev.2018.04.27a in testcase: boot on test machine: qemu-system-x86_64

Re: [PATCH] efi/capsule-loader: Don't output reset log when header flags is not set

2018-05-01 Thread Yang, Shunyong
Hi, Ard, On Tue, 2018-05-01 at 11:54 +0200, Ard Biesheuvel wrote: > On 25 April 2018 at 05:10, Shunyong Yang com> wrote: > > > > It means firmware attempts to immediately process or launch the > > capsule > > when flags in capsule header is not set. Moreover, reset

Re: [PATCH] efi/capsule-loader: Don't output reset log when header flags is not set

2018-05-01 Thread Yang, Shunyong
Hi, Ard, On Tue, 2018-05-01 at 11:54 +0200, Ard Biesheuvel wrote: > On 25 April 2018 at 05:10, Shunyong Yang com> wrote: > > > > It means firmware attempts to immediately process or launch the > > capsule > > when flags in capsule header is not set. Moreover, reset is not > > needed > > in this

[PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread TSUKADA Koutaro
If nr_overcommit_hugepages is assumed to be infinite, allocating pages for hugetlb's overcommit from buddy pool is all unlimited even if being limited by memcg. The purpose of this patch is that if we allocate the hugetlb page from the boddy pool, that means we should charge it to memcg. A

[PATCH] memcg, hugetlb: pages allocated for hugetlb's overcommit will be charged to memcg

2018-05-01 Thread TSUKADA Koutaro
If nr_overcommit_hugepages is assumed to be infinite, allocating pages for hugetlb's overcommit from buddy pool is all unlimited even if being limited by memcg. The purpose of this patch is that if we allocate the hugetlb page from the boddy pool, that means we should charge it to memcg. A

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread tcharding
On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > This option should NOT be enabled on production kernels. > > I think with your fixes to get_random_bytes_arch(), it's perfectly fine to > use on

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread tcharding
On Wed, May 02, 2018 at 01:02:34AM +, Linus Torvalds wrote: > On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > > > > This option should NOT be enabled on production kernels. > > I think with your fixes to get_random_bytes_arch(), it's perfectly fine to > use on production kernels

[PATCH 01/12] soc: qcom: smem: rename variable in qcom_smem_get_global()

2018-05-01 Thread Alex Elder
Rename the variable "area" to be "region" in qcom_smem_get_global(), so its name better matches its type. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/smem.c

[PATCH 01/12] soc: qcom: smem: rename variable in qcom_smem_get_global()

2018-05-01 Thread Alex Elder
Rename the variable "area" to be "region" in qcom_smem_get_global(), so its name better matches its type. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index

[PATCH 02/12] soc: qcom: smem: initialize region struct only when successful

2018-05-01 Thread Alex Elder
Hold off initializing anything for the array entry representing a memory region in qcom_smem_map_memory() until we know we've successfully mapped it. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH 09/12] soc: qcom: smem: verify partition offset_free_uncached

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the offset_free_uncached field in a partition's header structure does not exceed the partition's size. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 21 +++-- 1 file changed, 7 insertions(+), 14

[PATCH 02/12] soc: qcom: smem: initialize region struct only when successful

2018-05-01 Thread Alex Elder
Hold off initializing anything for the array entry representing a memory region in qcom_smem_map_memory() until we know we've successfully mapped it. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH 09/12] soc: qcom: smem: verify partition offset_free_uncached

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the offset_free_uncached field in a partition's header structure does not exceed the partition's size. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff

[PATCH 08/12] soc: qcom: smem: verify partition header size

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the size in a partition's header structure matches the size in its partition table entry. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-)

[PATCH 05/12] soc: qcom: smem: verify both host ids in partition header

2018-05-01 Thread Alex Elder
The global partition is indicated by having both host values in its table of contents entry equal SMEM_GLOBAL_HOST=0xfffe. In qcom_smem_set_global_partition(), we check whether the header structure at the beginning of the partition contains that host value, but the check only verifies *one* of

[PATCH 06/12] soc: qcom: smem: require order of host ids to match

2018-05-01 Thread Alex Elder
In qcom_smem_enumerate_partitions(), we find all partitions that have a given local host id in either its host0 or its host1 field in the partition table entry. We then verify that the header structure at the start of each partition also contains the same two host ids as is found in the table of

[PATCH 08/12] soc: qcom: smem: verify partition header size

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the size in a partition's header structure matches the size in its partition table entry. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git

[PATCH 05/12] soc: qcom: smem: verify both host ids in partition header

2018-05-01 Thread Alex Elder
The global partition is indicated by having both host values in its table of contents entry equal SMEM_GLOBAL_HOST=0xfffe. In qcom_smem_set_global_partition(), we check whether the header structure at the beginning of the partition contains that host value, but the check only verifies *one* of

[PATCH 06/12] soc: qcom: smem: require order of host ids to match

2018-05-01 Thread Alex Elder
In qcom_smem_enumerate_partitions(), we find all partitions that have a given local host id in either its host0 or its host1 field in the partition table entry. We then verify that the header structure at the start of each partition also contains the same two host ids as is found in the table of

[PATCH 07/12] soc: qcom: smem: introduce qcom_smem_partition_header()

2018-05-01 Thread Alex Elder
Create a new function qcom_smem_partition_header() to encapsulate validating the header information found in a partition. This will be built up over a few commits to make it more obvious how the common function is replacing duplicated code elsewhere. Initially it just verifies the header has the

[PATCH 07/12] soc: qcom: smem: introduce qcom_smem_partition_header()

2018-05-01 Thread Alex Elder
Create a new function qcom_smem_partition_header() to encapsulate validating the header information found in a partition. This will be built up over a few commits to make it more obvious how the common function is replacing duplicated code elsewhere. Initially it just verifies the header has the

[PATCH 11/12] soc: qcom: smem: verify partition host ids match

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the host ids found in a partition's header structure match those in its partition table entry. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 34 +++--- 1 file changed, 15 insertions(+),

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Sultan Alsawaf
On Tue, May 01, 2018 at 08:56:04PM -0400, Theodore Y. Ts'o wrote: > On Tue, May 01, 2018 at 05:43:17PM -0700, Sultan Alsawaf wrote: > > > > I've attached what I think is a reasonable stopgap solution until this is > > actually fixed. If you're willing to revert the CVE-2018-1108 patches > >

[PATCH 11/12] soc: qcom: smem: verify partition host ids match

2018-05-01 Thread Alex Elder
Add verification in qcom_smem_partition_header() that the host ids found in a partition's header structure match those in its partition table entry. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-)

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Sultan Alsawaf
On Tue, May 01, 2018 at 08:56:04PM -0400, Theodore Y. Ts'o wrote: > On Tue, May 01, 2018 at 05:43:17PM -0700, Sultan Alsawaf wrote: > > > > I've attached what I think is a reasonable stopgap solution until this is > > actually fixed. If you're willing to revert the CVE-2018-1108 patches > >

[PATCH 10/12] soc: qcom: smem: small change in global entry loop

2018-05-01 Thread Alex Elder
Change the logic in the loop that finds that global host entry in the partition table not require the host0 and host1 local variables. The next patch will remove them. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH 10/12] soc: qcom: smem: small change in global entry loop

2018-05-01 Thread Alex Elder
Change the logic in the loop that finds that global host entry in the partition table not require the host0 and host1 local variables. The next patch will remove them. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 04/12] soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions()

2018-05-01 Thread Alex Elder
Combine the code that checks whether a partition table entry is associated with the local host with the assignment of the remote host id value. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 00/12] soc: qcom: smem: some refactoring

2018-05-01 Thread Alex Elder
This series contains a few general cleanups in the Qualcomm SMEM code, reorganizing some things so memory partitions are treated more consistently, and to avoid some duplication. A few patches change existing behavior, as highlighted below. Each of these changes has been tested and verified to

[PATCH 04/12] soc: qcom: smem: small refactor in qcom_smem_enumerate_partitions()

2018-05-01 Thread Alex Elder
Combine the code that checks whether a partition table entry is associated with the local host with the assignment of the remote host id value. Signed-off-by: Alex Elder --- drivers/soc/qcom/smem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH 00/12] soc: qcom: smem: some refactoring

2018-05-01 Thread Alex Elder
This series contains a few general cleanups in the Qualcomm SMEM code, reorganizing some things so memory partitions are treated more consistently, and to avoid some duplication. A few patches change existing behavior, as highlighted below. Each of these changes has been tested and verified to

[PATCH 03/12] soc: qcom: smem: always ignore partitions with 0 offset or size

2018-05-01 Thread Alex Elder
In qcom_smem_enumerate_partitions(), any partition table entry having a zero offset or size field is ignored. Move those checks earlier in the loop, because there's no sense in examining the host fields for those entries. Add the same checks in qcom_smem_set_global_partition(), so the scan for

[PATCH 03/12] soc: qcom: smem: always ignore partitions with 0 offset or size

2018-05-01 Thread Alex Elder
In qcom_smem_enumerate_partitions(), any partition table entry having a zero offset or size field is ignored. Move those checks earlier in the loop, because there's no sense in examining the host fields for those entries. Add the same checks in qcom_smem_set_global_partition(), so the scan for

[PATCH 12/12] soc: qcom: smem: a few last cleanups

2018-05-01 Thread Alex Elder
This patch contains several small cleanups: - In qcom_smem_enumerate_partitions(), change the "local_host" argument to have 16 bit unsigned type - Also in qcom_smem_enumerate_partitions(), change the type of the "host0" and "host1" local variables to be u16 - Fix error messages

[PATCH 12/12] soc: qcom: smem: a few last cleanups

2018-05-01 Thread Alex Elder
This patch contains several small cleanups: - In qcom_smem_enumerate_partitions(), change the "local_host" argument to have 16 bit unsigned type - Also in qcom_smem_enumerate_partitions(), change the type of the "host0" and "host1" local variables to be u16 - Fix error messages

[PATCH 2/3] Add label and license to genalloc.rst

2018-05-01 Thread Igor Stoppa
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing. Signed-off-by: Igor Stoppa --- Documentation/core-api/genalloc.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/core-api/genalloc.rst

[PATCH 2/3] Add label and license to genalloc.rst

2018-05-01 Thread Igor Stoppa
Add SPDX license to genalloc.rst, then a label, to allow cross-referencing. Signed-off-by: Igor Stoppa --- Documentation/core-api/genalloc.rst | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/core-api/genalloc.rst b/Documentation/core-api/genalloc.rst index

[PATCH 1/3] genalloc: track beginning of allocations

2018-05-01 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit

[PATCH 1/3] genalloc: track beginning of allocations

2018-05-01 Thread Igor Stoppa
The genalloc library is only capable of tracking if a certain unit of allocation is in use or not. It is not capable of discerning where the memory associated to an allocation request begins and where it ends. The reason is that units of allocations are tracked by using a bitmap, where each bit

[PATCH 3/3] genalloc: selftest

2018-05-01 Thread Igor Stoppa
Introduce a set of macros for writing concise test cases for genalloc. The test cases are meant to provide regression testing, when working on new functionality for genalloc. Primarily they are meant to confirm that the various allocation strategy will continue to work as expected. The

[PATCH 3/3] genalloc: selftest

2018-05-01 Thread Igor Stoppa
Introduce a set of macros for writing concise test cases for genalloc. The test cases are meant to provide regression testing, when working on new functionality for genalloc. Primarily they are meant to confirm that the various allocation strategy will continue to work as expected. The

[PATCH 0/3 v2] linux-next: mm: Track genalloc allocations

2018-05-01 Thread Igor Stoppa
This patchset was created as part of an older version of pmalloc, however it has value per-se, as it hardens the memory management for the generic allocator genalloc. Genalloc does not currently track the size of the allocations it hands out. Either by mistake, or due to an attack, it is

[PATCH 0/3 v2] linux-next: mm: Track genalloc allocations

2018-05-01 Thread Igor Stoppa
This patchset was created as part of an older version of pmalloc, however it has value per-se, as it hardens the memory management for the generic allocator genalloc. Genalloc does not currently track the size of the allocations it hands out. Either by mistake, or due to an attack, it is

Re: [PATCH v5 1/3] mmc: dw_mmc-bluefield: Add driver extension

2018-05-01 Thread Shawn Lin
On 2018/5/2 2:19, Liming Sun wrote: This commit adds extension to the dw_mmc driver for Mellanox BlueField SoC. It updates the UHS_REG_EXT register to bring up the eMMC card on this SoC. Cc: sta...@kernel.org Why? Signed-off-by: Liming Sun Reviewed-by: David Woods

Re: [PATCH v5 1/3] mmc: dw_mmc-bluefield: Add driver extension

2018-05-01 Thread Shawn Lin
On 2018/5/2 2:19, Liming Sun wrote: This commit adds extension to the dw_mmc driver for Mellanox BlueField SoC. It updates the UHS_REG_EXT register to bring up the eMMC card on this SoC. Cc: sta...@kernel.org Why? Signed-off-by: Liming Sun Reviewed-by: David Woods ---

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread Linus Torvalds
On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > This option should NOT be enabled on production kernels. I think with your fixes to get_random_bytes_arch(), it's perfectly fine to use on production kernels (and doesn't even need a kernel command line option). It was

Re: [PATCH 3/3] vsprintf: Add use-early-random-bytes cmd line option

2018-05-01 Thread Linus Torvalds
On Tue, May 1, 2018 at 4:34 PM Tobin C. Harding wrote: > This option should NOT be enabled on production kernels. I think with your fixes to get_random_bytes_arch(), it's perfectly fine to use on production kernels (and doesn't even need a kernel command line option). It was only with the

[PATCH] staging: speakup: Add pause command used on switching to graphical mode

2018-05-01 Thread Samuel Thibault
For software speech syntheses to be able to manage concurrent audio card access, they need to know when speakup stops emitting text to be spoken because the console has switched to graphical mode. This introduces a PAUSE command to do so. Signed-off-by: Samuel Thibault

[PATCH] staging: speakup: Add pause command used on switching to graphical mode

2018-05-01 Thread Samuel Thibault
For software speech syntheses to be able to manage concurrent audio card access, they need to know when speakup stops emitting text to be spoken because the console has switched to graphical mode. This introduces a PAUSE command to do so. Signed-off-by: Samuel Thibault Index:

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Theodore Y. Ts'o
On Tue, May 01, 2018 at 05:43:17PM -0700, Sultan Alsawaf wrote: > > I've attached what I think is a reasonable stopgap solution until this is > actually fixed. If you're willing to revert the CVE-2018-1108 patches > completely, then I don't think you'll mind using this patch in the meantime. I

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Theodore Y. Ts'o
On Tue, May 01, 2018 at 05:43:17PM -0700, Sultan Alsawaf wrote: > > I've attached what I think is a reasonable stopgap solution until this is > actually fixed. If you're willing to revert the CVE-2018-1108 patches > completely, then I don't think you'll mind using this patch in the meantime. I

Re: [PATCH v5 4/6] x86/microcode/AMD: Check microcode container data in the late loader

2018-05-01 Thread Maciej S. Szmigiero
On 01.05.2018 22:03, Borislav Petkov wrote: > On Tue, May 01, 2018 at 06:19:56PM +0200, Maciej S. Szmigiero wrote: >> -EINVAL cast to unsigned int is 4294967274 and this value is also >> a valid count of bytes to skip that this function can return. > > And where exactly in the *old* code do we do

Re: [PATCH v5 4/6] x86/microcode/AMD: Check microcode container data in the late loader

2018-05-01 Thread Maciej S. Szmigiero
On 01.05.2018 22:03, Borislav Petkov wrote: > On Tue, May 01, 2018 at 06:19:56PM +0200, Maciej S. Szmigiero wrote: >> -EINVAL cast to unsigned int is 4294967274 and this value is also >> a valid count of bytes to skip that this function can return. > > And where exactly in the *old* code do we do

Re: [PATCH] staging: speakup: Add pause command used on switching to graphical mode

2018-05-01 Thread Samuel Thibault
For software speech syntheses to be able to manage concurrent audio card access, they need to know when speakup stops emitting text to be spoken because the console has switched to graphical mode. This introduces a PAUSE command to do so. Signed-off-by: Samuel Thibault

Re: [PATCH] staging: speakup: Add pause command used on switching to graphical mode

2018-05-01 Thread Samuel Thibault
For software speech syntheses to be able to manage concurrent audio card access, they need to know when speakup stops emitting text to be spoken because the console has switched to graphical mode. This introduces a PAUSE command to do so. Signed-off-by: Samuel Thibault Index:

[v2 PATCH 1/1] tg3: fix meaningless hw_stats reading after tg3_halt memset 0 hw_stats

2018-05-01 Thread Zumeng Chen
From: Zumeng Chen Reading hw_stats will get the actual data after a sucessfull tg3_reset_hw, which actually after tg3_timer_start, so TG3_FLAG_HALT is introduced to tell tg3_get_stats64 when hw_stats is ready to read. It will be set after having done

[v2 PATCH 1/1] tg3: fix meaningless hw_stats reading after tg3_halt memset 0 hw_stats

2018-05-01 Thread Zumeng Chen
From: Zumeng Chen Reading hw_stats will get the actual data after a sucessfull tg3_reset_hw, which actually after tg3_timer_start, so TG3_FLAG_HALT is introduced to tell tg3_get_stats64 when hw_stats is ready to read. It will be set after having done memset(tp->hw_stats, 0) in tg3_halt and be

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Sultan Alsawaf
On Tue, May 01, 2018 at 05:35:56PM -0500, Justin Forbes wrote: > > I have not reproduced in GCE myself. We did get some confirmation > that removing dracut-fips does make the problem less dire (but I > wouldn't call a 4 minute boot a win, but booting in 4 minutes is > better than not booting at

Re: Linux messages full of `random: get_random_u32 called from`

2018-05-01 Thread Sultan Alsawaf
On Tue, May 01, 2018 at 05:35:56PM -0500, Justin Forbes wrote: > > I have not reproduced in GCE myself. We did get some confirmation > that removing dracut-fips does make the problem less dire (but I > wouldn't call a 4 minute boot a win, but booting in 4 minutes is > better than not booting at

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-05-01 Thread Andrew Morton
On Tue, 24 Apr 2018 12:33:01 -0400 (EDT) Mikulas Patocka wrote: > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > On Tue 24-04-18 11:30:40, Mikulas Patocka wrote: > > > > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > > > On Mon 23-04-18 20:25:15,

Re: [PATCH] kvmalloc: always use vmalloc if CONFIG_DEBUG_VM

2018-05-01 Thread Andrew Morton
On Tue, 24 Apr 2018 12:33:01 -0400 (EDT) Mikulas Patocka wrote: > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > On Tue 24-04-18 11:30:40, Mikulas Patocka wrote: > > > > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > > > On Mon 23-04-18 20:25:15, Mikulas Patocka wrote: >

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Theodore Y. Ts'o
On Wed, May 02, 2018 at 09:33:39AM +1000, Tobin C. Harding wrote: > Currently the function get_random_bytes_arch() has return value 'void'. > If the hw RNG fails we currently fall back to using get_random_bytes(). > This defeats the purpose of requesting random material from the hw RNG > in the

Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

2018-05-01 Thread Theodore Y. Ts'o
On Wed, May 02, 2018 at 09:33:39AM +1000, Tobin C. Harding wrote: > Currently the function get_random_bytes_arch() has return value 'void'. > If the hw RNG fails we currently fall back to using get_random_bytes(). > This defeats the purpose of requesting random material from the hw RNG > in the

Re: [PATCH 1/3] random: Fix whitespace pre random-bytes work

2018-05-01 Thread Theodore Y. Ts'o
On Wed, May 02, 2018 at 09:33:38AM +1000, Tobin C. Harding wrote: > There are a couple of whitespace issues around the function > get_random_bytes_arch(). In preparation for patching this function > let's clean them up. > > Signed-off-by: Tobin C. Harding Acked-by: Theodore Ts'o

Re: [PATCH 1/3] random: Fix whitespace pre random-bytes work

2018-05-01 Thread Theodore Y. Ts'o
On Wed, May 02, 2018 at 09:33:38AM +1000, Tobin C. Harding wrote: > There are a couple of whitespace issues around the function > get_random_bytes_arch(). In preparation for patching this function > let's clean them up. > > Signed-off-by: Tobin C. Harding Acked-by: Theodore Ts'o > --- >

Re: [PATCH] tracing/irqtrace: only call trace_hardirqs_on/off when state changes

2018-05-01 Thread Nicholas Piggin
On Tue, 1 May 2018 14:15:14 -0700 Joel Fernandes wrote: > On Tue, May 1, 2018 at 1:00 PM, Steven Rostedt wrote: > > On Tue, 1 May 2018 21:48:38 +0200 > > Peter Zijlstra wrote: > > > >> On Tue, May 01, 2018 at 03:38:40PM

Re: [PATCH] tracing/irqtrace: only call trace_hardirqs_on/off when state changes

2018-05-01 Thread Nicholas Piggin
On Tue, 1 May 2018 14:15:14 -0700 Joel Fernandes wrote: > On Tue, May 1, 2018 at 1:00 PM, Steven Rostedt wrote: > > On Tue, 1 May 2018 21:48:38 +0200 > > Peter Zijlstra wrote: > > > >> On Tue, May 01, 2018 at 03:38:40PM -0400, Steven Rostedt wrote: > >> > On Tue, 1 May 2018 21:19:51 +0200

Re: [PATCH 0/6] use memcpy_mcsafe() for copy_to_iter()

2018-05-01 Thread Linus Torvalds
On Tue, May 1, 2018 at 4:03 PM Dan Williams wrote: > I'm confused. Are you talking about getting rid of the block-layer > bypass or changing how MCS errors are handled? The latter. > If it's the latter, MCS error handling, I don't see how get > around something like

Re: [PATCH 0/6] use memcpy_mcsafe() for copy_to_iter()

2018-05-01 Thread Linus Torvalds
On Tue, May 1, 2018 at 4:03 PM Dan Williams wrote: > I'm confused. Are you talking about getting rid of the block-layer > bypass or changing how MCS errors are handled? The latter. > If it's the latter, MCS error handling, I don't see how get > around something like copy_to_iter_mcsafe(). So

Re: [PATCH 0/2] mm: tweaks for improving use of vmap_area

2018-05-01 Thread Igor Stoppa
On 01/05/18 03:15, Andrew Morton wrote: On Fri, 27 Apr 2018 03:42:41 +0400 Igor Stoppa wrote: These two patches were written in preparation for the creation of protectable memory, however their use is not limited to pmalloc and can improve the use of virtually

Re: [PATCH 0/2] mm: tweaks for improving use of vmap_area

2018-05-01 Thread Igor Stoppa
On 01/05/18 03:15, Andrew Morton wrote: On Fri, 27 Apr 2018 03:42:41 +0400 Igor Stoppa wrote: These two patches were written in preparation for the creation of protectable memory, however their use is not limited to pmalloc and can improve the use of virtually contiguous memory. The first

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