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: <55AF8FF6.3080901@arm.com>
Date:	Wed, 22 Jul 2015 13:43:34 +0100
From:	Marc Zyngier <marc.zyngier@....com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	"hanjun.guo@...aro.org" <hanjun.guo@...aro.org>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Jason Cooper <jason@...edaemon.net>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	Tomasz Nowicki <tomasz.nowicki@...aro.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"suravee.suthikulpanit@....com" <suravee.suthikulpanit@....com>
Subject: Re: [PATCH 1/5] genirq: irqdomain: Use an accessor for the of_node
 field

On 22/07/15 08:58, Thomas Gleixner wrote:
> On Wed, 22 Jul 2015, Marc Zyngier wrote:
>>
>> Looks like my coccinelle foo is still lacking a bit... Oh well.
> 
> Please post your semantic patch and don't forget to Cc Julia Lawall :)
> 

Bah, found the problem. My semantic patch is extremely simple:

@init@
struct irq_domain *ptr;
position pos;
@@

(
ptr@...->of_node
)


@ script:python @
p1 << init.pos;
@@

for p in p1:
    print "%s:%s" % (p.file,p.line)

as I'm just grepping through the tree (I don't feel confident enough to
do the patching, and some cases are a bit more complicated).

But I forgot to add arch/$ARCH/include/asm as an include search path for
spatch. That had the side effect of spatch being unable to identify
constructs like:

arch/$ARCH/include/asm/foo.h:

	struct foo {
		struct irq_domain *bar;
	};

arch/$ARCH/.../foo.c:

	struct foo foo;
	if (foo->bar->of_node) { ... }

Since spatch knows nothing about struct foo, it cannot identify bar as a
struct irq_domain, hence missing this occurrence.

Once I fixed the include path, I found an additional couple of victims.
I really love this thing! :-)

	M.
-- 
Jazz is not dead. It just smells funny...
--
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