Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp591609lqb; Wed, 29 May 2024 05:20:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFa5SzHdIpyij2enAbVy1ma/I8zKzgAJFqhWKZpgm4i4x5D2t2VfTBf9pIUpHm4H0W0rkCYYqwarm2UY4NifWMYsA/Y21TKwSyNBMQoA== X-Google-Smtp-Source: AGHT+IGc6j1UMBbJVrR1Xtnruyjkz/9zT3KsgS/z2lfZ/YMHxHwiV7iC331O7iMTLl3CgNPgDyR6 X-Received: by 2002:a05:622a:649:b0:43a:7b64:2fcc with SMTP id d75a77b69052e-43fe10c8591mr31184711cf.7.1716985245782; Wed, 29 May 2024 05:20:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716985245; cv=pass; d=google.com; s=arc-20160816; b=vq/lOG2AOHGKqwb3W1KAFVXBl0eKhe1OIzd3UaAv0N45PPWBKWXYu9GKp3jdnG2vJ8 J6JPAoICD1ltak9hGAT9bV2WIFyS/eOimeBpQEO6TyWQj14UaBS5yDQ2RJ7pIgGjzX5O ML5hjc7LMlrDbdKTNaaXSalqu0yQhjFIsGXE6AE5MfpsAeQepxUXeCMKTaRDCpXg9p0V uS3t4iyiKpeHq87RhwGsjHZgOkFG+Y9kemS4fGqHw+9eCQlSsL6sr5cS83wTUQpgGyH9 t6ASNNDT0ILBLtStGreR67JZhpuJ3sjTdczsmkDA3AdlP2pTRdM59AoKZfom5GIrKzmC EYGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=VpHIdGNzMITuTJTo8IHKIYXLIDv6AXCePiPAEtOFDFo=; fh=SRkXvCaGbv/hzn2mSCTjlk6mfb7XoCqHBIdYvJLTERY=; b=LhsHzgd5muhfktQcHrYgdE/yIhAWrGWkf3qLWang/SL84C6q/gl0e9bBbc7Usr4cv8 XhOr9nW1Wc7wImg2uy0yS9PQCBBdx8ektNl6cbybMsKROnm6GWW42DSVaD/fvfyLaTSI UXHX2kQZjCWUjQwbbyojRUJIMYfqFllW/tkos6mDxmdAvjPlL2x4Osdpo6D6Cmrxw1c5 1K33OkmJ0FSwH7hDqqpUam5yF2conhJGxgtYicCrPN8eV/ZUjrpIPnqTN5y7tTKzbMcZ 2jHzc+xbVuWKq4j6ZFiyjrCfY8sxw36GpSAdAucLmcpYuJbu0uf/n3GYLp8g8WylWi0j xebg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AhqUIqsF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18cd66dsi135864261cf.696.2024.05.29.05.20.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 05:20:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AhqUIqsF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-crypto+bounces-4499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 6789C1C23B6E for ; Wed, 29 May 2024 12:20:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1519018130D; Wed, 29 May 2024 12:20:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AhqUIqsF" X-Original-To: linux-crypto@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 ADEB3180A97; Wed, 29 May 2024 12:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716985231; cv=none; b=iGhrBg+udyZLInOQIbXNhY8E2ouZHQ15qfSepkLSoFkfiH1ZiDmLv5gCrjoi1MvgvM6+9JKS1Ef6pnu3HDevyoAUAoZHLK7telGoiLJ8jpR5S7iXsVZoGBdmE3l6LdDABNMQ3EhuJSm44ANRbIkP38mHBlYAjJ2VSznqoLAMbDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716985231; c=relaxed/simple; bh=VpHIdGNzMITuTJTo8IHKIYXLIDv6AXCePiPAEtOFDFo=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=uWe2y1AS3vrIWaV3mf0lqb9Ur7v6l+lULXqtcmfx+/TI1QIshBgWIoQI7iSCAGZKPM1X4OhTUokilCT6Mh2+JfQ9z1pjrm3tYDceD3wwrjjmMJpUUz1CJMpE4MV705xRZcVrLFIhHfptwJyu0UxH2SpzPv9iO4hrpxayPgsGAoI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AhqUIqsF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66876C2BD10; Wed, 29 May 2024 12:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716985231; bh=VpHIdGNzMITuTJTo8IHKIYXLIDv6AXCePiPAEtOFDFo=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=AhqUIqsFLYOCebwLbUCnjjUx4VRWTD0BnXxREMkocMYUA64uSMLDspnGAE5xJYbTk SKotVExoVXb+3cXSp9SmBqPsJWhEs9sfZ8J/MWbC1fW21KUnPN55O21n7nOtem/RsD eXUaBO6NSuijG9knpgRAZJljAdYrfu1RHxGw8itCCd2HtGX5Y/HanvlZVfgNhI8UOL cICgXQvSVZGJKY/G129/QZkCx1dV1KQOLnPpjw8Jk1r5yaAKa3Zs3HQgiWy/nH6rQG mIQZbx18PK5VazXv6QgRoxNq7E79hjWos1ByswqeC7hmLiGCGgtf8z4QLDjuV3VKvV dbL8l4DMLdfPw== Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 29 May 2024 15:20:25 +0300 Message-Id: To: "Stefan Berger" , "Herbert Xu" Cc: , , , "James Prestwood" , "David Woodhouse" , "Eric Biggers" , "James Bottomley" , , "Lennart Poettering" , "David S. Miller" , "open list" , "Mimi Zohar" , "David Howells" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , "open list:SECURITY SUBSYSTEM" Subject: Re: [PATCH v7 2/5] KEYS: trusted: Change -EINVAL to -E2BIG From: "Jarkko Sakkinen" X-Mailer: aerc 0.17.0 References: <20240528210823.28798-1-jarkko@kernel.org> <20240528210823.28798-3-jarkko@kernel.org> <14d0baf4-fa41-4a08-925d-90f028117352@linux.ibm.com> In-Reply-To: <14d0baf4-fa41-4a08-925d-90f028117352@linux.ibm.com> On Wed May 29, 2024 at 4:50 AM EEST, Stefan Berger wrote: > > > On 5/28/24 17:08, Jarkko Sakkinen wrote: > > Report -E2BIG instead of -EINVAL when too large size for the key blob i= s > > requested. > >=20 > > Signed-off-by: Jarkko Sakkinen > > Reviewed-by: Stefan Berger Thank you. Hmm... I'd like to add even: Cc: stable@vger.kernel.org # v5.13+ Fixes: f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format fo= r the blobs") It turned out to be useful error message and would be useful also for stable kernels. So if no decent counter-arguments, I'll just pick it to my master branch. BR, Jarkko