lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150121070246.GB9719@linux.vnet.ibm.com>
Date:	Tue, 20 Jan 2015 23:02:46 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Zhang Zhen <zhenzhang.zhang@...wei.com>
Cc:	Don Zickus <dzickus@...hat.com>, linux-kernel@...r.kernel.org,
	morgan.wang@...wei.com, josh@...edesktop.org, dipankar@...ibm.com
Subject: Re: RCU CPU stall console spews  leads to soft lockup disabled is
 reasonable ?

On Wed, Jan 21, 2015 at 02:54:05PM +0800, Zhang Zhen wrote:
> On 2015/1/21 11:13, Zhang Zhen wrote:
> > On 2015/1/21 10:26, Zhang Zhen wrote:
> >> On 2015/1/20 23:25, Don Zickus wrote:

[ . . . ]

> > Sorry, i made a mistake, the log above is based on v3.10.63.
> > I have tested the latest upstream kernel (based on ec6f34e5b552),
> > but my test case can't triggered RCU stall warning.
> >
> 
> I used git bisect to find the bad commit, but found a irrelevant
> commit(db5d711e2db776 zram: avoid null access when fail to alloc meta).
> Before this commit, my test case can easily trigger RCU stall warning,
> but after this commit, my test case can't trigger RCU stall warning.

I have lost track of exactly what kernel you are using.  If you are
using a recent kernel (v3.18 or thereabouts), one thing to try is to
apply my stack of RCU CPU stall-warning changes that are on their way
in, please see v3.19-rc1..630181c4a915 in -rcu, which is at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git

These handle the problems that Dave Jones and a few others located this
past December.  Could you please give them a spin?

                                                        Thanx, Paul

> I'm totally confused.
> 
> My test case:
> 
> //
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/spinlock.h>
> #include <linux/slab.h>
> #include <linux/kthread.h>
> 
> struct foo {
>         int a;
>         char b;
>         long c;
> };
> 
> struct foo gbl_foo = {1, 'a', 2};
> struct foo *pgbl_foo = &gbl_foo;
> 
> static int my_kthread(void *data)
> {
>         DEFINE_SPINLOCK(foo_mutex);
>         struct foo *new_fp;
>         struct foo *old_fp;
> 
>         new_fp = kmalloc(sizeof(*new_fp), GFP_KERNEL);
>         spin_lock(&foo_mutex);
>         old_fp = pgbl_foo;
>         *new_fp = *old_fp;
>         new_fp->a = 2;
>         rcu_assign_pointer(pgbl_foo, new_fp);
>         spin_unlock(&foo_mutex);
>         synchronize_rcu();
>         kfree(old_fp);
> 
>         return 0;
> }
> 
> static int hello_start(void)
> {
>         struct task_struct *my_task = NULL;
>         DEFINE_SPINLOCK(hello_lock);
> 
>         my_task = kthread_run(my_kthread, NULL, "my_thread%d", 1);
> 
>         spin_lock_init(&hello_lock);
>         spin_lock(&hello_lock);
>         spin_lock(&hello_lock);
>         return 0;
> }
> 
> static int __init test_init(void)
> {
>         hello_start();
> 
>         printk(KERN_INFO "Module init\n");
>         return 0;
> }
> 
> static void __exit test_exit(void)
> {
>         printk(KERN_INFO "Module exit!\n");
> }
> 
> module_init(test_init)
> module_exit(test_exit)
> MODULE_LICENSE("GPL");
> //
> >>>
> >>> Cheers,
> >>> Don
> >>>
> >>> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
> >>> index 70bf118..833c015 100644
> >>> --- a/kernel/watchdog.c
> >>> +++ b/kernel/watchdog.c
> >>> @@ -209,7 +209,7 @@ void touch_nmi_watchdog(void)
> >>>  	 * going off.
> >>>  	 */
> >>>  	raw_cpu_write(watchdog_nmi_touch, true);
> >>> -	touch_softlockup_watchdog();
> >>> +	//touch_softlockup_watchdog();
> >>>  }
> >>>  EXPORT_SYMBOL(touch_nmi_watchdog);
> >>>  
> >>>
> >>> .
> >>>
> >>
> > 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ