Message ID | 169632239730.3135.5499875554711156270.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1940607vqb; Tue, 3 Oct 2023 01:40:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQwiyUhQHB0OAuXD5ELIFdPoE3dn1vhUhu+NoLqMZyzoqZ51wwBTW17clc8MSdo77EJGg5 X-Received: by 2002:a05:6808:6181:b0:3ae:a81:55ba with SMTP id dn1-20020a056808618100b003ae0a8155bamr14012742oib.22.1696322411074; Tue, 03 Oct 2023 01:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696322411; cv=none; d=google.com; s=arc-20160816; b=xpdgrfzjyT48kaUvqo3PqEEEram7XM1mqyeCCo3FceqE4k8G6PrV+jFnsp2MJhNQVL pDz0LAH8yy5oKvalZn5MWTqhIjOxjH8A5vb0DesiWuByVZuv0WgoNmEO/zre8AlN22tO fgM8RWSZqocVHxCTiAlejIj5/akne8P4XteLMDFB/BOOgsk2Onp6g20ik/Mr6WTuGYJ5 /PZZkpgr5GS7giiC3qiIwg9aN1JUSy1xlYg8ObZ4d+FQZRnFtT52btymVTMIqHmoHeo7 IT6cxCxLAAUyOMIlruxywiTjFhgy74u/0ckreKhfH2xin8D9uh0ZY7HeTx3BAcf2Zi3n NxxQ== 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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id s196-20020a6377cd000000b00584aa817597si985067pgc.101.2023.10.03.01.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:40:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; 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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 50417825CD39; Tue, 3 Oct 2023 01:40:10 -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 S231217AbjJCIkF (ORCPT <rfc822;pusanteemu@gmail.com> + 18 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 <rfc822;linux-kernel@vger.kernel.org>); 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" <tip-bot2@linutronix.de> 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 <ytcoode@gmail.com>, Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>, 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: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> 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: <linux-kernel.vger.kernel.org> 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:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778722968941482064 X-GMAIL-MSGID: 1778722968941482064 |
Series |
[tip:,x86/boot] x86/boot: Fix incorrect startup_gdt_descr.size
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Oct. 3, 2023, 8:39 a.m. UTC
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 <ytcoode@gmail.com> AuthorDate: Mon, 07 Aug 2023 16:45:47 +08:00 Committer: Ingo Molnar <mingo@kernel.org> 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 <ytcoode@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> 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(-)
Comments
On October 3, 2023 1:39:57 AM PDT, tip-bot2 for Yuntao Wang <tip-bot2@linutronix.de> wrote: >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 <ytcoode@gmail.com> >AuthorDate: Mon, 07 Aug 2023 16:45:47 +08:00 >Committer: Ingo Molnar <mingo@kernel.org> >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 <ytcoode@gmail.com> >Signed-off-by: Ingo Molnar <mingo@kernel.org> >Cc: "H. Peter Anvin" <hpa@zytor.com> >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, > }; > Well, it never mattered because there wasn't enough space at the end for an extra entry, but it is still Technically Correctâ„¢.
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, };