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]
Date:	Wed, 20 Feb 2013 22:47:12 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Tejun Heo <tj@...nel.org>
cc:	akpm@...ux-foundation.org, Sasha Levin <sasha.levin@...cle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] posix-timer: don't call idr_find() w/ negative ID

On Wed, 20 Feb 2013, Tejun Heo wrote:

> Hey, Thomas.
> 
> On Wed, Feb 20, 2013 at 10:38:36PM +0100, Thomas Gleixner wrote:
> > I can grumpily accept the patch below as a quick hack fix, which can
> > go to stable as well, but not with such a patently misleading
> > changelog.
> > 
> > The changelog wants to document, that this is not a proper fix at all
> > and just a quick hack which can be nonintrusively applied to stable.
> 
> I'm not sure about what type timer_t can be but if it can actually be
> u64 as Andrew suggests, we probably want a different test guarding it.
> 
> > > Note that the previous code was theoretically broken.  idr_find()
> > > masked off the sign bit before performing lookup and if the matching
> > > IDs were in use, it would have returned pointer for the incorrect
> > > entry.
> > 
> > Brilliant code that. What's the purpose of having the idr id as an
> > "int" and then masking off the sign bit instead of simply refusing
> > negative id values in the idr code itself or simply making the id
> > "unsigned int" ?
> 
> Beats me.  The code has been like that since the beginning.  One of
> the many oddities of idr implementation.  Patch to remove MAX_IDR_MASK
> is already queued in -mm w/ other idr updates.

Missed that, but good to know that this insanity is going to be gone
soon.

Thanks,

	tglx
--
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