From nobody Tue Apr 7 13:28:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF607C4332F for ; Thu, 10 Nov 2022 13:09:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230310AbiKJNJq (ORCPT ); Thu, 10 Nov 2022 08:09:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbiKJNJj (ORCPT ); Thu, 10 Nov 2022 08:09:39 -0500 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0278212AA2 for ; Thu, 10 Nov 2022 05:09:37 -0800 (PST) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id 8DCEC419E9E9; Thu, 10 Nov 2022 13:09:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 8DCEC419E9E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1668085775; bh=LhB34PvVQmEmAHSgcIjFt8cb9vXQe9ZNmveaYWGCLFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JotLW5cTg/KfF0EyW60fIU3JsvmBWiXWZVTRPATEISShL6URLYSSH6Eh3DAyoKR3B fN9uT9GOp4ooNWOW/EJrjdQsIiqsim/sE+pYDRYdb/z/7ow2L2EvYvJ1C4/IpAQ6Kq UwATpAahCAdspwlzdZhwjjWFQ+rIVUvjomPsZnL4= From: Evgeniy Baskov To: Borislav Petkov Cc: Evgeniy Baskov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Alexey Khoroshilov Subject: [PATCH v8 1/5] x86/boot: Add strlcat() and strscpy() to compressed kernel Date: Thu, 10 Nov 2022 16:09:29 +0300 Message-Id: X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" These functions simplify the code of command line concatenation helper and reduce the probability of mistakes. Use simpler implementation of strscpy than used in it kernel itself to avoid code bloat in compressed kernel. Signed-off-by: Evgeniy Baskov --- arch/x86/boot/compressed/string.c | 50 +++++++++++++++++++++++++++++++ arch/x86/purgatory/purgatory.c | 1 + 2 files changed, 51 insertions(+) diff --git a/arch/x86/boot/compressed/string.c b/arch/x86/boot/compressed/s= tring.c index 81fc1eaa3229..5c193fa0a09b 100644 --- a/arch/x86/boot/compressed/string.c +++ b/arch/x86/boot/compressed/string.c @@ -40,6 +40,56 @@ static void *____memcpy(void *dest, const void *src, siz= e_t n) } #endif =20 +size_t strlcat(char *dest, const char *src, size_t count) +{ + size_t dsize =3D strlen(dest); + size_t len =3D strlen(src); + size_t res =3D dsize + len; + + /* This would be a bug */ + if (dsize >=3D count) + error("strlcat(): destination too big\n"); + + dest +=3D dsize; + count -=3D dsize; + if (len >=3D count) + len =3D count-1; + memcpy(dest, src, len); + dest[len] =3D 0; + return res; +} + +/* Don't include word-at-a-time code path in compressed kernel for simplic= ity */ +size_t strscpy(char *dest, const char *src, size_t count) +{ + long res =3D 0; + + if (count =3D=3D 0) + return -E2BIG; + + if (count > INT_MAX) { + warn("strscpy(): Count is too big"); + return -E2BIG; + } + + while (count) { + char c; + + c =3D src[res]; + dest[res] =3D c; + if (!c) + return res; + res++; + count--; + } + + /* Hit buffer length without finding a NUL; force NUL-termination. */ + if (res) + dest[res-1] =3D '\0'; + + return -E2BIG; +} + void *memset(void *s, int c, size_t n) { int i; diff --git a/arch/x86/purgatory/purgatory.c b/arch/x86/purgatory/purgatory.c index 7558139920f8..65f0cedb65ae 100644 --- a/arch/x86/purgatory/purgatory.c +++ b/arch/x86/purgatory/purgatory.c @@ -57,3 +57,4 @@ void purgatory(void) * arch/x86/boot/compressed/string.c */ void warn(const char *msg) {} +void error(char *m) {} --=20 2.37.4 From nobody Tue Apr 7 13:28:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25D50C433FE for ; Thu, 10 Nov 2022 13:09:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbiKJNJm (ORCPT ); Thu, 10 Nov 2022 08:09:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbiKJNJj (ORCPT ); Thu, 10 Nov 2022 08:09:39 -0500 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02108DEA7 for ; Thu, 10 Nov 2022 05:09:37 -0800 (PST) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id B2F12400CBDC; Thu, 10 Nov 2022 13:09:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru B2F12400CBDC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1668085775; bh=6OlZriUDEchZQUeQ2XzXlu3cfcV0g8cSmETlWS2PYDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BMMzJMwJ6/GWHOaIHVHdezI4S7X5VjnVFWu/SquSMh4+1dWK3VU5LHyM9/fOlhtYU 9Ehq40EffgfYY16qzn6W8wxcmJLuwSzam3XjoIYfG1Rh+MGl1mKW1w2XTeF231JGY2 gdFeXndLQRZdw1gLIeBzlD4YBoRDQ3B6X73ZIp7I= From: Evgeniy Baskov To: Borislav Petkov Cc: Evgeniy Baskov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Alexey Khoroshilov Subject: [PATCH v8 2/5] x86: Add cmdline_prepare() helper Date: Thu, 10 Nov 2022 16:09:30 +0300 Message-Id: X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Command line needs to be combined in both compressed and uncompressed kernel from built-in and boot command line strings, which requires non-trivial logic depending on CONFIG_CMDLINE_BOOL and CONFIG_CMDLINE_OVERRIDE. Add a helper function to avoid code duplication. Signed-off-by: Evgeniy Baskov --- arch/x86/include/asm/shared/cmdline.h | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 arch/x86/include/asm/shared/cmdline.h diff --git a/arch/x86/include/asm/shared/cmdline.h b/arch/x86/include/asm/s= hared/cmdline.h new file mode 100644 index 000000000000..01736d66028d --- /dev/null +++ b/arch/x86/include/asm/shared/cmdline.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _ASM_X86_SETUP_CMDLINE_H +#define _ASM_X86_SETUP_CMDLINE_H + +#define _SETUP +#include /* For COMMAND_LINE_SIZE */ +#undef _SETUP + +#include + +#ifdef CONFIG_CMDLINE_BOOL +#define BUILTIN_COMMAND_LINE CONFIG_CMDLINE +#else +#define BUILTIN_COMMAND_LINE "" +#endif + +static inline void cmdline_prepare(char *dst, const char *boot_command_lin= e) +{ + if (!IS_ENABLED(CONFIG_CMDLINE_BOOL)) { + strscpy(dst, boot_command_line, COMMAND_LINE_SIZE); + } else { + strscpy(dst, BUILTIN_COMMAND_LINE, COMMAND_LINE_SIZE); + /* + * Append boot loader cmdline to builtin, if it exists + * and should not be overriden. + */ + if (!IS_ENABLED(CONFIG_CMDLINE_OVERRIDE) && boot_command_line[0]) { + strlcat(dst, " ", COMMAND_LINE_SIZE); + strlcat(dst, boot_command_line, COMMAND_LINE_SIZE); + } + } +} + +#endif /* _ASM_X86_SETUP_CMDLINE_H */ --=20 2.37.4 From nobody Tue Apr 7 13:28:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53276C433FE for ; Thu, 10 Nov 2022 13:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbiKJNJy (ORCPT ); Thu, 10 Nov 2022 08:09:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiKJNJj (ORCPT ); Thu, 10 Nov 2022 08:09:39 -0500 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 024A710FCE for ; Thu, 10 Nov 2022 05:09:37 -0800 (PST) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id EC73E40737B7; Thu, 10 Nov 2022 13:09:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru EC73E40737B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1668085776; bh=IMZzqDsGqe80LCdtrLJ2hWF1Y/2kWqXMkN9RKfL+9hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AtC3FqEayeP++jRNm0DOfsflkG9yKFxgY7kxZXP5Vsfa04ihWpLyzL3oarSwkGdCm SSCH8fxSb9/D+yVyySJIxiiB7Rh+znkLG3fa/lY/epl6gaDnJ8pAqpU7Qd5Tcgy8Op +q7rcqoCc5cyOo0bwOCIOQGkzQoKO7Q7jnTpNWfY= From: Evgeniy Baskov To: Borislav Petkov Cc: Evgeniy Baskov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Alexey Khoroshilov Subject: [PATCH v8 3/5] x86/setup: Use cmdline_prepare() in setup.c Date: Thu, 10 Nov 2022 16:09:31 +0300 Message-Id: X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use a common helper function for command line resolving in arch/x86/kernel/setup.c for code unification. Signed-off-by: Evgeniy Baskov --- arch/x86/kernel/setup.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index aacaa96f0195..f23a49f62b71 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -168,9 +169,6 @@ unsigned long saved_video_mode; #define RAMDISK_LOAD_FLAG 0x4000 =20 static char __initdata command_line[COMMAND_LINE_SIZE]; -#ifdef CONFIG_CMDLINE_BOOL -static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] =3D CONFIG_CMDLI= NE; -#endif =20 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) struct edd edd; @@ -970,20 +968,8 @@ void __init setup_arch(char **cmdline_p) bss_resource.start =3D __pa_symbol(__bss_start); bss_resource.end =3D __pa_symbol(__bss_stop)-1; =20 -#ifdef CONFIG_CMDLINE_BOOL -#ifdef CONFIG_CMDLINE_OVERRIDE - strscpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); -#else - if (builtin_cmdline[0]) { - /* append boot loader cmdline to builtin */ - strlcat(builtin_cmdline, " ", COMMAND_LINE_SIZE); - strlcat(builtin_cmdline, boot_command_line, COMMAND_LINE_SIZE); - strscpy(boot_command_line, builtin_cmdline, COMMAND_LINE_SIZE); - } -#endif -#endif - - strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE); + cmdline_prepare(command_line, boot_command_line); + strscpy(boot_command_line, command_line, COMMAND_LINE_SIZE); *cmdline_p =3D command_line; =20 /* --=20 2.37.4 From nobody Tue Apr 7 13:28:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBE75C4332F for ; Thu, 10 Nov 2022 13:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbiKJNJv (ORCPT ); Thu, 10 Nov 2022 08:09:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbiKJNJj (ORCPT ); Thu, 10 Nov 2022 08:09:39 -0500 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0264C12A89 for ; Thu, 10 Nov 2022 05:09:37 -0800 (PST) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id 1B85D40737BB; Thu, 10 Nov 2022 13:09:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 1B85D40737BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1668085776; bh=8C0m+nikY+hKoEP6Ez5Q8u9vl0RUFjErqLyUvRmpH6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZYwUalCb2nXd9lnjaqKwRXntRhcitVOzWlSmiJzHB5wCOn6y7U4B/c9YUkVuH7zxT BpA2vKgZurcsqZQK1gvVBNh/lFmv3JdwFnD+BtfGm7IU5kiAVH2pswTXc2ROiOl6u6 3EthC7c8acYuGdY1iKyQrGrl1vAfutJ2lPdA2QkE= From: Evgeniy Baskov To: Borislav Petkov Cc: Evgeniy Baskov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Alexey Khoroshilov Subject: [PATCH v8 4/5] x86/boot: Use cmdline_prapare() in compressed kernel Date: Thu, 10 Nov 2022 16:09:32 +0300 Message-Id: <290b33437bc94c32fce2e13c0599eab5e1cc3132.1668082601.git.baskov@ispras.ru> X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" CONFIG_CMDLINE_BOOL and CONFIG_CMDLINE_OVERRIDE were ignored during options lookup in compressed kernel, including earlyprintk option, so it was impossible to get earlyprintk messages from that stage of boot process via command line provided at compile time. Being able to enable earlyprintk via compile-time option might be desirable for booting on systems with broken UEFI command line arguments via EFISTUB. Use a common helper function to handle CONFIG_CMDLINE_* in compressed kernel. Place command_line_init explicitly in '.data' section since it is used before '.bss' section is zeroed and it is expected to be equal to zero. Signed-off-by: Evgeniy Baskov --- arch/x86/boot/compressed/cmdline.c | 24 ++++++++++++++++++++++-- arch/x86/boot/compressed/misc.h | 1 + 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/cmdline.c b/arch/x86/boot/compressed/= cmdline.c index f1add5d85da9..53ad259ee441 100644 --- a/arch/x86/boot/compressed/cmdline.c +++ b/arch/x86/boot/compressed/cmdline.c @@ -12,6 +12,15 @@ static inline char rdfs8(addr_t addr) return *((char *)(fs + addr)); } #include "../cmdline.c" + +static char command_line[COMMAND_LINE_SIZE] __section(".data"); +static bool command_line_init __section(".data"); + +/* + * This always returns runtime command line and does not account for built= -in + * command line, so this should not be used for cmdline parsing. + * Use get_cmdline() instead. + */ unsigned long get_cmd_line_ptr(void) { unsigned long cmd_line_ptr =3D boot_params->hdr.cmd_line_ptr; @@ -20,11 +29,22 @@ unsigned long get_cmd_line_ptr(void) =20 return cmd_line_ptr; } + +static inline unsigned long get_cmdline(void) +{ + if (!command_line_init) { + cmdline_prepare(command_line, (char *)get_cmd_line_ptr()); + command_line_init =3D 1; + } + + return (unsigned long)command_line; +} + int cmdline_find_option(const char *option, char *buffer, int bufsize) { - return __cmdline_find_option(get_cmd_line_ptr(), option, buffer, bufsize); + return __cmdline_find_option(get_cmdline(), option, buffer, bufsize); } int cmdline_find_option_bool(const char *option) { - return __cmdline_find_option_bool(get_cmd_line_ptr(), option); + return __cmdline_find_option_bool(get_cmdline(), option); } diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/mis= c.h index 62208ec04ca4..5bf1357c054c 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -26,6 +26,7 @@ #include #include #include +#include =20 #include "tdx.h" =20 --=20 2.37.4 From nobody Tue Apr 7 13:28:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 804C2C4332F for ; Thu, 10 Nov 2022 13:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbiKJNJ6 (ORCPT ); Thu, 10 Nov 2022 08:09:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230258AbiKJNJl (ORCPT ); Thu, 10 Nov 2022 08:09:41 -0500 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14C14D2CC for ; Thu, 10 Nov 2022 05:09:41 -0800 (PST) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id 426FB40737BD; Thu, 10 Nov 2022 13:09:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 426FB40737BD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1668085776; bh=N1WZT1IJDM73ZsyG84S81mPHKV67S3tkyKPRC/z42gw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iiLSxfjXO8lmJK0aHfC+1TUkc9KawXGuDJILvzbimNPJr10M6/Ub56ctVwTJ+rVeB urQqsyF7Uk17UufFw4hxrZmx9vmCP27todN0ywfZReWjUQ/MYc+8u9QN3Ksr8O9vic lWLtW8JBp9q0BOVupxMyC0DWrET5WtqDU7xIKrqg= From: Evgeniy Baskov To: Borislav Petkov Cc: Evgeniy Baskov , Dave Hansen , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, Alexey Khoroshilov Subject: [PATCH v8 5/5] x86/boot: Remove no longer needed includes Date: Thu, 10 Nov 2022 16:09:33 +0300 Message-Id: <52749526f69c73902eaf608f4b544b5060e6e6d9.1668082601.git.baskov@ispras.ru> X-Mailer: git-send-email 2.37.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" x86/incldue/asm/shared/cmdline.h header already provides COMMAND_LINE_SIZE definition. Signed-off-by: Evgeniy Baskov --- arch/x86/boot/compressed/ident_map_64.c | 4 ---- arch/x86/boot/compressed/kaslr.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/arch/x86/boot/compressed/ident_map_64.c b/arch/x86/boot/compre= ssed/ident_map_64.c index d4a314cc50d6..fdfe0e5f5cb0 100644 --- a/arch/x86/boot/compressed/ident_map_64.c +++ b/arch/x86/boot/compressed/ident_map_64.c @@ -33,10 +33,6 @@ #define __PAGE_OFFSET __PAGE_OFFSET_BASE #include "../../mm/ident_map.c" =20 -#define _SETUP -#include /* For COMMAND_LINE_SIZE */ -#undef _SETUP - extern unsigned long get_cmd_line_ptr(void); =20 /* Used by PAGE_KERN* macros: */ diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/ka= slr.c index e476bcbd9b42..b73a4d45f8d7 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -32,10 +32,6 @@ #include #include =20 -#define _SETUP -#include /* For COMMAND_LINE_SIZE */ -#undef _SETUP - extern unsigned long get_cmd_line_ptr(void); =20 /* Simplified build-specific string for starting entropy. */ --=20 2.37.4