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, 11 Jul 2013 12:08:58 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:	Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
	Matt Wilson <msw@...zon.com>,
	Michael Opdenacker <michael.opdenacker@...e-electrons.com>,
	jeremy@...p.org, xen-devel@...ts.xensource.com, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	virtualization@...ts.linux-foundation.org, mingo@...hat.com,
	tglx@...utronix.de
Subject: Re: [Xen-devel] [PATCH] xen: remove unused Kconfig parameter

On Mon, 2013-07-08 at 20:26 -0400, Konrad Rzeszutek Wilk wrote:
> Could you explain to me please why the check in the scripts is
> superfluous?

The discussion has since moved on a bit, but I haven't answered this
question yet.

The check grub2 currently performs in one of its configuration scripts
is (reformatted):
    if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null ||
        grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null);
    then echo -n "$i " ;
    fi

But the Kconfig entry for XEN_PRIVILEGED_GUEST reads: 
    # Dummy symbol since people have come to rely on the PRIVILEGED_GUEST
    # name in tools.
    config XEN_PRIVILEGED_GUEST
            def_bool XEN_DOM0

In other words: CONFIG_XEN_PRIVILEGED_GUEST should always be equal to
CONFIG_XEN_DOM0. So the two grep commands should always both evaluate to
true or both evaluate to false. One of these two commands can safely be
dropped.

Another consequence is that dropping XEN_PRIVILEGED_GUEST doesn't break
this configuration script. It will still behave as it does now.

(Whether that script should grep for Kconfig macros in the first place
is another discussion.)


Paul Bolle

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