Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp633865lqd; Wed, 24 Apr 2024 12:04:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvkWjvEWnDB9a8HvwlFbDGh1kbkq2xKVh8Rnzs/Wl9RdI/c87ZkNvPKeyhZ5bN2Sa809IW/PRmpbQbIhT3vRGU6lQlAroy3qvvBZvDmg== X-Google-Smtp-Source: AGHT+IGTS8DNTopclxkJq1kLtUB5Y61Dkhka8TAozjz9lz/ys2W761CzKYM60pwAjftbWrbR8NNf X-Received: by 2002:a05:6358:8393:b0:17b:5661:5e2b with SMTP id c19-20020a056358839300b0017b56615e2bmr2785196rwk.18.1713985495189; Wed, 24 Apr 2024 12:04:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713985495; cv=pass; d=google.com; s=arc-20160816; b=ol1yTpMh0DFOWt7Zz7iMz9nVHu049zhHxGi62zDsVYvZ9irADV5C8dByoK15z0TKbj JDBgksER39M558nSqXQrPsRDwtCuHXe2pCSIfXix6Cs4OIjRuLvHrj+ftFP3HxB/If8Z 8oM66WpHF5Ib/O/JfuU2BS17ZkkMw/6pc476HSV3jYpRBlibRfDK6dyABIlMLNUN8Bbp ah4Ho2Fs8dxdytSJXBk6bR6oya8eM9LRZkYhdu4uIn67P+p/mUt10uN/UGdXriCA91yF W+E87sarxijNu4VuUMlnMwXXinXmnA1KiNDPb7Vf2l/t6f7RRDI2rP/k5wxYTPZXzJU8 6+zA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=dRKcaBKo5fuMcFfCN9azIg90Nn+9aKeHsYVea/r9kxc=; fh=DqPA7tNpP++PpqP72o5tjb5MVtcc+uHnmAaxMLVyewU=; b=QDPcL+iOLkZK9jm4f5SsyeOQY3FBH+pt5hMV/jsaiRzNqCTUkuomV9FtjPXmanO9eb y/eMIJ+3LHw1lPxtfTsimhO8m6U5Al5fcT0VozniNvyms30B4gg+l4pNW0O1KaoCgsK9 sRRzSjF7exWSp0cbeD2Kh902t3rDpOLp6XY5estsUZC/de7/R818/t5VueKXydo3S+u3 uIGCKEa3O/P5sIeTTb6YHcad28nrtyJ1iyIo0vfOTDIS7GJnjarb28WSFaasSyYsU89Y c2X2XKNew9Slwb6+HCc3yuW9ywoS3oJshrOm5bYWqR4Rx4hPqL0AGGNIQT0ymEYUeakk b1dA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=nt4A8HS0; arc=pass (i=1 spf=pass spfdomain=lwn.net dkim=pass dkdomain=lwn.net dmarc=pass fromdomain=lwn.net); spf=pass (google.com: domain of linux-kernel+bounces-157580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g33-20020a05610215a100b0047bae3ae57bsi3311311vsv.331.2024.04.24.12.04.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 12:04:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=nt4A8HS0; arc=pass (i=1 spf=pass spfdomain=lwn.net dkim=pass dkdomain=lwn.net dmarc=pass fromdomain=lwn.net); spf=pass (google.com: domain of linux-kernel+bounces-157580-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DF28B1C213BA for ; Wed, 24 Apr 2024 19:04:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D97121D545; Wed, 24 Apr 2024 19:04:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="nt4A8HS0" Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83D711CF8F; Wed, 24 Apr 2024 19:04:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713985487; cv=none; b=aSLX0EJnfe9nQtJXk5pNmb+I6ZebfDHgMt26OolrfpbFPF7LpsFvWmLAfYVO4TnkQyOy/3SgNgEGBcZrf0ZLFh8F6JXRxAxwNxNgWCgJJRdUfeMnOCSLXY3JSESwp/XSaKlWgb4ERvQU3oqcU7TD0sn76d2Qzqdd9IeBMHNQl4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713985487; c=relaxed/simple; bh=x6shHUnIQesEwIbukRUgPxXYDXOp6+ft3svHp1S2jFs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Sq1H2g5I78pKE+NMnOil3hRe28HQT8MInb6peAIIvY3yyq7ACMkLAHR8WUhAAPVkjAZjv8lZSDsB5nVCbhkwaq6FoTbLkCNyP5yafQxKmKfWd85T5dGAp6DUF/LpTiQpo+yIuVchKBzxJdTvFO0gcSQrKO58EFj2ySus5/A0kiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=nt4A8HS0; arc=none smtp.client-ip=45.79.88.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 73AC247C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1713985482; bh=dRKcaBKo5fuMcFfCN9azIg90Nn+9aKeHsYVea/r9kxc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nt4A8HS0pYyr1iSnw7rMOJONecbH7FLlGeAbC3P5JPX9VAUtzMqIr4h9LBZQM/38V un2TEvFOOcsqkal+c1YM40JET5RD71kjCoUQw/lPcHK/B3Z8Fs1XLOY088AVBNj0Vl XAmoJHMnCwomAHfXGCsyO0Ox4zg+RIfEdYEJc9nggjrnst8lryJ20C58STkn3pRrRL /BwpjY0pUgNuRlpVKMo52Di8U8VTc1g2mx3XJABNVvojKNvZOCFk8MMYlthAWhCziw 2HNQdqw6Fe3A2MHcNYVvLDetiAdH4kB7fDAahfHgjMthMxq/zky7vTSx/7wNLGaQXx FijRybMiXCKBQ== Received: from localhost (unknown [IPv6:2601:280:5e00:625::1fe]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 73AC247C41; Wed, 24 Apr 2024 19:04:42 +0000 (UTC) From: Jonathan Corbet To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , "Joel Fernandes (Google)" , Chris Hyser , Josh Don Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Subject: Re: [PATCH] admin-guide/hw-vuln/core-scheduling: fix return type of PR_SCHED_CORE_GET In-Reply-To: <20240423-core-scheduling-cookie-v1-1-5753a35f8dfc@weissschuh.net> References: <20240423-core-scheduling-cookie-v1-1-5753a35f8dfc@weissschuh.net> Date: Wed, 24 Apr 2024 13:04:41 -0600 Message-ID: <878r12twdy.fsf@meer.lwn.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thomas Wei=C3=9Fschuh writes: > sched_core_share_pid() copies the cookie to userspace with > put_user(id, (u64 __user *)uaddr), expecting 64 bits of space. > The "unsigned long" datatype that is documented in core-scheduling.rst > however is only 32 bits large on 32 bit architectures. > > Document "unsigned long long" as the correct data type that is always > 64bits large. > > This matches what the selftest cs_prctl_test.c has been doing all along. > > Fixes: 0159bb020ca9 ("Documentation: Add usecases, design and interface f= or core scheduling") > Cc: stable@vger.kernel.org > Link: https://lore.kernel.org/util-linux/df7a25a0-7923-4f8b-a527-5e6f0064= 074d@t-8ch.de/ > Signed-off-by: Thomas Wei=C3=9Fschuh > --- > Documentation/admin-guide/hw-vuln/core-scheduling.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/hw-vuln/core-scheduling.rst b/Docu= mentation/admin-guide/hw-vuln/core-scheduling.rst > index cf1eeefdfc32..a92e10ec402e 100644 > --- a/Documentation/admin-guide/hw-vuln/core-scheduling.rst > +++ b/Documentation/admin-guide/hw-vuln/core-scheduling.rst > @@ -67,8 +67,8 @@ arg4: > will be performed for all tasks in the task group of ``pid``. >=20=20 > arg5: > - userspace pointer to an unsigned long for storing the cookie returne= d by > - ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. > + userspace pointer to an unsigned long long for storing the cookie re= turned > + by ``PR_SCHED_CORE_GET`` command. Should be 0 for all other commands. >=20=20 Applied, thanks. jon