From patchwork Wed Jul 4 15:49:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 141074 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp951305ljj; Wed, 4 Jul 2018 08:49:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdfXcc8L2uK4qtYI2RzNgpXfpFvud1PuRKTaNg/yIl4MpppFQ8yT6QlOjIfqOm3zcNswubN X-Received: by 2002:a62:c991:: with SMTP id l17-v6mr2746521pfk.10.1530719367519; Wed, 04 Jul 2018 08:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530719367; cv=none; d=google.com; s=arc-20160816; b=OFmOuuD7mKSJh/yusihYKUjo3kcTsTXkROj8I5Vb8SbXTe2LkvovcVNsL2oyVPX7z+ FnuKGK4cDcMBLVYrsdxP0Rpx0tFrNaeDRDaOYDMcNJC06doqJWkMP1m1VWFhhZ/iigdc deBgiqQNjZ7nanzbSXWT5pKhzpaUUUmwmzkX+6TxaSB0hOYkLDANDEtXF+SD5ilxILDI RgkoRUeLnPdMdQcVoJ+GQhoPAMozgFuh8Adf177ujEGGxRDVtVpbLnikxUhGICl4DoCf ZWW9nVq2+onc+fLyE7rg64/BttFRsLcmh7Iyyucndye1sWgZltPJkP4XGPxvkpuImhn3 ipnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=tMBaRrzWcmcS/JmS5cBs9+4NhsDirAEl/HfvmdDQLpY=; b=M9aaVyT7F7812TTk8WO7g44VdMXRSY5BnQi1QA2cVYgdI38mj/ofdwIxMeBcFvuNgE I0Z/Ay9Jf4e0etvNel/Htdjp4Qp6HZTCW+7kpqvRMmu2QLokSpCj08iLW5HSbY9l4I+x Jm94d8ZANF12IxlpgpLzaq5LcVG1rufYv0Jk4J9+XTYNGXLK8Oisv0i+/UbylI/U5UbJ FguLf6w9rklkEVIgUNcXyScP1p6ZxujT65ic2rX+rahX2j3Br9HYEeFzOjPopo+tUpyt WJWKiPw9CV3fjmsxoMjDP5/8X5v98YC96ev8rqeV5pr6qxIjMQq8bL/m/A8xjG5XSMGK sAkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gtZ0OV3B; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si3746846plz.479.2018.07.04.08.49.27; Wed, 04 Jul 2018 08:49:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gtZ0OV3B; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752571AbeGDPt0 (ORCPT + 3 others); Wed, 4 Jul 2018 11:49:26 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44276 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbeGDPtZ (ORCPT ); Wed, 4 Jul 2018 11:49:25 -0400 Received: by mail-ed1-f65.google.com with SMTP id f12-v6so4351205edq.11 for ; Wed, 04 Jul 2018 08:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nh3Vqe3ZbN0PBJNN8uz18IspA2Go6Mdwe33u4rdyQo4=; b=gtZ0OV3Bg3X8hXrvxiqXjeyI1KC6wCL0uCwLajP90sEt+yu5EIAqC2moRqQvjJGOXg VSj94hcE/6VSFP2HP2bYM4wD6SM7wOaHgMYe+DR8F1MCGHKnJodRas2o2c2z0+chQdv4 KskP3ncD096JlyANaE5/nQr0Trddno8DuGqV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nh3Vqe3ZbN0PBJNN8uz18IspA2Go6Mdwe33u4rdyQo4=; b=Y4x+Ua46G0Ku/UF1KoXEDPxnCZb/cZEJQnoFAQUBw4tWXL/C/lVgqhfMN0Pd2SEjso PnStTYty0qzyyT9F+ERDTrsZTshQC1lc1Y9lVA7GEXfY148Gn7SOhbyPodLNjr83+O47 k+v5itqFQR24HS0E0MiFxmlRSJo8B69NP6Jv0bVqsW7am9PGWf0O+2tUomhyrB1Q77+8 PgkCQ7GNtLuepfgLa53Odxn9kCfVnLIPWiqyW5fPn/3K1+0lcguXx8f01GSo/nIv8wZx J6+VSGSvJBxyh8bzSDIkyymZXIgIKK2VaNaz1h6BJUkXNiyPRVrxZWwm/skvFw5XqB80 mgWQ== X-Gm-Message-State: APt69E2kERSYbCLmeOGqWxkizR8ayz87AYnChjebvvmrTt0zgmxiwsc0 NoVRN6wD/5TOJ4D8N8lq1cvQEYAsKVE= X-Received: by 2002:aa7:d9d7:: with SMTP id v23-v6mr3301784eds.300.1530719364312; Wed, 04 Jul 2018 08:49:24 -0700 (PDT) Received: from ards-mac-mini.arnhem.chello.nl (dhcp-077-251-017-237.chello.nl. [77.251.17.237]) by smtp.gmail.com with ESMTPSA id l61-v6sm1966954edl.96.2018.07.04.08.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jul 2018 08:49:23 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-acpi@vger.kernel.org, leif.lindholm@linaro.org, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Mark Salter , Geoff Levand , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Riku Voipio , James Morse , Ian Campbell Subject: [RFC PATCH 1/2] efi/libstub: refactor load option command line processing for reuse Date: Wed, 4 Jul 2018 17:49:18 +0200 Message-Id: <20180704154919.18564-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180704154919.18564-1-ard.biesheuvel@linaro.org> References: <20180704154919.18564-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org As a preparatory step towards adding support for extra kernel command line arguments passed via a UEFI variable, do a slight refactor of the existing code so we can extend it more cleanly in a subsequent patch. No change is functionality is intended. Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/efi-stub-helper.c | 43 ++++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index 50a9cab5a834..97a2423782af 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -726,6 +726,22 @@ static int efi_utf8_bytes(u16 c) return 1 + (c >= 0x80) + (c >= 0x800); } +/* + * Get an upper bound for the number of UTF-8 bytes corresponding + * to a \n or \0 terminated UTF-16 string. + */ +static int count_utf8_bytes(const u16 *s, int max_chars, int *num_chars) +{ + int ret = 0; + + while (*s != '\0' && *s != '\n' && --max_chars >= 0) { + ret += efi_utf8_bytes(*s++); + ++*num_chars; + } + + return ret; +} + /* * Convert an UTF-16 string, not necessarily null terminated, to UTF-8. */ @@ -779,44 +795,35 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, efi_loaded_image_t *image, int *cmd_line_len) { - const u16 *s2; - u8 *s1 = NULL; + u8 *s1; unsigned long cmdline_addr = 0; int load_options_chars = image->load_options_size / 2; /* UTF-16 */ const u16 *options = image->load_options; - int options_bytes = 0; /* UTF-8 bytes */ + int cmd_line_bytes = 0; /* UTF-8 bytes */ int options_chars = 0; /* UTF-16 chars */ efi_status_t status; u16 zero = 0; - if (options) { - s2 = options; - while (*s2 && *s2 != '\n' - && options_chars < load_options_chars) { - options_bytes += efi_utf8_bytes(*s2++); - options_chars++; - } - } + if (options) + cmd_line_bytes = count_utf8_bytes(options, load_options_chars, + &options_chars); if (!options_chars) { /* No command line options, so return empty string*/ options = &zero; } - options_bytes++; /* NUL termination */ + cmd_line_bytes++; /* NUL termination */ - status = efi_high_alloc(sys_table_arg, options_bytes, 0, + status = efi_high_alloc(sys_table_arg, cmd_line_bytes, 0, &cmdline_addr, MAX_CMDLINE_ADDRESS); if (status != EFI_SUCCESS) return NULL; - s1 = (u8 *)cmdline_addr; - s2 = (const u16 *)options; - - s1 = efi_utf16_to_utf8(s1, s2, options_chars); + s1 = efi_utf16_to_utf8((u8 *)cmdline_addr, options, options_chars); *s1 = '\0'; - *cmd_line_len = options_bytes; + *cmd_line_len = cmd_line_bytes; return (char *)cmdline_addr; } From patchwork Wed Jul 4 15:49:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 141075 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp951341ljj; Wed, 4 Jul 2018 08:49:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdISmhbQgt5eZnev5UFZ4TgDhZwnyfpjCE6QmL2WO9xyBbPn6EcqPOMtWu5E2UOsgYQQkf+ X-Received: by 2002:a62:2ec1:: with SMTP id u184-v6mr2769538pfu.184.1530719369154; Wed, 04 Jul 2018 08:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530719369; cv=none; d=google.com; s=arc-20160816; b=MNBhvi13SjYu8Cgr1vGXjnN1KW+/Fr8JVeXmrUSa83tGdJlt4XYKOX1GgVlcs+311V heYHf7ereKZNke1KzKPxI9e9gA4QpdH/782PnBM3FSaWbBG1osY2eXhut6THsMz3Wnus yGzJDyGJbAwtyr4BC74fAHyRWXBvee+OKOHaa5kEOiI4y3S6WmChPUAdJvLUzDzE3a06 y5lI9hFJ9PYFsZ4d4NmiNb0u++ae5IRRKuECZiEi3mJgcQeg21iuHQh3ilSgsm6eFDrR wC2ZENH47xThkzJj3vp16gdCk3HWHsy0xOYJBaE9X5USoN3BtkGxXcPMkzc+YKhzQgGe 87jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gA3xR3GdKOkpQMNKuYYGwARiPDxzsy89ZFVAVa0yi8Q=; b=shO/7rWqYOUGCZR4binos/O7NlhIhuMHbatL4x4NECniAb/sO0oyvxlKLDzufBU2kW gOmQaMkETAvn4TIWH35efs/ZgERl60jd8DujSqWJnagtL1SBD32/xoBnO7jEQb0dKQke UE96c4mVpAYzNMhOQfJDQV7mca4KGHNHdd6noIlVlUMcdRCIvFZMk34JCv3vLh6QXwo7 wkU1QcD0pcG15CHotiiy42bFCrOZGsZxU/kr1Zoku079RXacr8iPVJv1v7ZHtVBmlu7b fOYrKtE/czEquWrCgc+7hjmgZVLrjDP+7Pda7Xpp6vEKVgbDAfZ0ORAw4dfj8qi7BQvC UGsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DpbE6zkH; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si3746846plz.479.2018.07.04.08.49.28; Wed, 04 Jul 2018 08:49:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DpbE6zkH; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbeGDPt2 (ORCPT + 3 others); Wed, 4 Jul 2018 11:49:28 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34500 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbeGDPt1 (ORCPT ); Wed, 4 Jul 2018 11:49:27 -0400 Received: by mail-ed1-f66.google.com with SMTP id d3-v6so4372078edi.1 for ; Wed, 04 Jul 2018 08:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=64T+khMvPYCSc0LkwmPl3whpa/BzeGLlPQrPkqAiBPk=; b=DpbE6zkHu73tGW2xQmaPlobB14zMLuQUA1Rz9f5O1wgO6YWPTSVyxIH59/4I1jH8ab aEtA73GupHB2h1dbZTdMditJ2TBysD03aafz/LKTQgwj8kvKYs3qhAaU/WeImxVItSmg MrhbGXX0kij7pghV/6RibtWdqD4wxGt97EFmY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=64T+khMvPYCSc0LkwmPl3whpa/BzeGLlPQrPkqAiBPk=; b=GzOySq2ZBjfHy+Q0qsaR6/W892LR7blwVCQj7e9BRS701XxUo5j/4LXQG+dUfeSDPW WonYIAF7o4qaQYjhMr+u8ChKUwcEx+840ttoq/mj5BszFDSlFQ7oyRrimcvwIOkFOhmj fOcaK8OIonQzWi/n0vkEfDbO0uk7YUQIjE1q15yEO0ON92WmT1C4/5KmWeRvw7kTw00I 6oKtanGX1vavu3bI6lF2iJgb259iL8tAWMvbqk+zgn8tB2YzMU6EIeC0WrA0+sPHaOKY KewGur830ioSqWCWCRC6mQKffOqoiv7AdloPySO+Jhiwy3zLrKTCTYro9aF+JEXMdsQY 6aSQ== X-Gm-Message-State: APt69E2BpyRmUoa+Kwj5k/q7W9SvVi0Gs39AKTI+qtV6fwq6PclUnq4w bRafxBPTMrIm7pSGkopg6yho0R4vFes= X-Received: by 2002:a50:8266:: with SMTP id 93-v6mr3281588edf.269.1530719365603; Wed, 04 Jul 2018 08:49:25 -0700 (PDT) Received: from ards-mac-mini.arnhem.chello.nl (dhcp-077-251-017-237.chello.nl. [77.251.17.237]) by smtp.gmail.com with ESMTPSA id l61-v6sm1966954edl.96.2018.07.04.08.49.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Jul 2018 08:49:24 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: linux-acpi@vger.kernel.org, leif.lindholm@linaro.org, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Mark Salter , Geoff Levand , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Riku Voipio , James Morse , Ian Campbell Subject: [RFC PATCH 2/2] efi/libstub: taken contents of LinuxExtraArgs UEFI variable into account Date: Wed, 4 Jul 2018 17:49:19 +0200 Message-Id: <20180704154919.18564-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180704154919.18564-1-ard.biesheuvel@linaro.org> References: <20180704154919.18564-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org In order to allow UEFI platforms to persistently configure Linux kernel options without relying on the contents of the EFI System Partition (ESP) or other block devices, implement support for passing extra kernel command line arguments via the LinuxExtraArgs UEFI variable. Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/efi-stub-helper.c | 51 ++++++++++++++++++++ include/linux/efi.h | 1 + 2 files changed, 52 insertions(+) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index 97a2423782af..49a3b03b9f1f 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -35,6 +35,9 @@ static unsigned long __chunk_size = EFI_READ_CHUNK_SIZE; static int __section(.data) __nokaslr; static int __section(.data) __quiet; +static const efi_guid_t linux_args_guid = LINUX_EFI_EXTRA_ARGS_GUID; +static const efi_char16_t linux_args_name[] = L"LinuxExtraArgs"; + int __pure nokaslr(void) { return __nokaslr; @@ -786,6 +789,33 @@ static u8 *efi_utf16_to_utf8(u8 *dst, const u16 *src, int n) #define MAX_CMDLINE_ADDRESS ULONG_MAX #endif +static u16 *get_extra_args(efi_system_table_t *sys_table_arg, + unsigned long *extra_args_size) +{ + u16 *extra_args; + efi_status_t status; + + *extra_args_size = 0; + status = efi_call_runtime(get_variable, (efi_char16_t *)linux_args_name, + (efi_guid_t *)&linux_args_guid, NULL, + extra_args_size, NULL); + if (status != EFI_BUFFER_TOO_SMALL) + return NULL; + + status = efi_call_early(allocate_pool, EFI_LOADER_DATA, + *extra_args_size, (void **)&extra_args); + if (status != EFI_SUCCESS) + return NULL; + + status = efi_call_runtime(get_variable, (efi_char16_t *)linux_args_name, + (efi_guid_t *)&linux_args_guid, NULL, + extra_args_size, extra_args); + if (status != EFI_SUCCESS) + return NULL; + + return extra_args; +} + /* * Convert the unicode UEFI command line to ASCII to pass to kernel. * Size of memory allocated return in *cmd_line_len. @@ -799,9 +829,12 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, unsigned long cmdline_addr = 0; int load_options_chars = image->load_options_size / 2; /* UTF-16 */ const u16 *options = image->load_options; + u16 *extra_args; int cmd_line_bytes = 0; /* UTF-8 bytes */ int options_chars = 0; /* UTF-16 chars */ + int extra_args_chars = 0; /* UTF-16 chars */ efi_status_t status; + unsigned long extra_args_size; u16 zero = 0; if (options) @@ -813,6 +846,19 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, options = &zero; } + extra_args = get_extra_args(sys_table_arg, &extra_args_size); + if (extra_args) { + cmd_line_bytes += 1 + count_utf8_bytes(extra_args, + extra_args_size / 2, + &extra_args_chars); + + pr_efi(sys_table_arg, + "Appending contents of 'LinuxExtraArgs' UEFI variable to kernel command line.\n"); + } else if (extra_args_size > 0) { + pr_efi_err(sys_table_arg, + "Failed to read 'LinuxExtraArgs' UEFI variable\n"); + } + cmd_line_bytes++; /* NUL termination */ status = efi_high_alloc(sys_table_arg, cmd_line_bytes, 0, @@ -821,6 +867,11 @@ char *efi_convert_cmdline(efi_system_table_t *sys_table_arg, return NULL; s1 = efi_utf16_to_utf8((u8 *)cmdline_addr, options, options_chars); + if (extra_args) { + *s1++ = ' '; + s1 = efi_utf16_to_utf8(s1, extra_args, extra_args_chars); + efi_call_early(free_pool, extra_args); + } *s1 = '\0'; *cmd_line_len = cmd_line_bytes; diff --git a/include/linux/efi.h b/include/linux/efi.h index 56add823f190..c0902384fa13 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -672,6 +672,7 @@ void efi_native_runtime_setup(void); #define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f) #define LINUX_EFI_RANDOM_SEED_TABLE_GUID EFI_GUID(0x1ce1e5bc, 0x7ceb, 0x42f2, 0x81, 0xe5, 0x8a, 0xad, 0xf1, 0x80, 0xf5, 0x7b) #define LINUX_EFI_TPM_EVENT_LOG_GUID EFI_GUID(0xb7799cb0, 0xeca2, 0x4943, 0x96, 0x67, 0x1f, 0xae, 0x07, 0xb7, 0x47, 0xfa) +#define LINUX_EFI_EXTRA_ARGS_GUID EFI_GUID(0x7cae4e6a, 0x08d7, 0x4079, 0x8e, 0xcd, 0x8c, 0x2e, 0xf4, 0x72, 0x30, 0x40) typedef struct { efi_guid_t guid;