From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD33C43381 for ; Mon, 15 Feb 2021 13:16:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15DB664E2B for ; Mon, 15 Feb 2021 13:16:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbhBONQl (ORCPT ); Mon, 15 Feb 2021 08:16:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbhBONQa (ORCPT ); Mon, 15 Feb 2021 08:16:30 -0500 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF22C061788 for ; Mon, 15 Feb 2021 05:15:49 -0800 (PST) Received: by mail-ot1-x32c.google.com with SMTP id o12so5967959ote.12 for ; Mon, 15 Feb 2021 05:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wjkmpaYZoqx/V1g1zz+czC2mkPWLKmCPi8XRW5kwt2k=; b=sW8ddk78wC92DDQQdxE8WF+dOauJhXi1LbD1xIXzT6L1YeF1OG9PSiXLJ0pVRUassZ dkR4Jxwt2bfAYmV87Q3MIbnrxZkmgVcFXUMxOrvB6cM1KZAnI7iqktTl+6FNUyou8uX6 OVE0SphXFSKygugrXvX0O+t41AHttbMULv+EfvxXs/UZ8nvUaQyxrpykGo11CFLnP9gC xt1g6oPutDrbKADy0Szff2ibMI8j8swDJi2rp+WnIbSdbdRRIXYLDH5c1hnqpcBsPUMJ Bt19yLZnIb8aIZy+5emYaaoaw3wU/dPAygvn0+NsMifvG9dUjrzlCubaTReLbWD9JMCI pNpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wjkmpaYZoqx/V1g1zz+czC2mkPWLKmCPi8XRW5kwt2k=; b=IO29Frr65xKi2P2p/EUHYe9mlLdNqqNS0u76tIcMXpq3tJJCTTj4MI2D6/uO8HTgib lwyaA1bYqrUuZLb+ZcRwFWJkNXi8pqhXP6Gp/Y/iEsIGNB+FnfbX+rA8a+LK0fdKgVLg bdXHubda7jh/CGO1dIpvNImHzTgmuoYflRmGYB+j7SeKjHEzvbKIzEuN8vQ/doMrMqgP Fbri7H1xFlZPM5seRlfxoMVlqjJTU5JRtP5M+mp2yylAvJF9/G7hfVOapA14tSm45ML9 3f72Be+4+BDE4WdUAMirNExwm0JLqTMx3lWoaHG3EdztAo/XznUztI6Jaw28gERi+jEq fcuw== X-Gm-Message-State: AOAM5325cbIbFJcFGU58EoyDNfZU14d4q7lk2wVrkhqWfeT5tCn68C7k 7X4VPqMtcCpMhL4LFEg6KBD/yQmeDFe6b4NsoKHfqg== X-Google-Smtp-Source: ABdhPJz+NdmUWLoic5UHuHWoJUetVrsNxk5tUkDarWb7HobYfKENt4CK5ToR507PIEx8KQnsL2oGfCTAfzhZ6h7Mfe0= X-Received: by 2002:a9d:701c:: with SMTP id k28mr12052248otj.79.1613394948898; Mon, 15 Feb 2021 05:15:48 -0800 (PST) MIME-Version: 1.0 References: <1604419306-26105-1-git-send-email-sumit.garg@linaro.org> <1604419306-26105-2-git-send-email-sumit.garg@linaro.org> In-Reply-To: From: Sumit Garg Date: Mon, 15 Feb 2021 18:45:37 +0530 Message-ID: Subject: Re: [PATCH v8 1/4] KEYS: trusted: Add generic trusted keys framework To: Jarkko Sakkinen Cc: Jarkko Sakkinen , Mimi Zohar , James Bottomley , David Howells , Jens Wiklander , Jonathan Corbet , James Morris , "Serge E. Hallyn" , Casey Schaufler , Janne Karhunen , Daniel Thompson , Markus Wamser , Luke Hinds , "open list:ASYMMETRIC KEYS" , linux-integrity@vger.kernel.org, "open list:SECURITY SUBSYSTEM" , Linux Doc Mailing List , Linux Kernel Mailing List , linux-arm-kernel , op-tee@lists.trustedfirmware.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Feb 2021 at 22:30, Jarkko Sakkinen wrote: > > On Tue, Nov 03, 2020 at 09:31:43PM +0530, Sumit Garg wrote: > > + case Opt_new: > > + key_len = payload->key_len; > > + ret = static_call(trusted_key_get_random)(payload->key, > > + key_len); > > + if (ret != key_len) { > > + pr_info("trusted_key: key_create failed (%d)\n", ret); > > + goto out; > > + } > > This repeats a regression in existing code, i.e. does not check > "ret < 0" condition. I noticed this now when I rebased the code > on top of my fixes. > > I.e. it's fixed in my master branch, which caused a merge conflict, > and I found this. > Okay, I will rebase the next version to your master branch. -Sumit > /Jarkko