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]
Date:	Mon, 25 Apr 2016 12:04:53 +0100 (BST)
From:	Stefano Stabellini <sstabellini@...nel.org>
To:	Will Deacon <will.deacon@....com>
cc:	Stefano Stabellini <sstabellini@...nel.org>,
	linux-arm-kernel@...ts.infradead.org, mark.rutland@....com,
	catalin.marinas@....com, shannon.zhao@...aro.org,
	linux-kernel@...r.kernel.org, peter.huangpeng@...wei.com
Subject: Re: [PATCH] make dt_scan_depth1_nodes more readable

On Mon, 25 Apr 2016, Will Deacon wrote:
> On Mon, Apr 25, 2016 at 11:25:11AM +0100, Stefano Stabellini wrote:
> > From: Mark Rutland <mark.rutland@....com>
> > 
> > Improve the readability of dt_scan_depth1_nodes by removing the nested
> > conditionals.
> > 
> > Signed-off-by: Mark Rutland <mark.rutland@....com>
> > Signed-off-by: Stefano Stabellini <sstabellini@...nel.org>
> > 
> > ---
> > 
> > Note: this patch is based on xentip/for-linus-4.7
> 
> So how should I merge it? :/

I think that if you would like to merge it, it would be easier this time
for me to carry it in my tree. Otherwise you would have to base your
for-linus-4.7 on xentip/for-linus-4.7 and send the pull request after
the Xen pull request -- undesirable.


> > 
> > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
> > index 57ee317..6884c76 100644
> > --- a/arch/arm64/kernel/acpi.c
> > +++ b/arch/arm64/kernel/acpi.c
> > @@ -66,17 +66,24 @@ static int __init dt_scan_depth1_nodes(unsigned long node,
> >  				       void *data)
> >  {
> >  	/*
> > -	 * Return 1 as soon as we encounter a node at depth 1 that is
> > -	 * not the /chosen node, or /hypervisor node with compatible
> > -	 * string "xen,xen".
> > +	 * Ignore anything not directly under the root node; we'll
> > +	 * catch its parent instead.
> >  	 */
> > -	if (depth == 1 && (strcmp(uname, "chosen") != 0)) {
> > -		if (strcmp(uname, "hypervisor") != 0 ||
> > -		    !of_flat_dt_is_compatible(node, "xen,xen"))
> > -			return 1;
> > -	}
> > +	if (depth != 1)
> > +		return 0;
> >  
> > -	return 0;
> > +	if (strcmp(uname, "chosen") == 0)
> > +		return 0;
> > +
> > +	if (strcmp(uname, "hypervisor") == 0 &&
> > +	    of_flat_dt_is_compatible(node, "xen,xen"))
> > +		return 0;
> > +
> > +	/*
> > +	 * This node at depth 1 is neither a chosen node nor a xen node,
> > +	 * which we do not expect.
> > +	 */
> > +	return 1;
> >  }
> >  
> >  /*
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ