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] [day] [month] [year] [list]
Message-Id: <20101217155531.89efe13f.akpm@linux-foundation.org>
Date:	Fri, 17 Dec 2010 15:55:31 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Baruch Siach <baruch@...s.co.il>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] delay.h: add __must_check to msleep_interruptible

On Fri, 17 Dec 2010 15:49:47 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Thu,  4 Nov 2010 10:55:41 +0200
> Baruch Siach <baruch@...s.co.il> wrote:
> 
> > Code calling msleep_interruptible() must be aware that sleep time might be
> > shorter than intended as a result of a signal being caught. Code not checking
> > the return value of msleep_interruptible() is probably buggy, unless it's doing
> > the signal_pending() check itself, which is redundant.
> > 
> 
> True.  But there are around 250 callsites which don't check the
> msleep_interruptible() return value.

One quick way of fixing this would be to add

/*
 * Used by callsites which are supposed to be calling msleep_interruptible(),
 * but which were failing to properly handle msleep_interruptible()'s return
 * value
 */
static inline void msleep_you_suck_fixme_please(unsigned int msecs)
{
	msleep(msecs);
}

and then patch all the offending msleep_interruptible() callsites to
use msleep_you_suck_fixme_please().  Then add the __must_check to
msleep_interruptible().

And note that 250 msleep_interruptible() -> msleep() changes will
probably fix lots of bugs.
--
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