[RFC PATCH] security: Add a config option to disable security mitigations

2020-06-17 Thread Pranith Kumar
ned-off-by: Pranith Kumar --- kernel/cpu.c | 2 +- security/Kconfig | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 6ff2578ecf17..584eb39585d6 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2542,7 +2542,7 @@ early_param(&q

Re: [PATCH tip/core/rcu 1/2] documentation: Present updated RCU guarantee

2016-11-14 Thread Pranith Kumar
Hi Paul, On Mon, Nov 14, 2016 at 11:47 AM, Paul E. McKenney wrote: > Recent memory-model work deduces the relationships of RCU read-side > critical sections and grace periods based on the relationships of > accesses within a critical section and accesses preceding and following > the grace period

[PATCH] Documentation/RCU: Fix minor typo

2016-10-17 Thread Pranith Kumar
deference should actually be dereference. Signed-off-by: Pranith Kumar --- Documentation/RCU/whatisRCU.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 2044227..5cbd8b2 100644 --- a/Documentation/RCU

[PATCH] scsi: Remove unnecessary comparison

2016-08-10 Thread Pranith Kumar
val is an unsigned int which makes the comparison >=0 unnecessary. This patch removes it. Signed-off-by: Pranith Kumar --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d3e852a..7a919b2 100644 --- a/drivers/s

Re: [PATCH tip/core/rcu 04/12] rcu: Move expedited code from tree.c to tree_exp.h

2016-06-17 Thread Pranith Kumar
Hi Paul, On Wed, Jun 15, 2016 at 5:46 PM, Paul E. McKenney wrote: > People have been having some difficulty finding their way around the > RCU code. This commit therefore pulls some of the expedited grace-period > code from tree.c to a new tree_exp.h file. This commit is strictly code > movemen

Re: [PATCH] kvm: Fix build error caused by redefinition

2016-03-22 Thread Pranith Kumar
Hi Paolo, Paolo Bonzini writes: > > Please test this instead: This patch works for me. Please feel free to add: Tested-by: Pranith Kumar > > diff --git a/arch/powerpc/kvm/Makefile b/arch/powerpc/kvm/Makefile > index 7f7b6d86ac73..eba0bea6e032 100644 > --- a/arch/powerpc/kv

[PATCH] kvm: Fix build error caused by redefinition

2016-03-19 Thread Pranith Kumar
/Makefile.build:258: recipe for target 'arch/powerpc/kvm/../../../virt/kvm/vfio.o' failed make[3]: *** [arch/powerpc/kvm/../../../virt/kvm/vfio.o] Error 1 Fix it by enclosing the definitions within CONFIG_KVM_VFIO Signed-off-by: Pranith Kumar --- virt/kvm/vfio.c | 2 ++ 1 file

Re: [PATCH] init: print warning message if /dev/console failed to open

2016-02-03 Thread Pranith Kumar
Hello Alexander, On Wed, Feb 3, 2016 at 1:58 PM, Alexander Kuleshov wrote: > Signed-off-by: Alexander Kuleshov Please describe the changes in each patch. Why do you need this warning? If you haven't read it yet, please read (esp. Section 2): https://www.kernel.org/doc/Documentation/SubmittingPa

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

2016-01-27 Thread Pranith Kumar
On Tue, Jan 26, 2016 at 12:45 AM, Pranith Kumar wrote: > On Mon, Jan 25, 2016 at 10:13 PM, Michael Ellerman > wrote: >> On Mon, 2016-01-25 at 09:22 -0500, Pranith Kumar wrote: >> >>> In 4.5-rc1, I am getting a build failure as follows: >>> >>> mm

qemu fails to build on 4.5-rc1

2016-01-26 Thread Pranith Kumar
Hi Dave, Commit 334e580a6f97 ("fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion") breaks building latest qemu as follows: In file included from /usr/include/xfs/xfs.h:58:0, from /home/pranith/qemu/block/raw-posix.c:96: /usr/include/xfs/xfs_fs.h:42:8: error: redefiniti

Re: [RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

2016-01-25 Thread Pranith Kumar
On Mon, Jan 25, 2016 at 10:13 PM, Michael Ellerman wrote: > On Mon, 2016-01-25 at 09:22 -0500, Pranith Kumar wrote: > >> In 4.5-rc1, I am getting a build failure as follows: >> >> mm/memory.c: In function ‘do_swap_page’: >> mm/memory.c:2573:9: error: im

[RFC PATCH] PPC32: Fix build failure caused by missing dirty pte handlers

2016-01-25 Thread Pranith Kumar
PPC64 on PPC_BOOK3S in arch/powerpc/include/asm/book3s/64/hash.h and missing in the 32-bit arch. Avoid this error by not setting HAVE_ARCH_SOFT_DIRTY for 32-bit system. Signed-off-by: Pranith Kumar --- arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH] llist: Use for() initializer and conditional

2015-10-29 Thread Pranith Kumar
Simplify the code a bit by using the initializer and conditional check in for() instead of a separate if() statement in the loop. Signed-off-by: Pranith Kumar --- lib/llist.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/llist.c b/lib/llist.c index ae5872b..ddbeebb

[PATCH] llist: Use for conditional in llist_del_first()

2015-10-28 Thread Pranith Kumar
Simplify the code a bit by using the initializer and conditional check in for() instead of a separate if() statement in the loop. Signed-off-by: Pranith Kumar --- lib/llist.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/llist.c b/lib/llist.c index 0b0e977..03d7aad

Re: bindeb-pkg error (was Re: kbuild misc changes for v4.3-rc1 )

2015-10-12 Thread Pranith Kumar
On Mon, Oct 12, 2015 at 1:04 AM, Jim Davis wrote: > On Sun, Oct 11, 2015 at 7:58 PM, Pranith Kumar > wrote: >> >> >> ../linux-firmware-image-4.3.0-rc4_4.3.0-rc4-7_powerpc.deb: No such >> file or directory >> scripts/package/Makefile:97: recipe for

bindeb-pkg error (was Re: kbuild misc changes for v4.3-rc1 )

2015-10-11 Thread Pranith Kumar
Hi Michal, On Tue, Sep 8, 2015 at 11:38 AM, Michal Marek wrote: > Hi Linus, > > these are the non-core kbuild changes for 4.3-rc1: > - deb-pkg: > + module signing fix > + dtb files are added to the package > + do not require `hostname -f` to work during build > + make deb-pkg generates a

[PATCH] doc: Clarify that nmi_watchdog param is for hardlockups

2015-10-10 Thread Pranith Kumar
The kernel NMI watchdog acts as both a hardlockup and softlockup detector. However, the kernel parameter nmi_watchdog can only enable or disable the hardlockup detector. Clarify that in the documentation. Signed-off-by: Pranith Kumar --- Documentation/kernel-parameters.txt | 7 --- 1 file

Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber

2015-10-06 Thread Pranith Kumar
On Tue, Oct 6, 2015 at 4:16 PM, H. Peter Anvin wrote: > > NAK. We already have the "+m" for exactly this reason; adding an > explicit memory clobber should only be used to prevent movement of > *other* memory operations around this one (i.e. a barrier). > OK. If that is so, can you please explai

[PATCH] x86: cmpxchg_double: Add missing memory clobber

2015-10-06 Thread Pranith Kumar
We are reading from memory locations pointed to by p1 and p2 in the asm block. Add a memory clobber flag to make gcc aware of this. Signed-off-by: Pranith Kumar --- arch/x86/include/asm/cmpxchg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm

Re: [RFC 3/5] powerpc: atomic: implement atomic{,64}_{add,sub}_return_* variants

2015-09-02 Thread Pranith Kumar
On Wed, Sep 2, 2015 at 11:23 AM, Pranith Kumar wrote: > Hi Will, > > On 09/02/2015 05:59 AM, Will Deacon wrote: >> I just thought it was worth making this point, because it is prohibited >> in SC and I don't want people to think that our RELEASE/ACQUIRE operations &

Re: [RFC 3/5] powerpc: atomic: implement atomic{,64}_{add,sub}_return_* variants

2015-09-02 Thread Pranith Kumar
Hi Will, On 09/02/2015 05:59 AM, Will Deacon wrote: > I just thought it was worth making this point, because it is prohibited > in SC and I don't want people to think that our RELEASE/ACQUIRE operations > are SC (even though they happen to be on arm64). This is interesting information. Does that

Re: membarrier selftest issue

2015-06-16 Thread Pranith Kumar
Hi Mathieu, On Mon, Jun 15, 2015 at 11:31 AM, Mathieu Desnoyers wrote: > Hi, > > The updated membarrier tree: > https://github.com/compudj/linux-dev > branch: sys-membarrier-volatile > > has an issue building selftests (make -C tools/testing/selftests) > > It appears that including linux/membarri

Re: [PATCH] kernel:signal - Fix for typos in comments.

2015-05-23 Thread Pranith Kumar
On Sat, May 23, 2015 at 1:09 AM, Shailendra Verma wrote: Please include a changelog for every patch you submit exolaining why you think the change makes sense. > > Signed-off-by: Shailendra Verma > --- > kernel/signal.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --g

Re: [PATCH] compiler-intel: fix wrong compiler barrier() macro

2015-04-29 Thread Pranith Kumar
On Wed, Apr 29, 2015 at 12:59 PM, Daniel Borkmann wrote: > On 04/29/2015 06:40 PM, Pranith Kumar wrote: >> >> On Wed, Apr 29, 2015 at 10:59 AM, mancha security >> wrote: >>> >>> >>> The problem is that ICC defines __GNUC__ so barrier() gets defin

Re: [PATCH] compiler-intel: fix wrong compiler barrier() macro

2015-04-29 Thread Pranith Kumar
On Wed, Apr 29, 2015 at 10:59 AM, mancha security wrote: > > The problem is that ICC defines __GNUC__ so barrier() gets defined > in compiler-gcc.h. Your commit removed an #undef from compiler-intel.h > so compiler.h will never define barrier to __memory_barrier(). > OK, I see your point. But, IC

Re: [PATCH] compiler-intel: fix wrong compiler barrier() macro

2015-04-29 Thread Pranith Kumar
Hi Daniel, On Wed, Apr 29, 2015 at 10:42 AM, Daniel Borkmann wrote: > Cleanup commit 23ebdedc67e ("compiler-intel.h: Remove duplicate > definition") removed the double definition of __memory_barrier() > intrinsics. > > However, in doing so, it also removed the preceding #undef barrier, > meaning,

Re: [PATCH v16] sys_membarrier(): system-wide memory barrier (generic, x86)

2015-04-22 Thread Pranith Kumar
On Wed, Apr 22, 2015 at 4:40 PM, Mathieu Desnoyers wrote: > - Original Message - >> On Fri, Apr 17, 2015 at 11:06 AM, Mathieu Desnoyers >> wrote: >> > diff --git a/init/Kconfig b/init/Kconfig >> > index f5dbc6d..89bad6a 100644 >> > --- a/init/Kconfig >> > +++ b/init/Kconfig >> > @@ -1559,

Re: [PATCH v16] sys_membarrier(): system-wide memory barrier (generic, x86)

2015-04-22 Thread Pranith Kumar
On Fri, Apr 17, 2015 at 11:06 AM, Mathieu Desnoyers wrote: > diff --git a/init/Kconfig b/init/Kconfig > index f5dbc6d..89bad6a 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1559,6 +1559,19 @@ config PCI_QUIRKS > bugs/quirks. Disable this only if your target machine is >

Re: [PATCH tip/core/rcu 0/12] RCU Kconfig fixes for v4.2

2015-04-21 Thread Pranith Kumar
RCU_FANOUT behind RCU_EXPERT. > > 11. Change RCU to allow it to tolerate an undefined RCU_FANOUT_LEAF, > and then hide RCU_FANOUT_LEAF behind RCU_EXPERT. > > 12. Change RCU to allow it to tolerate an undefined RCU_KTHREAD_PRIO, > and then hide RCU_KTHREAD_PRIO behi

Re: [PATCH tip/core/rcu 11/12] rcu: Make RCU able to tolerate undefined CONFIG_RCU_FANOUT_LEAF

2015-04-21 Thread Pranith Kumar
On Tue, Apr 21, 2015 at 3:55 PM, Paul E. McKenney wrote: > diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h > index 2e52502bfc95..a2f64e4fdb57 100644 > --- a/kernel/rcu/tree_plugin.h > +++ b/kernel/rcu/tree_plugin.h > @@ -86,10 +86,10 @@ static void __init rcu_bootup_announce_oddn

Re: [PATCH tip/core/rcu 09/12] rcu: Break dependency of RCU_FANOUT_LEAF on RCU_FANOUT

2015-04-21 Thread Pranith Kumar
On Tue, Apr 21, 2015 at 3:55 PM, Paul E. McKenney wrote: > From: "Paul E. McKenney" > > RCU_FANOUT_LEAF's range and default values depend on the value of > RCU_FANOUT, which at the time seemed like a cute way to save two lines > of Kconfig code. However, adding a dependency from both of these >

Re: [PATCH tip/core/rcu 05/12] rcutorture: Update configuration fragments for rcutree.rcu_fanout_exact

2015-04-21 Thread Pranith Kumar
On Tue, Apr 21, 2015 at 3:55 PM, Paul E. McKenney wrote: > From: "Paul E. McKenney" > > This commit updates rcutortures configuration-fragment files to account > for the move from the CONFIG_RCU_FANOUT_EXACT Kconfig parameter to the > new rcutree.rcu_fanout_exact= boot parameter. > > Signed-off-b

[RFC PATCH] rcu: config: Remove prompt for RCU implementation

2015-04-21 Thread Pranith Kumar
The RCU implementation which is chosen is dependent on PREEMPT and SMP config options and is not really a user-selectable choice. The following change will remove the menu entry and will be derived from the above two options. Signed-off-by: Pranith Kumar --- init/Kconfig | 18

Re: [PATCH] rcu: small rcu_dereference doc update

2015-04-17 Thread Pranith Kumar
On Fri, Apr 17, 2015 at 12:15 PM, Paul E. McKenney wrote: > Sounds like a good thought for a separate patch. Please take a look > through the rest of the documentation -- this might well be the right > place for such an example, but there might well be a better place. > Is this issue mentioned in

Re: [PATCH] rcu: small rcu_dereference doc update

2015-04-17 Thread Pranith Kumar
On Fri, Apr 17, 2015 at 6:33 AM, Milos Vyletel wrote: > Make a note stating that repeated calls of rcu_dereference() may not > return the same pointer if update happens while in critical section. Might as well make it more explicit with an example then. See below: > > Reported-by: Jeff Haran >

[PATCH] README: Update references to version 4

2015-03-28 Thread Pranith Kumar
Since we bumped the version to 4.0, let us update the references to match that in the README file. Signed-off-by: Pranith Kumar --- README | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README b/README index a24ec89..dbe9c96 100644

[PATCH] nouveau: gt215: Fix clock freq. calculation

2015-03-17 Thread Pranith Kumar
In commit 6a4a47cfd181 ("drm/nva3/clk: Set PLL refclk") diff was changed from int to u32 because of which a later branch which was testing if (diff < 0) became always false. Fix this by using int type for diff. Signed-off-by: Pranith Kumar CC: sta...@vger.kernel.org CC: Roy Sp

Re: linux panic on 4.0.0-rc4

2015-03-17 Thread Pranith Kumar
On Tue, Mar 17, 2015 at 4:13 PM, Peter Hurley wrote: > On 03/17/2015 04:07 PM, Pranith Kumar wrote: >> On Tue, Mar 17, 2015 at 4:03 PM, Peter Hurley >> wrote: >>> >>> Can you send me a complete dmesg capture from a boot with >>> this commit reverted

Re: linux panic on 4.0.0-rc4

2015-03-17 Thread Pranith Kumar
On Tue, Mar 17, 2015 at 4:03 PM, Peter Hurley wrote: > > Can you send me a complete dmesg capture from a boot with > this commit reverted? > Here it is. Let me know if you want any boot options enabled. I removed both debug and verbose boot options. [0.00] Using PowerMac machine descript

Re: linux panic on 4.0.0-rc4

2015-03-16 Thread Pranith Kumar
On Mon, Mar 16, 2015 at 11:18 PM, Peter Hurley wrote: > On 03/16/2015 11:12 PM, Pranith Kumar wrote: >> On Mon, Mar 16, 2015 at 10:58 PM, Peter Hurley >> wrote: >>>>> What is your init? >>>> >>>> I am using systemd from debian unstable. >

Re: linux panic on 4.0.0-rc4

2015-03-16 Thread Pranith Kumar
On Mon, Mar 16, 2015 at 10:58 PM, Peter Hurley wrote: >>> What is your init? >> >> I am using systemd from debian unstable. > > Do you have a stdout-path property defined in your dts to a serial > console you're not actually using? > I am using tty0 as my console. From the config which I posted,

Re: linux panic on 4.0.0-rc4

2015-03-16 Thread Pranith Kumar
On Mon, Mar 16, 2015 at 7:22 PM, Michael Ellerman wrote: > > The log shows that init is being killed, that's what's causing the panic. > > The exitcode of init is 0x200, which due to the vagaries of UNIX is I think an > "exit status" of 2 in the common usage. > > But it suggests that your init is

Re: linux panic on 4.0.0-rc4

2015-03-16 Thread Pranith Kumar
On Mon, Mar 16, 2015 at 4:16 AM, Michael Ellerman wrote: > On Mon, 2015-03-16 at 01:34 -0400, Pranith Kumar wrote: >> On Mon, Mar 16, 2015 at 1:11 AM, Pranith Kumar wrote: >> > Hello, >> > >> > I have a power mac mini 32-bit system. >> > >>

Re: linux panic on 4.0.0-rc4

2015-03-15 Thread Pranith Kumar
On Mon, Mar 16, 2015 at 1:11 AM, Pranith Kumar wrote: > Hello, > > I have a power mac mini 32-bit system. > ... > You can see the panic message here: http://imgur.com/s1lH15g. (there > is no log and I have no serial console). There was some debug code in there when it hit. The

linux panic on 4.0.0-rc4

2015-03-15 Thread Pranith Kumar
Hello, I have a power mac mini 32-bit system. I am getting a kernel panic with the latest rc kernel. The last kernel which worked on this which I remember booting was 3.19-rc5. You can see the panic message here: http://imgur.com/s1lH15g. (there is no log and I have no serial console). Let me k

[PATCH] audit: Remove condition which always evaluates to false

2015-03-11 Thread Pranith Kumar
always false [-Wtype-limits] if (s.backlog_wait_time < 0 || The following patch removes those unnecessary conditions. Signed-off-by: Pranith Kumar --- kernel/audit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

Re: [RFC PATCH] arm64: cmpxchg.h: Bring ldxr and stxr closer

2015-03-03 Thread Pranith Kumar
On Tue, Mar 3, 2015 at 9:34 AM, Catalin Marinas wrote: > > Do you mean the cmpxchg_double() change? Becuase %w0 and %0 is the same > physical register. You set it to 0 and immediately override it with > ldxp. > Thanks Catalin. I realized the blunder a while after Will pointed it out. The asm here

Re: [RFC PATCH] arm64: cmpxchg.h: Bring ldxr and stxr closer

2015-02-27 Thread Pranith Kumar
On Fri, Feb 27, 2015 at 3:17 PM, Pranith Kumar wrote: > On Fri, Feb 27, 2015 at 3:15 PM, Will Deacon wrote: >>> @@ -166,11 +166,11 @@ static inline int __cmpxchg_double(volatile void >>> *ptr1, volatile void *ptr2, >>> VM_BUG_ON((unsigned long *)ptr

Re: [RFC PATCH] arm64: cmpxchg.h: Bring ldxr and stxr closer

2015-02-27 Thread Pranith Kumar
On Fri, Feb 27, 2015 at 3:15 PM, Will Deacon wrote: > On Fri, Feb 27, 2015 at 08:09:17PM +0000, Pranith Kumar wrote: >> ARM64 documentation recommends keeping exclusive loads and stores as close as >> possible. Any instructions which do not depend on the value loaded should be &

[RFC PATCH] arm64: cmpxchg.h: Bring ldxr and stxr closer

2015-02-27 Thread Pranith Kumar
instruction without any change in functionality. This patch does that change. Signed-off-by: Pranith Kumar --- arch/arm64/include/asm/cmpxchg.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index cb95930

Re: [RFC PATCH] ARM64: cmpxchg.h: Clear the exclusive access bit on fail

2015-02-27 Thread Pranith Kumar
On Fri, Feb 27, 2015 at 2:08 PM, Mark Rutland wrote: > On Fri, Feb 27, 2015 at 06:44:19PM +0000, Pranith Kumar wrote: >> On Fri, Feb 27, 2015 at 1:33 PM, Catalin Marinas >> wrote: >> > It's either badly formatted or I don't get it. Are the "stxr x1"

Re: [RFC PATCH] ARM64: cmpxchg.h: Clear the exclusive access bit on fail

2015-02-27 Thread Pranith Kumar
On Fri, Feb 27, 2015 at 1:33 PM, Catalin Marinas wrote: > It's either badly formatted or I don't get it. Are the "stxr x1" and > "stxr x7" happening on the same CPU (P0)? If yes, that's badly written > code, not even architecturally compliant (you are not allowed other > memory accesses between ld

Re: [RFC PATCH] ARM64: cmpxchg.h: Clear the exclusive access bit on fail

2015-02-27 Thread Pranith Kumar
On Fri, Feb 27, 2015 at 5:06 AM, Will Deacon wrote: > On Fri, Feb 27, 2015 at 05:46:55AM +0000, Pranith Kumar wrote: >> In cmpxchg(), we do a load exclusive on an address and upon a comparison >> fail, >> we skip the store exclusive instruction. This can result in the exclu

[RFC PATCH] ARM64: cmpxchg.h: Clear the exclusive access bit on fail

2015-02-26 Thread Pranith Kumar
need to clear the exclusive bit in these cases. Signed-off-by: Pranith Kumar --- arch/arm64/include/asm/cmpxchg.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index cb95930..ed2cf90 100644 --- a

Re: [RFC PATCH] arm: asm/cmpxchg.h: Add support half-word xchg()

2015-02-25 Thread Pranith Kumar
On Wed, Feb 25, 2015 at 11:21 AM, Arnd Bergmann wrote: >> >> More information: >> [ 45.833303] xchg: bad data size: pc 0xbe806020, ptr 0xeb18deee, size 2 >> [ 45.833324] [ cut here ] >> [ 45.837939] kernel BUG at >> /dvs/git/dirty/git-master_linux/kernel/arch/arm/kern

Re: [RFC PATCH] arm: asm/cmpxchg.h: Add support half-word xchg()

2015-02-25 Thread Pranith Kumar
On Wed, Feb 25, 2015 at 12:14 PM, Russell King - ARM Linux wrote: > Actually, I think we ought to get rid of __bad_xchg() so that cases > like this cause a link error instead of a runtime error, just like we > do in other cases as well. > > That's something that goes back ages (it used to be calle

Re: [RFC PATCH] arm: asm/cmpxchg.h: Add support half-word xchg()

2015-02-25 Thread Pranith Kumar
On Wed, Feb 25, 2015 at 12:02 PM, Russell King - ARM Linux wrote: >> Unfortunately, the BUG message seems incomplete, can you reproduce this >> with CONFIG_DEBUG_BUGVERBOSE enabled? > > That isn't because CONFIG_DEBUG_BUGVERBOSE isn't set. It's because > the message author decided that the remain

Re: [RFC PATCH] arm: asm/cmpxchg.h: Add support half-word xchg()

2015-02-25 Thread Pranith Kumar
On Wed, Feb 25, 2015 at 10:58 AM, Arnd Bergmann wrote: > On Wednesday 25 February 2015 10:36:20 Pranith Kumar wrote: >> This patch adds support for a half-word xchg() for ARM using ldrexh/strexh >> instructions. It also fixes an asm comment for __cmpxchg2. >> >> Curre

[RFC PATCH] arm: asm/cmpxchg.h: Add support half-word xchg()

2015-02-25 Thread Pranith Kumar
[ 45.833324] [ cut here ] [ 45.837939] kernel BUG at /dvs/git/dirty/git-master_linux/kernel/arch/arm/kernel/traps.c:727! Signed-off-by: Pranith Kumar --- arch/arm/include/asm/cmpxchg.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff

Re: [PATCH] llist: Fix missing memory barrier

2015-02-05 Thread Pranith Kumar
Hi Mathieu, On Thu, Feb 5, 2015 at 10:06 PM, Mathieu Desnoyers wrote: > A smp_read_barrier_depends() appears to be missing in llist_del_first(). > It should only matter for Alpha in practice. Adding it after the check > of entry against NULL allows skipping the barrier in a common case. We recen

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-22 Thread Pranith Kumar
On Thu, Jan 22, 2015 at 5:35 PM, Stewart Smith wrote: > Pranith Kumar writes: >> On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman >> wrote: >>> On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote: >>>> When CONFIG_PRINTK=n, log_buf_addr_get() returns NU

Re: [PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-22 Thread Pranith Kumar
On Thu, Jan 22, 2015 at 12:19 AM, Michael Ellerman wrote: > On Wed, 2015-01-21 at 21:26 -0500, Pranith Kumar wrote: >> When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get() >> return 0. Check for these return values and skip registering the dump buffer. >

[PATCH v2 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-21 Thread Pranith Kumar
When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get() return 0. Check for these return values and skip registering the dump buffer. Signed-off-by: Pranith Kumar CC: Michael Ellerman --- arch/powerpc/platforms/powernv/opal.c | 6 ++ 1 file changed, 6 insertions

[PATCH v2 1/2] printk: Add dummy routine for when CONFIG_PRINTK=n

2015-01-21 Thread Pranith Kumar
There are missing dummy routines for log_buf_addr_get() and log_buf_len_get() for when CONFIG_PRINTK is not set causing build failures. This patch adds these dummy routines at the appropriate location. Signed-off-by: Pranith Kumar CC: Michael Ellerman --- include/linux/printk.h | 15

Re: [PATCH 1/2] printk: Add dummy routine for when CONFIG_PRINTK=n

2015-01-21 Thread Pranith Kumar
On Wed, Jan 21, 2015 at 7:58 AM, Petr Mladek wrote: > On Tue 2015-01-20 18:51:49, Pranith Kumar wrote: >> There are missing dummy routines for log_buf_addr_get() and log_buf_len_get() >> for when CONFIG_PRINTK is not set causing build failures. >> >> This patch adds

[PATCH 2/2] powerpc/powernv: Skip registering log region when CONFIG_PRINTK=n

2015-01-20 Thread Pranith Kumar
When CONFIG_PRINTK=n, log_buf_addr_get() returns NULL and log_buf_len_get() return 0. Check for these return values and skip registering the dump buffer. Signed-off-by: Pranith Kumar CC: Michael Ellerman --- arch/powerpc/platforms/powernv/opal.c | 6 ++ 1 file changed, 6 insertions

[PATCH 1/2] printk: Add dummy routine for when CONFIG_PRINTK=n

2015-01-20 Thread Pranith Kumar
There are missing dummy routines for log_buf_addr_get() and log_buf_len_get() for when CONFIG_PRINTK is not set causing build failures. This patch adds these dummy routines at the appropriate location. Signed-off-by: Pranith Kumar CC: Michael Ellerman --- include/linux/printk.h | 15

Re: [PATCH v2] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-30 Thread Pranith Kumar
On Tue, Dec 30, 2014 at 1:50 PM, Peter Zijlstra wrote: > On Tue, Dec 30, 2014 at 12:46:22AM -0500, Pranith Kumar wrote: >> Isolate the SRCU functions and data structures within CONFIG_SRCU so that >> there >> is a compile time failure if srcu is used when not enabled. Th

Re: [PATCH] powerpc/powernv: Select CONFIG_PRINTK to fix build failure

2014-12-29 Thread Pranith Kumar
On Mon, Dec 29, 2014 at 4:01 AM, Michael Ellerman wrote: > On Sat, 2014-12-27 at 12:17 -0500, Pranith Kumar wrote: >> In an allnoconfig we get the following build failure: > > An allnoconfig doesn't include CONFIG_PPC_POWERNV? But I think I know what you > mean. > >&

[PATCH] assoc_array: Include rcupdate.h for call_rcu() definition

2014-12-29 Thread Pranith Kumar
explicitly. Signed-off-by: Pranith Kumar Reported-by: Scott Wood --- lib/assoc_array.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/assoc_array.c b/lib/assoc_array.c index 2404d03..03dd576 100644 --- a/lib/assoc_array.c +++ b/lib/assoc_array.c @@ -11,6 +11,7 @@ * 2 of the Licence

[PATCH v2] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-29 Thread Pranith Kumar
. Signed-off-by: Pranith Kumar CC: Scott Wood --- v2: - fix build failures reported by Scott Wood arch/powerpc/kernel/setup_64.c | 7 ++- arch/powerpc/kernel/smp.c | 9 +++- arch/s390/kernel/asm-offsets.c | 7 ++- include/linux/notifier.h | 47

Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-29 Thread Pranith Kumar
On Mon, Dec 29, 2014 at 6:05 PM, Scott Wood wrote: > On Sat, 2014-12-27 at 12:17 -0500, Pranith Kumar wrote: >> Isolate the SRCU functions and data structures within CONFIG_SRCU so that >> there >> is a compile time failure if srcu is used when not enabled. This was decide

Re: [PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-29 Thread Pranith Kumar
On Mon, Dec 29, 2014 at 5:03 AM, Martin Schwidefsky wrote: > On Sat, 27 Dec 2014 12:17:43 -0500 > Pranith Kumar wrote: > >> @@ -65,10 +65,13 @@ >> #include >> #include >> #include >> -#include >> #include >> #include >>

Re: linux-next: build failure after merge of the rcu tree

2014-12-27 Thread Pranith Kumar
On Sat, Dec 27, 2014 at 11:24 AM, Pranith Kumar wrote: > On Fri, Dec 26, 2014 at 11:54 AM, Paul E. McKenney wrote: >> Pranith, if Stephen has CONFIG_KVM=n, it might be best to move the >> "select SRCU" to "config PPC" in arch/powerpc/Kconfig. Are you able >&

[PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-27 Thread Pranith Kumar
. Signed-off-by: Pranith Kumar --- arch/powerpc/kernel/setup_64.c | 7 ++- arch/s390/kernel/asm-offsets.c | 7 ++- include/linux/notifier.h | 47 -- include/linux/srcu.h | 6 +- 4 files changed, 44 insertions(+), 23 deletions

[PATCH] powerpc/powernv: Select CONFIG_PRINTK to fix build failure

2014-12-27 Thread Pranith Kumar
_get' make: *** [vmlinux] Error 1 This happens because powernv requires printk() support. Enable it in the config file. Signed-off-by: Pranith Kumar --- arch/powerpc/platforms/powernv/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/pl

Re: linux-next: build failure after merge of the rcu tree

2014-12-27 Thread Pranith Kumar
On Fri, Dec 26, 2014 at 11:54 AM, Paul E. McKenney wrote: > Pranith, if Stephen has CONFIG_KVM=n, it might be best to move the > "select SRCU" to "config PPC" in arch/powerpc/Kconfig. Are you able > to cross-build powerpc? > ppc 32 seems fine without selecting srcu unconditionally. So I added thi

[PATCH 1/1] powerpc: Wire up sys_execveat() syscall

2014-12-21 Thread Pranith Kumar
ecveat(8, 'execveat', 0) with ENOTDIR... [OK] Invoke copy of 'execveat' via filename of length 4093: Check success of execveat(19, '', 4096)... [OK] Check success of execveat(5, '...', 0)... [OK] Invoke copy of 'script&#x

Re: [PATCH] powerpc: Wire up sys_execveat() syscall

2014-12-21 Thread Pranith Kumar
On Sun, Dec 21, 2014 at 4:56 AM, Stephen Rothwell wrote: > Hi Pranith, > > On Sat, 20 Dec 2014 11:47:18 -0500 Pranith Kumar > wrote: >> >> Wire up sys_execveat(). This passes the selftests for the system call. > > Thanks for this, but ... > >> diff --

[PATCH] powerpc: Wire up sys_execveat() syscall

2014-12-20 Thread Pranith Kumar
ecveat(8, 'execveat', 0) with ENOTDIR... [OK] Invoke copy of 'execveat' via filename of length 4093: Check success of execveat(19, '', 4096)... [OK] Check success of execveat(5, '...', 0)... [OK] Invoke copy of 'script&#x

Re: linux-next: build failure after merge of the rcu tree

2014-12-10 Thread Pranith Kumar
On 12/10/2014 03:09 AM, Stephen Rothwell wrote: > Hi Paul, > > After merging the rcu tree, today's linux-next build (powerpc64 > allnoconfig) failed like this: > > In file included from arch/powerpc/include/asm/kvm_ppc.h:30:0, > from arch/powerpc/kernel/setup_64.c:68: > include/l

[PATCH v2] smpboot: Check for successfull allocation of cpumask vars

2014-12-09 Thread Pranith Kumar
zalloc_cpumask_var() can return 0 on allocation failure when CONFIG_CPUMASK_OFFSTACK is set. Check for the return value and warn on failure of an allocation in such cases. Also remove the cpus from cpu masks so that they are not accessed later on. Signed-off-by: Pranith Kumar --- arch/x86

Re: [RFC PATCH] smpboot: Check for successfull allocation of cpumask vars

2014-12-09 Thread Pranith Kumar
On Tue, Dec 9, 2014 at 3:10 PM, Thomas Gleixner wrote: > On Tue, 9 Dec 2014, Pranith Kumar wrote: >> zalloc_cpumask_var() can return 0 on allocation failure when >> CONFIG_CPUMASK_OFFSTACK is set. Check for the return value and WARN() on >> failure >> of an allocation

[PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-09 Thread Pranith Kumar
. This prevents build failures as KVM is dependent on SRCU. Signed-off-by: Pranith Kumar CC: Paul E. McKenney CC: Josh Triplett CC: Lai Jiangshan Signed-off-by: Paul E. McKenney --- arch/s390/kernel/asm-offsets.c | 7 ++- include/linux/notifier.h | 47

[RFC PATCH] smpboot: Check for successfull allocation of cpumask vars

2014-12-09 Thread Pranith Kumar
zalloc_cpumask_var() can return 0 on allocation failure when CONFIG_CPUMASK_OFFSTACK is set. Check for the return value and WARN() on failure of an allocation in such cases. Signed-off-by: Pranith Kumar --- arch/x86/kernel/smpboot.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

[PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-09 Thread Pranith Kumar
. This prevents build failures as KVM is dependent on SRCU. Signed-off-by: Pranith Kumar Acked-by: Christian Borntraeger [for s390 parts] CC: Josh Triplett CC: Lai Jiangshan CC: Paul E. McKenney --- arch/s390/kernel/asm-offsets.c | 7 ++- include/linux/notifier.h | 47

Re: [PATCH] s390: Include kvm_host.h header only if KVM is enabled

2014-12-08 Thread Pranith Kumar
On Mon, Dec 8, 2014 at 6:59 PM, Paul E. McKenney wrote: > On Mon, Dec 08, 2014 at 03:24:35PM -0500, Pranith Kumar wrote: >> KVM uses srcu structures because of which CONFIG_KVM selects CONFIG_SRCU. In >> asm-offsets.c, we are including kvm_host.h unconditionally even though >&

[PATCH] s390: Include kvm_host.h header only if KVM is enabled

2014-12-08 Thread Pranith Kumar
m_host.h conditionally on CONFIG_KVM. Signed-off-by: Pranith Kumar --- arch/s390/kernel/asm-offsets.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index ef279a1..055334d 100644 --- a/arch/s390/kerne

[PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-08 Thread Pranith Kumar
Isolate the SRCU functions and data structures within CONFIG_SRCU so that there is a compile time failure if srcu is used when not enabled. This was decided to be better than waiting until link time for a failure to occur. Signed-off-by: Pranith Kumar CC: Paul E. McKenney CC: Josh Triplett CC

[PATCH] srcu: Isolate srcu sections using CONFIG_SRCU

2014-12-08 Thread Pranith Kumar
Isolate the SRCU functions and data structures within CONFIG_SRCU so that there is a compile time failure if srcu is used when not enabled. This was decided to be better than waiting until link time for a failure to occur. Signed-off-by: Pranith Kumar CC: Paul E. McKenney CC: Josh Triplett CC

Re: [PATCH] tinification: Make SRCU optional by using CONFIG_SRCU

2014-12-04 Thread Pranith Kumar
On Thu, Dec 4, 2014 at 9:05 PM, Lai Jiangshan wrote: > On 12/05/2014 08:11 AM, Paul E. McKenney wrote: >> On Thu, Dec 04, 2014 at 06:50:24PM -0500, Pranith Kumar wrote: >>> SRCU is not necessary to be compiled by default in all cases. For >>> tinification >>&g

[PATCH] tinification: Make SRCU optional by using CONFIG_SRCU

2014-12-04 Thread Pranith Kumar
831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before 829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after so the savings are about ~2000 bytes. Signed-off-by: Pranith Kumar CC: Paul McKenney CC: Josh Triplett --- arch/arm/kvm/Kconfig | 1 + arch/arm64

Re: [RFC PATCH v2] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-04 Thread Pranith Kumar
(resending, forgot CC's) On Thu, Dec 4, 2014 at 11:13 AM, Josh Triplett wrote: >> >> The current tinyconfig on x86 enables SRCU by default since x86 enables >> PERF_EVENTS which in-turn require SRCU support. If we disable >> PERF_EVENTS, we can disable compiling SRCU for tiny configs on x86 syste

Re: [RFC PATCH v2] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-04 Thread Pranith Kumar
On 12/04/2014 01:27 AM, Paul E. McKenney wrote: > For the moment, I applied this to -rcu against v3.18-rc6 to get some 0day > testing on it. > > There are conflicts against the tip of my tree, but will worry about > that later. I don't have a ready answer on whether or not this needs > to be spli

[RFC PATCH v2] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-03 Thread Pranith Kumar
tested this using randconfig and building about 15 kernels. This is definitely not complete and could use more testing. Sticking it in next might help in that regards. Comments and suggestions are welcome. Please let me know if I should split up this patch. Signed-off-by: Pranith Kumar CC: Paul

Re: [RFC PATCH] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-03 Thread Pranith Kumar
On Wed, Dec 3, 2014 at 8:54 PM, Pranith Kumar wrote: > (CC list restricted since this is just for initial feedback) > > SRCU is not necessary to be compiled by default in all cases. For tinification > efforts not compiling SRCU unless necessary is desirable. > > The current p

[RFC PATCH] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-03 Thread Pranith Kumar
tested this using randconfig and building about 15 kernels. This is definitely not complete and could use more testing. Sticking it in next might help in that regards. Comments and suggestions are welcome. Please let me know if I should split up this patch. Signed-off-by: Pranith Kumar CC: Paul

[RFC PATCH] tinification: Introduce CONFIG_SRCU to make SRCU optional

2014-12-03 Thread Pranith Kumar
tested this using randconfig and building about 15 kernels. This is definitely not complete and could use more testing. Sticking it in next might help in that regards. Comments and suggestions are welcome. Please let me know if I should split up this patch. Signed-off-by: Pranith Kumar CC: Paul

Re: [RFC PATCH] set_mb: Use smp_store_release() instead of set_mb()

2014-11-30 Thread Pranith Kumar
On Wed, Nov 26, 2014 at 11:57 AM, Pranith Kumar wrote: > set_mb() and smp_store_release() perform the same function. Also there are > only > a few users of set_mb(). We can convert these users to use smp_store_release() > and delete the set_mb() definition. > > The following

Re: [PATCH 3/3] btrfs: refactor btrfs_device->name updates

2014-11-30 Thread Pranith Kumar
On Sun, Nov 30, 2014 at 3:26 AM, Omar Sandoval wrote: > The rcu_string API introduced some new sparse errors but also revealed > existing > ones. First of all, the name in struct btrfs_device should be annotated as > __rcu to prevent unsafe reads. Additionally, updates should go through > rcu_der

  1   2   3   4   5   >