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: <CA+1xoqf3z5w8R92OksA8KO1nu30r8gdoYOJR9W+gAgi7hZTDPg@mail.gmail.com>
Date:	Sat, 14 Apr 2012 20:37:01 +0200
From:	Sasha Levin <levinsasha928@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org List" <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...hat.com>, mingo@...nel.org,
	"Liu, Chuansheng" <chuansheng.liu@...el.com>, vapier@...too.org,
	rusty@...tcorp.com.au
Subject: Re: sched: WARNING: at include/linux/cpumask.h:108 select_fallback_rq+0x241/0x280()

On Sat, Apr 14, 2012 at 8:12 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Sat, 2012-04-14 at 13:40 +0200, Sasha Levin wrote:
>> On Sat, Apr 14, 2012 at 11:17 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>> > On Sat, 2012-03-31 at 13:22 +0530, Srivatsa S. Bhat wrote:
>> >>
>> >> One of the perils of using macros instead of true function calls :-(
>> >>
>> > You can do type checking in macros too, its not pretty, but there's
>> > several such things already, see min()/max() for example.
>>
>> Would it make sense to somehow standardize type checking in kernel
>> macros? Possibly a set of wrappers that would make type checking easy
>> to get into new and existing macros?
>
>
> I had a quick go with the below and that doesn't quite work for no
> obvious reasons as of yet.. Also, that call out to cpumask_next() should
> already do type validation for us, so still no clue why my earlier code
> compiled at all.

I've also started working on it, I have something that looks pretty
good and detects the bug which has caused this discussion.

I want to apply it on several more macros around the kernel and I'll
send a RFC. Basically I want to deal with the cpumask thing, update
min()/max()/etc to use it and convert the list or rbtree macros to use
it as well. It'll give us a good look on how something like that would
look around the kernel.
--
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