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:	Thu, 03 Apr 2014 16:32:24 +0200
From:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Loc Ho <lho@....com>, Kishon Vijay Abraham I <kishon@...com>,
	Greg KH <gregkh@...uxfoundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	USB list <linux-usb@...r.kernel.org>
Subject: Re: [PATCH libata/for-3.15-fixes] libata: drop COMPILE_TEST from
 AHCI_XGENE


Hi,

On Wednesday, April 02, 2014 12:22:15 PM Tejun Heo wrote:
> On Wed, Apr 02, 2014 at 11:53:57AM -0400, Tejun Heo wrote:
> > Applied the following patch to libata/for-3.15-fixes.
> > 
> > Thanks.
> > ------- 8< -------
> > From 9c23f2cf7f6e107e85eef57fdf3049a93b6e157c Mon Sep 17 00:00:00 2001
> > From: Tejun Heo <tj@...nel.org>
> > Date: Wed, 2 Apr 2014 11:47:04 -0400
> > 
> > AHCI_XGENE is only applicable on ARM64 but it can also be enabled for
> > compile testing; however, AHCI_XGENE selects PHY_XGENE which has other
> > arch specific dependencies.  This leads to the following warning when
> > enabling it on other archs for compile testing.
> > 
> >   warning: (AHCI_XGENE) selects PHY_XGENE which has unmet direct
> >   dependencies (HAS_IOMEM && OF && (ARM64 || COMPILE_TEST))
> > 
> > Let's drop COMPILE_TEST from AHCI_XGENE.
> > 
> > Signed-off-by: Tejun Heo <tj@...nel.org>
> > Reported-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Cc: Loc Ho <lho@....com>
> > Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> 
> So, apparently, this isn't enough as this would allow enabling
> PHY_XGENE regardless of HAS_IOMEM or OF.  From kconfig-language.txt,

PHY_XGENE has the following dependencies:

	depends on HAS_IOMEM && OF && (ARM64 || COMPILE_TEST)

So it should be OK.

>    Note:
> 	select should be used with care. select will force
> 	a symbol to a value without visiting the dependencies.
> 	By abusing select you are able to select a symbol FOO even
> 	if FOO depends on BAR that is not set.
> 	In general use select only for non-visible symbols
> 	(no prompts anywhere) and for symbols with no dependencies.
> 	That will limit the usefulness but on the other hand avoid
> 	the illegal configurations all over.
> 
> We can add all the necessary dependencies to AHCI_XGENE but I think
> the the right thing to do is turning it into a proper dependency.

Please note that ARM64 implies that HAS_IOMEM and OF are _always_
selected.  This is the reason why removing "|| COMPILE_TEST" from
AHCI_XGENE dependencies is sufficient to fix the issue (though
I have to admit that relying indirectly on ARM64 selects is a bit
hacky).

> Will prep another patch.

Hmmm, the alternative idea is to remove PHY_XGENE reference from
AHCI_XGENE altogether and add:

	default y if AHCI_XGENE

to PHY_XGENE instead (which seems to be not as hacky as solution
with "select PHY_XGENE" and also more user-friendly than "depends
on PHY_XGENE" one).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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