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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070928122154.GD25726@osiris.boeblingen.de.ibm.com>
Date:	Fri, 28 Sep 2007 14:21:54 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	lkml <linux-kernel@...r.kernel.org>, linux-arch@...r.kernel.org,
	Zach Brown <zach.brown@...cle.com>,
	Ingo Molnar <mingo@...e.hu>, akpm@...ux-foundation.org
Subject: Re: [PATCH 01/12] lockdep: syscall exit check

On Fri, Sep 28, 2007 at 02:14:11PM +0200, Peter Zijlstra wrote:
> On Fri, 2007-09-28 at 14:03 +0200, Heiko Carstens wrote:
> > > +void lockdep_sys_exit(void)
> > > +{
> > > +	struct task_struct *curr = current;
> > > +
> > > +	if (unlikely(curr->lockdep_depth)) {
> > > +		if (!debug_locks_off())
> > > +			return;
> > > +		printk("\n========================================\n");
> > > +		printk(  "[ BUG: lock held at syscall exit time! ]\n");
> > > +		printk(  "----------------------------------------\n");
> > > +		printk("%s/%d is leaving the kernel with locks still held!\n",
> > > +				curr->comm, curr->pid);
> > > +		lockdep_print_held_locks(curr);
> > > +	}
> > > +}
> > 
> > By the way, the s390 patch I just posted also checks if we hold any locks
> > when returning from interrupt context to user space. Maybe the above text
> > could be changed to "lock held when returning to user space" ?
> 
> Good idea, I'll look at doing the same for i386/x86_64. Traps (page
> faults) would also make sense I guess.

Yes, traps and syscalls have the same exit path on s390. So we do that
alreasy as well.
-
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