From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965577AbcAUQVF (ORCPT ); Thu, 21 Jan 2016 11:21:05 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:33070 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965204AbcAUQU7 (ORCPT ); Thu, 21 Jan 2016 11:20:59 -0500 Date: Thu, 21 Jan 2016 16:20:56 +0000 From: Matt Fleming To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com, will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, leif.lindholm@linaro.org, keescook@chromium.org, linux-kernel@vger.kernel.org, stuart.yoder@freescale.com, bhupesh.sharma@freescale.com, arnd@arndb.de, marc.zyngier@arm.com, christoffer.dall@linaro.org Subject: Re: [PATCH v3 20/21] efi: stub: use high allocation for converted command line Message-ID: <20160121162056.GG2510@codeblueprint.co.uk> References: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Jan, at 02:19:14PM, Ard Biesheuvel wrote: > Before we can move the command line processing before the allocation > of the kernel, which is required for detecting the 'nokaslr' option > which controls that allocation, move the converted command line higher > up in memory, to prevent it from interfering with the kernel itself. > > Since x86 needs the address to fit in 32 bits, use UINT_MAX as the upper > bound there. Otherwise, use ULONG_MAX (i.e., no limit) > > Cc: Matt Fleming > Signed-off-by: Ard Biesheuvel > --- > arch/x86/include/asm/efi.h | 2 ++ > drivers/firmware/efi/libstub/efi-stub-helper.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 1 deletion(-) Reviewed-by: Matt Fleming From mboxrd@z Thu Jan 1 00:00:00 1970 From: matt@codeblueprint.co.uk (Matt Fleming) Date: Thu, 21 Jan 2016 16:20:56 +0000 Subject: [PATCH v3 20/21] efi: stub: use high allocation for converted command line In-Reply-To: <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> References: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> Message-ID: <20160121162056.GG2510@codeblueprint.co.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, 11 Jan, at 02:19:14PM, Ard Biesheuvel wrote: > Before we can move the command line processing before the allocation > of the kernel, which is required for detecting the 'nokaslr' option > which controls that allocation, move the converted command line higher > up in memory, to prevent it from interfering with the kernel itself. > > Since x86 needs the address to fit in 32 bits, use UINT_MAX as the upper > bound there. Otherwise, use ULONG_MAX (i.e., no limit) > > Cc: Matt Fleming > Signed-off-by: Ard Biesheuvel > --- > arch/x86/include/asm/efi.h | 2 ++ > drivers/firmware/efi/libstub/efi-stub-helper.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 1 deletion(-) Reviewed-by: Matt Fleming From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Date: Thu, 21 Jan 2016 16:20:56 +0000 From: Matt Fleming Message-ID: <20160121162056.GG2510@codeblueprint.co.uk> References: <1452518355-4606-1-git-send-email-ard.biesheuvel@linaro.org> <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452518355-4606-22-git-send-email-ard.biesheuvel@linaro.org> Subject: [kernel-hardening] Re: [PATCH v3 20/21] efi: stub: use high allocation for converted command line To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, kernel-hardening@lists.openwall.com, will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, leif.lindholm@linaro.org, keescook@chromium.org, linux-kernel@vger.kernel.org, stuart.yoder@freescale.com, bhupesh.sharma@freescale.com, arnd@arndb.de, marc.zyngier@arm.com, christoffer.dall@linaro.org List-ID: On Mon, 11 Jan, at 02:19:14PM, Ard Biesheuvel wrote: > Before we can move the command line processing before the allocation > of the kernel, which is required for detecting the 'nokaslr' option > which controls that allocation, move the converted command line higher > up in memory, to prevent it from interfering with the kernel itself. > > Since x86 needs the address to fit in 32 bits, use UINT_MAX as the upper > bound there. Otherwise, use ULONG_MAX (i.e., no limit) > > Cc: Matt Fleming > Signed-off-by: Ard Biesheuvel > --- > arch/x86/include/asm/efi.h | 2 ++ > drivers/firmware/efi/libstub/efi-stub-helper.c | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 1 deletion(-) Reviewed-by: Matt Fleming