Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp110226rdf; Mon, 20 Nov 2023 18:32:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNJDO3Q0pRqVjHXIMLfWLt5goaURyonZ5+5gB1z12WIx+wEcWChG9F1G7Rs/8IUQlBFemW X-Received: by 2002:a05:6808:10f:b0:3ad:f4cc:79a5 with SMTP id b15-20020a056808010f00b003adf4cc79a5mr10641964oie.33.1700533978289; Mon, 20 Nov 2023 18:32:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700533978; cv=none; d=google.com; s=arc-20160816; b=YAAk7JPrHExONWJ5EcMNojvgnafRqgVWMXztK2cJsGcxuibr8b/wpTQ+yq4L4ZtBn4 K4qGITzBksJLGhK2WicKRI9G7SAosIRpQBs73d/F9LQkfc0OtCdpqM/IjGt5JbCFVGwz mMzScY2cDszR+GZThx4JStZQRN6VFd5A8gf//7FPB+KvP+Ka/nFpl3vRAu8om0/Tv6Fj bTxevcCtVugEf9o8tOxUR2xc5klc7RhVQ9rSZmr7sKblmqU2EQJlJMhKriHXivaDZq9i LVoFMNbf5dguZs5uX1n9Cif6egpSAChLplbDpLTf5PNYLDO8zeJ4ZXpem1O3rEE9LJY+ kvnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kQew7RH4p+btfi+SdVSn7rImpVweNTfJ1E+cxn9Oa3Y=; fh=13hb97vAwiAd7J48sk4QJf2dkJJPy9dZUTcJKAtCQvU=; b=BFBKlSJS1vbTQXB7VupfvX77Rxu/uiZJxoVg6BAe1l3lH7ANDu4tjNZqSvEUhFT62u cGn/JEt/gSD1vXB6ZzwY0OB0uTzlexpN2mLy2Qt0weGMdVqaosPvN7BvUa/GkRMBqiKK 9fq9Xm2kbCZcOACkW2sl9zaRJdJXNjesyvYDq2tHrofFoQjh0H2+LCULrMqB1WuRtV67 XHY5dDlzz+ZI+7PSbQ33zizEFFEvaJXPw0fgfc1y/ArWQX7UwhWB2LfpHkKHTWUlNDWd E14rjk2scELN2unY5YT9w3f2HC+FnnXZqrthNbmHwIgnoc6GvJGvGS2d8DDOl6/gQ1z7 z7hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lES7krgr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s6-20020a63e806000000b005b91518ab92si8904431pgh.671.2023.11.20.18.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 18:32:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lES7krgr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 95B398061561; Mon, 20 Nov 2023 18:32:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbjKUCcj (ORCPT + 99 others); Mon, 20 Nov 2023 21:32:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjKUCci (ORCPT ); Mon, 20 Nov 2023 21:32:38 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D6E6AA; Mon, 20 Nov 2023 18:32:34 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-280260db156so4075990a91.2; Mon, 20 Nov 2023 18:32:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700533954; x=1701138754; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kQew7RH4p+btfi+SdVSn7rImpVweNTfJ1E+cxn9Oa3Y=; b=lES7krgrQmoiYh0gjXBcikFtuM1lymu0SwgDUgbWn4Af9Wd2W+/BgmxMWmDZX/D+k5 yCnI/DjBLpKqhaPU74RaRsn+otKYeY8prCuRKVuLF6f/baIHmXUWDhMXlyl4TWl5i+kN P9yUMmjCV833qP0CAOEWzotwQv9bLCH+oQ/tpYky5/2Ps4wUG7WiFnmrI1kt2dkK41Mf RcDQm1CO0urDjaiI9vZrykL2+lZbE44Vl3GDhULhSbGyL1bbSyyVqUKOR2UdhDT7O4Vb M1evvDiQFyJHcoOM80WnuS4Svk54qRJUR8PtZm6mG/rZGJQaozMUGDTzO3zCR2btYva6 Q8Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700533954; x=1701138754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kQew7RH4p+btfi+SdVSn7rImpVweNTfJ1E+cxn9Oa3Y=; b=AbzojQzHYOwU5S2AqgEVqpAqVG4txTV0hzwsjdHsw1ltES2zuwInMzaSNzfKPcJhY8 4KGXoGvb2R9L0TnkCI2QzhzbevMA3beEj2wHthxjdnAbsoeHSsiEgVHwl0mCUIyrIBVz S/OcDucTNneV5L41bT5+TSlyYb36/XCIB0F0CLU5ZNykNdRtqJrkYn2dodJ8KmsSeVDM YUqpZEKr6Ho8QC0rOFZA0K6IYhi7nVR5IihmRKLcOiKPTlFgucpn4lDPcBh1eaS/r6HG m08MtVZUjHMKYCGXOt6KoCAF7lTWj5I2Hdw9V9GduETRW+qFlGbfrrgxoWgcIjW1Cqru zx5g== X-Gm-Message-State: AOJu0Yzqdg9mfnLu1ZSP1DBLa9hr6f7vRvcM37bI7qihkDJKjJl+n3gE kAWZnbVs5EJk2qb1Sq9E4ys= X-Received: by 2002:a17:90a:fd17:b0:27c:f8f4:fedb with SMTP id cv23-20020a17090afd1700b0027cf8f4fedbmr10446951pjb.21.1700533953085; Mon, 20 Nov 2023 18:32:33 -0800 (PST) Received: from localhost.localdomain ([154.85.51.139]) by smtp.gmail.com with ESMTPSA id cz8-20020a17090ad44800b00280fcbbe774sm6272758pjb.10.2023.11.20.18.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 18:32:32 -0800 (PST) From: Yusong Gao To: a869920004@gmail.com Cc: davem@davemloft.net, dhowells@redhat.com, dimitri.ledkov@canonical.com, dwmw2@infradead.org, herbert@gondor.apana.org.au, jarkko@kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, lists@sapience.com, zohar@linux.ibm.com, juergh@proton.me Subject: [RESEND PATCH v2] sign-file: Fix incorrect return values check Date: Tue, 21 Nov 2023 02:32:19 +0000 Message-Id: <20231121023219.846984-1-a869920004@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120013359.814059-1-a869920004@gmail.com> References: <20231120013359.814059-1-a869920004@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 18:32:47 -0800 (PST) On Tue, Nov 21, 2023 at 7:44 AM Jarkko Sakkinen wrote: > > On Mon Nov 20, 2023 at 3:33 AM EET, Yusong Gao wrote: > > There are some wrong return values check in sign-file when call > > OpenSSL > > API. For example the CMS_final() return 1 for success or 0 for > > failure. > > Why not make it a closed sentence and list the functions that need to > be > changed? > > > The ERR() check cond is wrong because of the program only check the > > return value is < 0 instead of <= 0. > > > > Lacking Fixes tag(s). See: > ttps://www.kernel.org/doc/html/latest/process/submitting-patches.html > > > Link: > > https://www.openssl.org/docs/manmaster/man3/CMS_final.html > > https://www.openssl.org/docs/manmaster/man3/i2d_CMS_bio_stream.html > > https://www.openssl.org/docs/manmaster/man3/i2d_PKCS7_bio.html > > https://www.openssl.org/docs/manmaster/man3/BIO_free.html > > Replace with > > Link: https://www.openssl.org/docs/manmaster/man3/ > > BR, Jarkko Thanks a lot for you comments, I will fix that. BR, Yusong Gao