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, 26 Nov 2015 01:37:51 +0100
From:	"PaX Team" <pageexec@...email.hu>
To:	linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>
CC:	Kees Cook <keescook@...omium.org>,
	Andy Lutomirski <luto@...capital.net>,
	"H. Peter Anvin" <hpa@...or.com>,
	Michael Ellerman <mpe@...erman.id.au>,
	Mathias Krause <minipli@...glemail.com>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
	Arnd Bergmann <arnd@...db.de>,
	Emese Revfy <re.emese@...il.com>,
	kernel-hardening@...ts.openwall.com,
	linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH v2 1/4] init: create cmdline param to disable readonly

On 25 Nov 2015 at 15:31, Kees Cook wrote:

> +	rodata=		[KNL]
> +		on	Mark read-only kernel memory as read-only (default).
> +		off	Leave read-only kernel memory writable for debugging.
> +

> +#ifdef CONFIG_DEBUG_RODATA
> +bool disable_mark_readonly;

__initdata?

> +static int __init set_debug_rodata(char *str)
> +{
> +	if (!str)
> +		return -EINVAL;
> +	if (!strncmp(str, "on", 2))
> +		disable_mark_readonly = false;
> +	else if (!strncmp(str, "off", 3))
> +		disable_mark_readonly = true;

maybe it's just me but the double negatives make my head spin,
perhaps call it enable_rodata instead (so that the variable name
isn't so disconnected from the option name)?

> +
> +	return 0;
> +}
> +__setup("rodata=", set_debug_rodata);
> +
> +static void mark_readonly(void)
> +{
> +	if (disable_mark_readonly)
> +		pr_info("Kernel read-only memory marking disabled.\n");
> +	else
> +		mark_rodata_ro();
> +}


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