Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp140783rdb; Fri, 5 Jan 2024 05:30:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJ6gN3b4Fo6l5Bt6x7AgGjdkB3beCT3dHxTdu+nEq0SWC+jpzAYDwxalfo6MmULt/5b9X0 X-Received: by 2002:a05:6402:345:b0:552:11fe:a81c with SMTP id r5-20020a056402034500b0055211fea81cmr1211396edw.26.1704461446026; Fri, 05 Jan 2024 05:30:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704461446; cv=none; d=google.com; s=arc-20160816; b=AJpyo9qZa5xGPHLsC24TId7mmQ0p6zTyAQQw4vCWi0QwvaiwsrU1wiHhSQ90gA49Kh WicJ5xEoPrk8UQnjgWtVObu/XBVrEktSAON783VQ5VlA7UlWrDMOGfuasOzNrffwThpL euR0xnjmVWLzcwlWTn20b1+1tLGtZuHWxVIrzjX8slAycwhpfwLpz4LRQAeLKgmmOQef 0dJyVsIBWMpQmRJMtfNdAv1YZzs9McdyGI4YcoqdyNqbOuwP5ZUzi0iIFofw09lR9sYz DYUQLqKkl+qukIJJRDqXCDQBLYJMiQRI5nP5TZdrf+0/pY2aQcT/RSBxMWbOtIaO/A+w Z3Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9ZyA0UiJjlDprNRBcnFya4w1YVvVVz2SWLbH1aem4wE=; fh=byIzOQmg/g856XVu96990oTFYVFMr7RrfOj77WYSSb4=; b=dWYu66AXLAvJyN4ZL9OYo/HgzHaJVFWpXaojTTPZHgjT0mMAlXdndH16nIvxeK/PmD M+wMhskdkghStmnC2BjFLa6St5kIXdBOSZ51s2RLnvK2n2LD6s/5dR/eNMjHPVIW1Cdl AFbsWu+cROOLr/1TeKJy2l5QLc1zoNzFcGfWqaMfPPdWUM43vKmBg565NiP/YCRaAWNS 5o6NW5fWKsf7F0n2irF01MJSZJWi3VVZoi91/JfkAOvjjZ5No19KY2P1Luqd06gQtCD8 uNRyb9PLvL7bS00fNC5XEilKK6W+hR8wDoTvyZcdjWqeWBFwfKMNCM8nUYG0bMBcmryu htCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Os2GnA0D; spf=pass (google.com: domain of linux-kernel+bounces-17878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17878-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 z14-20020a056402274e00b0055732ec79d2si428683edd.158.2024.01.05.05.30.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:30:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17878-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=Os2GnA0D; spf=pass (google.com: domain of linux-kernel+bounces-17878-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17878-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 C32AD1F2252B for ; Fri, 5 Jan 2024 13:30:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F5B72DF66; Fri, 5 Jan 2024 13:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Os2GnA0D" X-Original-To: linux-kernel@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 1E9E52D7A6 for ; Fri, 5 Jan 2024 13:30:23 +0000 (UTC) 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=1704461423; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9ZyA0UiJjlDprNRBcnFya4w1YVvVVz2SWLbH1aem4wE=; b=Os2GnA0DC0ws1Y0eDfmVgJrTGC5oPeETsWmu1UpnCmah8UlTTjzzHilPThVOktUIdWfLKY tJNP2CswsUI9w0SPOdFsGwdDPJ+bulJo07qYHfkt597gbpaQwlq+Iro976zKOxxwLVWxck BWTmwPJEa2j6lf8WAYSY+8iSfUk9gJc= Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-145-qLFpCxujO7-CHpgI8wXWag-1; Fri, 05 Jan 2024 08:30:21 -0500 X-MC-Unique: qLFpCxujO7-CHpgI8wXWag-1 Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-596194636d4so1606598eaf.2 for ; Fri, 05 Jan 2024 05:30:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704461421; x=1705066221; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9ZyA0UiJjlDprNRBcnFya4w1YVvVVz2SWLbH1aem4wE=; b=OraDj6gsC+bVFIl6RhdK8SSHfrv3UUH17H96pcfMuDCIw544c/U5fwhYZd9/f4P+e5 kbm51RP2efmvvCVUxOJV4fCdqi/zCeppLT62cNRYPr9L8DHecEjmzp6z/1INCNkg6quQ N5jzcFl+BofJ/tYDTYWXHGxNZkrOi+lHYxlC863OW8C6R0md783BRxCTRlMxh2CFCHtq REenqHSdPt4Bc6uTotNQWgemUzDyqyRXn+sZBTxaUPI4L+0mcj1/pJxXaShMf9Wk5sfe cNbvAjG2gt/WSwINT2z46HSLBUkw0gQyn7zbwRYsG4JMEex5SyrAcbf2pbGr5E1su/nv n1ZA== X-Gm-Message-State: AOJu0YwshS5nqRLlskZShQg1m1iWZnU9X/n8frp+Rrlj8g1Jayvqf9Xm uZvakP+EZHHcrU488FCHiPZbyA84Y5H1hrSMplxlHeXzN1KGAqzVb2M0UPs52l6/itWr1AMHV9U KWX2rM+Uz3Izwq23p2xB6es+VS1lOk4nk X-Received: by 2002:a05:6359:309a:b0:172:fe9a:44d9 with SMTP id rg26-20020a056359309a00b00172fe9a44d9mr1557961rwb.33.1704461420862; Fri, 05 Jan 2024 05:30:20 -0800 (PST) X-Received: by 2002:a05:6359:309a:b0:172:fe9a:44d9 with SMTP id rg26-20020a056359309a00b00172fe9a44d9mr1557952rwb.33.1704461420523; Fri, 05 Jan 2024 05:30:20 -0800 (PST) Received: from localhost ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id j3-20020a63fc03000000b005ce71f1440bsm1402487pgi.72.2024.01.05.05.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:30:20 -0800 (PST) Date: Fri, 5 Jan 2024 21:27:28 +0800 From: Coiby Xu To: Eric Snowberg Cc: "linux-integrity@vger.kernel.org" , "itrymybest80@protonmail.com" , Mimi Zohar , Dmitry Kasatkin , Paul Moore , James Morris , "Serge E. Hallyn" , "open list:SECURITY SUBSYSTEM" , open list Subject: Re: Re: [PATCH] integrity: don't throw an error immediately when failed to add a cert to the .machine keyring Message-ID: References: <20231227044156.166009-1-coxu@redhat.com> <2E548AE0-8029-4BB0-B162-4CAD0544EDB8@oracle.com> 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; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2E548AE0-8029-4BB0-B162-4CAD0544EDB8@oracle.com> On Tue, Jan 02, 2024 at 05:33:53PM +0000, Eric Snowberg wrote: > > >> On Dec 26, 2023, at 9:41 PM, Coiby Xu wrote: >> >> Currently when the kernel fails to add a cert to the .machine keyring, >> it will throw an error immediately in the function integrity_add_key. >> >> Since the kernel will try adding to the .platform keyring next or throw >> an error (in the caller of integrity_add_key i.e. add_to_machine_keyring), >> so there is no need to throw an error immediately in integrity_add_key. >> >> Reported-by: itrymybest80@protonmail.com >> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2239331 >> Signed-off-by: Coiby Xu > >Reviewed-by: Eric Snowberg Thank you for reviewing the patch! -- Best regards, Coiby