Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4431949pxb; Tue, 2 Nov 2021 09:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI8c7LJw/G/jS4zgbeXtQXg0aYFpZGUmG7Rj2bzbQ3mnZnynE0lLmMAv4kKtLNCUoz/1rC X-Received: by 2002:a02:2345:: with SMTP id u66mr28365432jau.129.1635871035915; Tue, 02 Nov 2021 09:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635871035; cv=none; d=google.com; s=arc-20160816; b=zTmjFsqxUZVNPfELvJt1W3rIu8OPJDUtejcfpLsLqGHOfVmSgeQIWUKgfjIF6fCd3V 9JVnn+SxOSUrf+RDYDxcum+IsdA2XfnBIyKqtK6zfpkdzZ6FOXCOM5TCviX8hM5JHotg bL09lJanTL//uxcREREFZ9anEKxEPJt/YKnvePRF3m7z2p0+G7HY8N5iKcKZ99GrUBXo M8sM/0XmkfH8GV0lFKViHL/DZDAB3+bC5AQEQ/WZuPm2DXAnIINmFOtDyZfsWWBi/+pQ 9dfwTVKwV73nG9ULy6GG9ZpQ07wMqhu5vm/QXv/7orBY5Y+nsNX2p6SHGRmRZ510KsCI wPfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EFG0W4zbuZBKc8KwN//b04i0rLIBd1L+XKZX7MrXoOc=; b=e42C+NYSh8/Hav9kDJ1t4sPHnuUCNyQHau9odfCAS+NxjbBB5rC5qBsjYq4CKY9atP JlE+AGNwdgN4Ooq7rVKHmk4RhgwUl0XFPFFAtYZS2++43Vd7Tm7010wdi6Gr8lAuLeKs mC4q7SWjpEVaWp6GBkd9WSoFaFppl4zxlpHVvl+dEqTcLk+DQdrMXPY2ihYjVRb7M/WG FTfcCMAU1wDIHS6yWYgePd4aC61B029Oa2LUYtAy32mkJDOEqD2m8zlyABZLlwJhFMaG Wogx/BKuuVkorm7yv8q/efYeH6/XYgvDuUJqdq1cylwL62elvAaNtVUOPIv1IHpeQ97z bPqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=hpAI9rD1; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si24470773jav.10.2021.11.02.09.36.36; Tue, 02 Nov 2021 09:37:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@google.com header.s=20210112 header.b=hpAI9rD1; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234986AbhKBQi4 (ORCPT + 99 others); Tue, 2 Nov 2021 12:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235028AbhKBQiq (ORCPT ); Tue, 2 Nov 2021 12:38:46 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6E73C0432C5 for ; Tue, 2 Nov 2021 09:28:36 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id k24so16453895ljg.3 for ; Tue, 02 Nov 2021 09:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EFG0W4zbuZBKc8KwN//b04i0rLIBd1L+XKZX7MrXoOc=; b=hpAI9rD1GQefjY1Adn77Zrw92FmMVgTkMn30tMZmiv+NzH79bDofjvVfqKAG8t/k/X RX50bQ0reQiJiASa+Wi3Ks1ITAO2X1a1eJlnJACu0G3dfCj6pzLhRwt8ttFnbVlWmoih YPvqmqixTXafViP0iPMRbo61wTri5tdAgB7Xgql0KMeJu4DRONJOd+Fi6ZlSTyat+I+Q 5xy0YYH3X0UkObJm99RE+K2WL4jqLBDPTTC+Tzj6E00Dm9qb+8BNDCtMvoqEYLD0zh/b IqW8SERdtvpoDMuR6KEkDkzZ+qx8Wj5KfkegnFR8YN9De6j7NaUULuVOt67gpk6SN3hR u+ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EFG0W4zbuZBKc8KwN//b04i0rLIBd1L+XKZX7MrXoOc=; b=3csLoukBQWn9+6xE/W+DL3vwhoTBW4yIYPfMzCsTWNOqYhAkDb5t1L50Gj14RaQqZv p7eGb9tQ33L4c30ciVjZ3pjr7vqVUCXiM4KumqJHf2wab5fXx4/qmOvMQOFcCKY45cld t+Unsj6ql4nI6GGw4dslAsnPknpWGG/fqK174lHkq9L2UrzdXkPJtfUas0NAYlXmV9je 2b9zsYEvr6Gp78EuhUL09EUITYmPH+kcEQM1pHtxwBdxousqCHGPYCwKu1dUF7YG1c+M f6P1rmxLXCjKDLrVcG1FHH96ushKbUKaVW51rM8HoHhPcezm5AtQy+zZzvJ+1zbwNwgc gq5w== X-Gm-Message-State: AOAM530x5J3L9QImI5sn7HXBi9xpFDwHImJwxjRy+QRJq1KRJsUORxCx C2oKSMj0dPG4r+dMHA6p2tailmHPYXo0joJBzC1smw== X-Received: by 2002:a2e:9a18:: with SMTP id o24mr34636588lji.426.1635870514872; Tue, 02 Nov 2021 09:28:34 -0700 (PDT) MIME-Version: 1.0 References: <20211102142331.3753798-1-pgonda@google.com> <20211102142331.3753798-5-pgonda@google.com> <0701eb12-a60e-381f-ddd0-9ee9a0fa3edb@amd.com> In-Reply-To: <0701eb12-a60e-381f-ddd0-9ee9a0fa3edb@amd.com> From: Peter Gonda Date: Tue, 2 Nov 2021 10:28:23 -0600 Message-ID: Subject: Re: [PATCH V3 4/4] crypto: ccp - Add SEV_INIT_EX support To: Tom Lendacky Cc: David Rientjes , Marc Orr , Brijesh Singh , Joerg Roedel , Herbert Xu , John Allen , "David S. Miller" , Paolo Bonzini , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Nov 2, 2021 at 9:38 AM Tom Lendacky wrote: > > On 11/2/21 9:23 AM, Peter Gonda wrote: > > From: David Rientjes > > > > + > > + nread = kernel_read(fp, sev_init_ex_nv_address, NV_LENGTH, NULL); > > Not sure if you missed the previous comment, but kernel_read can return an > error, shouldn't it be checked and fail on error? I did miss that comment. Updated to make sure nread == NV_LENGTH. > > Thanks, > Tom > > > + dev_dbg(psp_master->dev, "SEV: read %ld bytes from NV file\n", nread); > > + filp_close(fp, NULL); > > + > > + return 0; > > +} > > +