Message ID | 20230104192054.34046-1-mathieu.desnoyers@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5316193wrt; Wed, 4 Jan 2023 11:27:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXvp+8ZUXWTlh5Qbgfs2HG5OPvR5gHwy7zMR5ePKAbm0I5H3jb51f7W7jLWAF6kTdCa1aNDZ X-Received: by 2002:a17:907:3ea1:b0:7c1:7f84:10ac with SMTP id hs33-20020a1709073ea100b007c17f8410acmr70910391ejc.33.1672860441266; Wed, 04 Jan 2023 11:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672860441; cv=none; d=google.com; s=arc-20160816; b=O/rJ0x49rIhJ+vOmbF/45no9TuxL60vzJ7Eju+i4+1um4LVtImMPcCQSXjRiKm6pQJ KZw1mXX61GYgr6Rli4zeAJWN5GbrzqNuMA+6aUJSEUJMU1Dv/TqGIrCyaqVpCGxKb/h0 yoik/OJ2gA+RmeP0udFADBqDFQOhTBuW9pjRuezxBBJ0GUNjx9knoOnwy2CyaGvz+YF4 r3ZiEy2NB7785mEoYXlc4NkaHp2eb3+Cfe3kcy4c50U3dJgu5OqB3LKTQsw7HSuW+tcJ hkx6QlL3fXUbPVd9nfZbC9Ccjk1yDSzYyOw1tr7/vaSFhqcovM5bWNkYUR58ad6sX8mq Zhkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pIH3pQI2hYspJLSCsI7uvaHjdgIazUVcdLPlf82w43U=; b=GsRopFb0AiyKbpQdkx4xw6b+61BYG268fYsy8ru71Vl51flamlLhbHybnm8FZEO0MS x3v1Cz1WZTHxQ9lzu8AgYdR+RMU2i+z1OwkK+whtk1uilsHacNjMJ2pC/0HSarE5w7kL IecrDaon1slM/udmvYCvlC6vR7RBnLHF11OUL1I+r02ZrsH0CVWpZHD0ooieQPx8NxT2 tj4IXAa8tGsNNp/ZTRuLpPbwHGaCkCfjQYtA1akMM/gkt577TOsMbgAu6JWUbEa86qnl hjOLbiXjwNDPukdLZ2itLcsib/GhUw+zK5RGQHAbyrJ3v6tPlA/6pHYh2WyxtsrS70mA zRHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=uHpzNIke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho34-20020a1709070ea200b007c1691c5296si29283673ejc.385.2023.01.04.11.26.58; Wed, 04 Jan 2023 11:27:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=uHpzNIke; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239846AbjADTVI (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Wed, 4 Jan 2023 14:21:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjADTVG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Jan 2023 14:21:06 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C23B24F; Wed, 4 Jan 2023 11:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1672860060; bh=EkluNBVpVWqQAv87WSQmghkcqC2q2Qy6C1sH75HStM8=; h=From:To:Cc:Subject:Date:From; b=uHpzNIkexlMwMW6tcNulYBdFNfgt/LIfn/2hxHwEPbcvX0EY0xNxNtx4nytz3So3I eA4+dqiTbDQVdhd/5EhS+4kZS8AtpXJffodZopOxaRaFj3FT/oFc5P2rlQCU1x4/2G CT50Dnc7FAsOeq+2T4Rv7mvTMfa6ugO8kX0sGDfg8+ZPOr/94ClKDjO5WytRyNlZvE OyziHvhheM8LLwjdeAx0OoHWRa2guPOmWACMe6l0kzsOI8bzgmI8EdSmWnJ8pGjEa3 OISba1sr4BVI6b4KNdf+TWbjKplAKoJIySKWR+KSJonxNseLadt0ct+/Wc+NVEgfZo eg5JQL5oa8ZMQ== Received: from localhost.localdomain (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4NnKFm4PWhzf6q; Wed, 4 Jan 2023 14:21:00 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>, "Paul E . McKenney" <paulmck@kernel.org>, Boqun Feng <boqun.feng@gmail.com>, "H . Peter Anvin" <hpa@zytor.com>, Paul Turner <pjt@google.com>, linux-api@vger.kernel.org, Christian Brauner <brauner@kernel.org>, Florian Weimer <fw@deneb.enyo.de>, David.Laight@ACULAB.COM, carlos@redhat.com, Peter Oskolkov <posk@posk.io>, Alexander Mikhalitsyn <alexander@mihalicyn.com>, Chris Kennelly <ckennelly@google.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Nathan Chancellor <nathan@kernel.org> Subject: [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries Date: Wed, 4 Jan 2023 14:20:54 -0500 Message-Id: <20230104192054.34046-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754121309952325503?= X-GMAIL-MSGID: =?utf-8?q?1754121309952325503?= |
Series |
[RFC,tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries
|
|
Commit Message
Mathieu Desnoyers
Jan. 4, 2023, 7:20 p.m. UTC
Two new auxiliary vector entries are introduced for rseq without
matching increment of the AT_VECTOR_SIZE_BASE, which causes failures
with CONFIG_HARDENED_USERCOPY=y.
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X
Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
include/linux/auxvec.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Jan 04, 2023 at 02:20:54PM -0500, Mathieu Desnoyers wrote: > Two new auxiliary vector entries are introduced for rseq without > matching increment of the AT_VECTOR_SIZE_BASE, which causes failures > with CONFIG_HARDENED_USERCOPY=y. > > Reported-by: Nathan Chancellor <nathan@kernel.org> > Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X > Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries") > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> This resolves the boot failure with the configuration I tested: Tested-by: Nathan Chancellor <nathan@kernel.org> > --- > include/linux/auxvec.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h > index f68d0ec2d740..407f7005e6d6 100644 > --- a/include/linux/auxvec.h > +++ b/include/linux/auxvec.h > @@ -4,6 +4,6 @@ > > #include <uapi/linux/auxvec.h> > > -#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */ > +#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */ > /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ > #endif /* _LINUX_AUXVEC_H */ > -- > 2.25.1 >
On Wed, Jan 04, 2023 at 12:24:09PM -0700, Nathan Chancellor wrote: > On Wed, Jan 04, 2023 at 02:20:54PM -0500, Mathieu Desnoyers wrote: > > Two new auxiliary vector entries are introduced for rseq without > > matching increment of the AT_VECTOR_SIZE_BASE, which causes failures > > with CONFIG_HARDENED_USERCOPY=y. > > > > Reported-by: Nathan Chancellor <nathan@kernel.org> > > Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X > > Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries") > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > > This resolves the boot failure with the configuration I tested: > > Tested-by: Nathan Chancellor <nathan@kernel.org> Thanks!
diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h index f68d0ec2d740..407f7005e6d6 100644 --- a/include/linux/auxvec.h +++ b/include/linux/auxvec.h @@ -4,6 +4,6 @@ #include <uapi/linux/auxvec.h> -#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */ +#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */ /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ #endif /* _LINUX_AUXVEC_H */