Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1817828rdb; Tue, 3 Oct 2023 01:40:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQ1XAiPThIpcHoEta+QpnlNswNlVylnAAmpkrxkpD+VmvkBbmDXNmNoebSbSw6mAjqjvVe X-Received: by 2002:a17:902:f80a:b0:1c0:cb4d:df7c with SMTP id ix10-20020a170902f80a00b001c0cb4ddf7cmr11855221plb.1.1696322409302; Tue, 03 Oct 2023 01:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696322409; cv=none; d=google.com; s=arc-20160816; b=TEKHNr7sD5MRNFZ804FnWRwHxg6AT2kZCRYCfvqEMPeQ9NOg6A2eQ5b6ftSHspCDp2 UNGOsZA82Yhn0Ozyzi+8aac4S4//XewaN69LAc+J22lpE85NOvo5a7IxOrF9G3fosHfB 02FdcUWAtgUx8ZoEx/LG0z+o9WYMESf4vuaIFYsaPgQ213KEpn5HltyA5BDmnymKZsm7 qlVdzi4mW4Dm2vmX+9OsgS/+VUPQHNExNKFXeOPSlhz6GacWjG6UXUxQeotbJ9m1i24O /cPE7TOfs1f8eE8RdrP8TMM6VaOqEKMlStHz4rIDBWx105PpUkwRVZyxhXDKwHl1SaJh 6fmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=qh+KBuPKg3zOxbyl3qdxgTFuvx+rQ61ZCEuRvw4p5qA=; fh=Ywf+YHoLOs9hgVYyaiMX1ahHVKTGA/mfjGB1TyQx9+0=; b=yVF+STKlEftJOKT/Ip7jXjFXOEldaC/Cl/Pxp6iPPL34yf5EWOK0iY+VmEviUJlswu 3HuTovnaIDptLpfaN+MMpvFxHyTvykBfw7XwpKe/hvee5i9i6owkS0r8g/5d8hsKszPn uMusXtY74Mjz456tfLKrknqLw9Rwhp4fAJS55E4E1spCT4vFFipLxRqadDGjXVauBmBj qcEu/ONqjkdTAGTKuj8TRiZLlisaoA9rUyYBDQ/8zIcGjEBytXG1t1E37U6VhUAf7x98 Btdvukee5NrIzMWY6xpdv8OtwAEvEjYQhyEz2drKGRkGsHzQWiPV6CmTKxdpM94sKWOj uy1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=DAN3eu7U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JEb8DR3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id kr15-20020a170903080f00b001c61bd9db5csi911881plb.317.2023.10.03.01.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:40:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=DAN3eu7U; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=JEb8DR3E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5E4F0825CD39; Tue, 3 Oct 2023 01:40:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbjJCIkF (ORCPT + 99 others); Tue, 3 Oct 2023 04:40:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230441AbjJCIkD (ORCPT ); Tue, 3 Oct 2023 04:40:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79C1B97; Tue, 3 Oct 2023 01:40:00 -0700 (PDT) Date: Tue, 03 Oct 2023 08:39:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696322398; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qh+KBuPKg3zOxbyl3qdxgTFuvx+rQ61ZCEuRvw4p5qA=; b=DAN3eu7UVcKi68fFPvkfSkxMb7MC7WvcakDcRMGxLl7NFqKr9Sdgs/zXZrhYAv8mo5Jpgz fTNvmM4hM145DfG6D0QTVEucM/L/9JYzQzz7CGfyCMsY0Uw08eLCjPB67CLhetc5pvEixy ra6vS6NqBwtLfFUUf9pzz6LAxB/kLqivSWQRRmXI7wUmFUt+LzPHNRWRolfhZk19q7AKaV Zu7U5KiowlFi+tpc9HlEXF622AN4KnsxuYBwE9Xg7sEGh+5fF6dYvIoH7uHqttF8ZyaUZi UIpKsKWWVtFHsAvfz6sNHL5m8PGuMyYWvYgdV3SARCMnGBK36V8XZl/eYyR+wg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696322398; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qh+KBuPKg3zOxbyl3qdxgTFuvx+rQ61ZCEuRvw4p5qA=; b=JEb8DR3EE0vc3TPb3DJ5rsYyYRUq1+4Dr2YvH4YHwwstDKrtYhVjsnVXlRS2UxKr0sXvTG 45YSowApvpodFwDA== From: "tip-bot2 for Yuntao Wang" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] x86/boot: Fix incorrect startup_gdt_descr.size Cc: Yuntao Wang , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230807084547.217390-1-ytcoode@gmail.com> References: <20230807084547.217390-1-ytcoode@gmail.com> MIME-Version: 1.0 Message-ID: <169632239730.3135.5499875554711156270.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:40:08 -0700 (PDT) The following commit has been merged into the x86/boot branch of tip: Commit-ID: 001470fed5959d01faecbd57fcf2f60294da0de1 Gitweb: https://git.kernel.org/tip/001470fed5959d01faecbd57fcf2f60294da0de1 Author: Yuntao Wang AuthorDate: Mon, 07 Aug 2023 16:45:47 +08:00 Committer: Ingo Molnar CommitterDate: Tue, 03 Oct 2023 10:28:29 +02:00 x86/boot: Fix incorrect startup_gdt_descr.size Since the size value is added to the base address to yield the last valid byte address of the GDT, the current size value of startup_gdt_descr is incorrect (too large by one), fix it. [ mingo: This probably never mattered, because startup_gdt[] is only used in a very controlled fashion - but make it consistent nevertheless. ] Fixes: 866b556efa12 ("x86/head/64: Install startup GDT") Signed-off-by: Yuntao Wang Signed-off-by: Ingo Molnar Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20230807084547.217390-1-ytcoode@gmail.com --- arch/x86/kernel/head64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 49f7629..bbc2179 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -80,7 +80,7 @@ static struct desc_struct startup_gdt[GDT_ENTRIES] = { * while the kernel still uses a direct mapping. */ static struct desc_ptr startup_gdt_descr = { - .size = sizeof(startup_gdt), + .size = sizeof(startup_gdt)-1, .address = 0, };