Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3354820lqo; Tue, 21 May 2024 14:44:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmeytmr5e7FwjiykcQbdg8eydDH6IWk18pkNUF6WfqrcUNcDvQi9pIXj65ySv8jtbZ+yym/xKmJpHGW5DXxRQLiEPQbhRhUjZQNLi6LA== X-Google-Smtp-Source: AGHT+IH1ye2PQ+MgjKJFYj+tq4LT4SOKovMOmd5BO8BY2wsMU2pnYAimjw7r1SqPX5+8a4+NUCBV X-Received: by 2002:a17:906:15da:b0:a59:dd90:baeb with SMTP id a640c23a62f3a-a622816470cmr3586066b.48.1716327875658; Tue, 21 May 2024 14:44:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716327875; cv=pass; d=google.com; s=arc-20160816; b=swZ6F30QOqmlr+Yj5Q1V0uUdm6B8WuZiUmusrAKUTkpZMIwS7NpMXDC390k+ntij9y IhJPhqMX+MN+n9QImA9EC7FcTsrN18uIezUDpmwBuc7X2xlS/YmVAvvCUESlV9i6hg1d Z6vfEFEZbMMniDJJMqu0Xg19lfjLIxSZiE2bMwrl2lSU9GbsTomV6DFR+v4E1OtxJ2R0 HCm4NhhDk9uYkBpXN8/ytCPAweu72Njv5Pu8ToPvd2gZXirx/cYdvSWZA3dpGDRKOMrt WiMWMpZgYlPFOMZ1BLxOsgE4B+bStvs9qALtwR4ukZuPcIm9sheQ+JwU7hszXQcx6vpU /2dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:cc:to:references :in-reply-to:from:organization:dkim-signature; bh=as6GIYyNEq+8SDN+ioFBfL9KQ8xlH4pzpn2Hhey21Rg=; fh=O92uhwSae0ZyRIaxl01BhXAGAEpEhLLU91yBjxkgAQE=; b=d8RTWzDKe74IrDyMXzeTGxLpYVDjbIQV++Cea9hbgsPvOJ8keH7l49VxohtMavlajC GyWi+40dyxD69l+6hbhCgHQpjMa9dOQK4vivNToSSPW0Ryyw9JECWjCuDAmCFMioUZEu /W0tjgzakGvaTI9WTBd3xG8tyMiFJuoMOYZ7deH2IMqc4sAXAWA07u4yF0RZ5I+ClKfO OObNGvmm0qcmQvX17vDzrqvAqZ4+QA9cbaN/0ZZgH2564W5x7rAv3+Cs//j1kdy20ukM uDAWohyXMBon002R7l2hc0nG3zDQyG+22X0KkHCXrCUPLDAmvReowca9BUHi/++2lUuZ jp/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OqA0beFT; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-4313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be6a52si1526076966b.727.2024.05.21.14.44.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 14:44:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OqA0beFT; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-crypto+bounces-4313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6154E1F21936 for ; Tue, 21 May 2024 21:44:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C98CF149E18; Tue, 21 May 2024 21:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OqA0beFT" X-Original-To: linux-crypto@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 1F3C414885C for ; Tue, 21 May 2024 21:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716327866; cv=none; b=s23aqOxr5LkP89XY/KYoj422ACO/Yssak6vVZq3JvLnGdcW6Xrz1I4AckXT3t7RuGEr3StEyld7xJfLL6RFoF36Cddlgk2NNVsS0uitM4pezYDlfXRPNvSbBC8SSS7kGG25n0kYVqm1oso/Tu25hes9rjyPY78b8EnECIdjGnQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716327866; c=relaxed/simple; bh=4nYyyCd0npKEcPTjE/tiKnDxq9X/Y9evMSw7H3OMOEk=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=oM8dn/i77Ug8UK0vhDsSOvRhhEYnEzv+6f5ZA5VoTfnSoXEF2c1p3MTCDC5gCOTKjXqTl39A5pbRQfmr7lzC/dbxtB4Bzq++fjtHGVUAAPPFYP6CNVgK54LVKFEREh0MdMoIaMJPVFI0L2IwV990lJoFEjcIxZVCfyES0f1/8jE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OqA0beFT; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716327863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=as6GIYyNEq+8SDN+ioFBfL9KQ8xlH4pzpn2Hhey21Rg=; b=OqA0beFTvTsIqcZ11CsEboMTuiTRKz5WFmMANxd/iZBFB7bBKJKFQVTLZlfW1lPMFSyoiR Pqr9PFwQeN0LidvGlHd2Ulw6YQeNaV6dQhK+O47VsBR/wqwPonC/8vzCk0wkulqQoopdvJ DraWL89ECOQFxWBNIjiypO0P9QHWAPE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-205-7uKOREwjNPi_uWS0Qvm4mg-1; Tue, 21 May 2024 17:44:19 -0400 X-MC-Unique: 7uKOREwjNPi_uWS0Qvm4mg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4236E81101C; Tue, 21 May 2024 21:44:18 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C5ED51BF; Tue, 21 May 2024 21:44:14 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20240521031645.17008-1-jarkko@kernel.org> <20240521031645.17008-5-jarkko@kernel.org> To: "Jarkko Sakkinen" Cc: dhowells@redhat.com, "James Bottomley" , "Herbert Xu" , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, Andreas.Fuchs@infineon.com, "James Prestwood" , "David Woodhouse" , "Eric Biggers" , "David S. Miller" , "open list:CRYPTO API" , "open list" , "Peter Huewe" , "Jason Gunthorpe" , "Mimi Zohar" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , "open list:SECURITY SUBSYSTEM" Subject: Re: [PATCH v2 4/6] KEYS: trusted: Move tpm2_key_decode() to the TPM driver Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <336754.1716327854.1@warthog.procyon.org.uk> Date: Tue, 21 May 2024 22:44:14 +0100 Message-ID: <336755.1716327854@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 Jarkko Sakkinen wrote: > On Tue May 21, 2024 at 9:18 PM EEST, James Bottomley wrote: > ... > You don't save a single byte of memory with any constant that dictates > the size requirements for multiple modules in two disjoint subsystems. I think James is just suggesting you replace your limit argument with a constant not that you always allocate that amount of memory. What the limit should be, OTOH, is up for discussion, but PAGE_SIZE seems not unreasonable. David