Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4272708pxb; Mon, 27 Sep 2021 13:10:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhizy5KEnPQjjgzH8Z+qsGJuux1IRROOOhzAkaPsA7USzDkYoat4xG6cenm6KLZv2i69y0 X-Received: by 2002:a17:902:8503:b0:13a:366:8c46 with SMTP id bj3-20020a170902850300b0013a03668c46mr1663575plb.37.1632773457700; Mon, 27 Sep 2021 13:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632773457; cv=none; d=google.com; s=arc-20160816; b=kwCqze5D7IZR/JbWgsndF0wAuxN8lIwVsBFKA9P/GYif5AWs1l9wRop7gp22R5vSfc cTfnOPXRmwdm78an4VByk2bojmwBF8AZ8hpvL+MG7AqPg+wJORAUbakF+amTsiK4XvFm D8nxLyUqTmlpfxtpv13ayaseYV1BVGvTQ4gmLOOrBHyHe6lcHNDtm7F6QNvoS918Ramp EsVTEGLkpEOeyeoS8JLiiFHw9yMy3wQjK+FSKjESnpmul1y5PZiyP+4aknRp5Ha8bDQ0 WLtGJ/aB/8l4HfQiw5aiYz9AZ0d1956/UJ0rUm9tcSEHtYcjKCZ7j6p4Zljdq8noNskX wNQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8OFukCSNsOqIkW6SWnwpDKuo/92QdnVzoodLvdMZQ1s=; b=wnVHDzYcFx7L5zY0xPrXrmz0a5UIL1FN+nXqFtMa9nSWHYf0EoTki76qMJ2nUjHHBl c+rNk7EFJ1VwVWu+hkygjF3JiwXt++/LNgjvSNz3tAT1cCFIYzWCtjEpo33GZLDrQ8WM DLauFe8vSmxwyStsSaSd8czM6wtyTEzOZEU8JCFM2qFo96KAKFpmNu+wa+Stp/o0/lip uJiZOCnkQGc8WjtJDIQ8Bn6c1lLd9Pucy9K06x8A1ZXv9iT4+2yU9+8CF98jEd75xifQ uruWXw3VVWaxnG7wURIxwZFMedu6IlJvpGGIO0jsd7/Ct6tWcYD/fnC0lNtQVZnOF1MH cL6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rammhold-de.20210112.gappssmtp.com header.s=20210112 header.b=F7h1wVBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si23109019plo.333.2021.09.27.13.10.44; Mon, 27 Sep 2021 13:10:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rammhold-de.20210112.gappssmtp.com header.s=20210112 header.b=F7h1wVBR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236841AbhI0UKU (ORCPT + 99 others); Mon, 27 Sep 2021 16:10:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236821AbhI0UKT (ORCPT ); Mon, 27 Sep 2021 16:10:19 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 351EFC061575 for ; Mon, 27 Sep 2021 13:08:41 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id w29so53848623wra.8 for ; Mon, 27 Sep 2021 13:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rammhold-de.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=8OFukCSNsOqIkW6SWnwpDKuo/92QdnVzoodLvdMZQ1s=; b=F7h1wVBRwn/HWEG43TcL5JNhRFRAwjMac81f0d4v9ms7SidGU8VtzSyURz1zQAKrFg tdjSG/Uj006dC589FB7In1GxoYBm1NWRWxmlNWugFXmej04thXob5cEoukZv1ZGDQGwJ nABGmmLTt3hmpbXiL7GKqkjDqJ0IVnPHRqTVpVpehnPZo+wSRZ3Xsj9Rz+LM9u/OPDgN uoNt8ek3gr5b91ZbbveHSuXKANiGVhzwfmORuSeK9tvxVOQnqtCaqLz5/cgAzr1f+aj6 h1i4PwNqIFPg4iNpk65AuAyKBSYTeiRpcrsuLIMsI2LDP23siIyc7HiMw0e9UcYVX1sP W6BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=8OFukCSNsOqIkW6SWnwpDKuo/92QdnVzoodLvdMZQ1s=; b=NhtUu0MAHXWuqccm8LhsuXluYi50w08fVu62QUax5JOkThKSKIs6Xa4N8RbS9fyX/8 oGrA424d6QEd5Z+2x8VGp3nHm0AiXYJS8AuYKnSZdiglocjQpIRkyFt581OeyaILjpYZ cwABbGyXSZAwUXP48CBDNhPWbngR9wTCYF96hikzA1mIFrTzZ1w51qNqLGs6c2yLe/2f U6AUaxgbqnZUc0sKVEODHFjcki9y+NePWzP9/n6xSXLPISI7EgjFg7l+S089Vf8XmBuj Pi8pSo3C8wGuHKcvI77JgSR2O055AMAVCOvTa2DWlwy3b8fgjGVkkVcV3xb/pycmJEse mN0w== X-Gm-Message-State: AOAM530Kh7Anvj6rTVeNvJDftI7DulLpA0IjvVjgvooL8vj7R/1xNmPV L+fXXQGaeDC7X05kMDHJrqXz5w== X-Received: by 2002:adf:e101:: with SMTP id t1mr2003768wrz.395.1632773319706; Mon, 27 Sep 2021 13:08:39 -0700 (PDT) Received: from localhost ([2a00:e67:5c9:a:6d7b:fc0:e9e9:7254]) by smtp.gmail.com with ESMTPSA id n14sm465252wmc.38.2021.09.27.13.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 13:08:39 -0700 (PDT) Date: Mon, 27 Sep 2021 22:08:35 +0200 From: Andreas Rammhold To: Mimi Zohar Cc: Andreas Rammhold , Ahmad Fatoum , James Bottomley , Jarkko Sakkinen , David Howells , James Morris , "Serge E. Hallyn" , Sumit Garg , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] KEYS: trusted: Fix trusted key backends when building as module Message-ID: <20210927200835.wvazk73cek3t5tkf@wrt> References: <20210730012822.3460913-1-andreas@rammhold.de> <0d42a11a-0117-49a9-d2c9-bc6cc405235d@pengutronix.de> <20210927085104.vq42feghtaqiv6ni@wrt> <856359f263575f01d0ce2fcf8f042321f750b38c.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <856359f263575f01d0ce2fcf8f042321f750b38c.camel@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07:27 27.09.21, Mimi Zohar wrote: > On Mon, 2021-09-27 at 10:51 +0200, Andreas Rammhold wrote: > > On 09:47 13.09.21, Ahmad Fatoum wrote: > > > Dear trusted key maintainers, > > > > > > On 30.07.21 03:28, Andreas Rammhold wrote: > > > > Before this commit the kernel could end up with no trusted key sources > > > > even though both of the currently supported backends (TPM and TEE) were > > > > compiled as modules. This manifested in the trusted key type not being > > > > registered at all. > > > > > > > > When checking if a CONFIG_… preprocessor variable is defined we only > > > > test for the builtin (=y) case and not the module (=m) case. By using > > > > the IS_REACHABLE() macro we do test for both cases. > > > > > > > > Fixes: 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework") > > > > Signed-off-by: Andreas Rammhold > > > > Reviewed-by: Jarkko Sakkinen > > > Does anyone intend to pick this up? > > > > Did this end up in any tree by now? I am wondering if I should resend > > the patch instead. Perhaps it was just overlooked? > > For EVM environments only using trusted and encrypted keys, not file > signatures, the trusted key is needed to decrypt the "master" key in > order to verify kernel modules. So what you are saying is that right now (before this patch & after this patch) you could compile a kernel that wouldn't be able to load any modules when the trusted keychain part is built as module? Andi