Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp44514rdf; Mon, 20 Nov 2023 15:44:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7xXztFM4n37UHnTGVSydeWBoZGNbbNHQmsb8Rd3ZiJMdqG4NJk6WMohm9+JCTG0P82gFA X-Received: by 2002:a05:6a00:800a:b0:6cb:63cb:83c0 with SMTP id eg10-20020a056a00800a00b006cb63cb83c0mr7142162pfb.29.1700523858003; Mon, 20 Nov 2023 15:44:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700523857; cv=none; d=google.com; s=arc-20160816; b=cnlhLf22AvwqtnWojACKTNV+Ux5bQhV6WuT7RuDLvrA8XRp9ntGF1g0UhwWMA5jLQs qZbZnazOATNjukp88Cqby7pbLvaj+TEkNJ0PwIUWiaef4Vw3bTbsodVG4aghItaVc9ox Y6jJO7S7X5hkaRMtbIk0tpBdoskXKZpfEap7zdAHQYkqYVQvr7oPdQqC9UF1SGlFezq3 kX8tfMFHByEzN/7vI00PWSGnubeBPts98Wr0qdwOaGxtJUvDDRj7Vl1UGU9f+jtP1yUS 2oSqjzHC70x52ovpMCcCevCLtuFgSejelXMtfDvx4h+AYOhCO9ASe8ZFCqfMgP3B1K7+ e/pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=Kd8MO4g1L5NTe6VF4FsH/eaduBF2fDgRgJuS7ZGu1iU=; fh=qCIyfTlUi+W2XxTwFqBb1brrc4uFsD71n5kr6+AE6c4=; b=vqRGC5kC6Gp09frXknfdIVbzkd2Wg71Rk58tFLjWx9om8N/qSuuQVSxk+w0LmamZz6 hL7UeGIl9ZB/8S0ONrBes4J4j0Wx0i21Ein+nMVTuGYe/LQu6JcZ02Ahi5DpR0v22rfp xcFIUQrNH6OeWQFKUhG1lww3PCA2LN7Fyw90dFiwKz5WePSyAtXEFBdWJvOboDQwg/F9 bAQzK72m2ysdQbvJR8tSPOZZkawOZf431NQrrXvp/iVlv//BM5ZVqtAnCWMYxj2eiZFK kbLgb7gbkMtu49WWUi9IYqu2zGvPeiO3fKmpp6IZoDfiPCe5KlsPUNGIIOcDbQIuLgEL 4jsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ufd0rVmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id z128-20020a636586000000b005b95e508b6bsi9072880pgb.58.2023.11.20.15.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 15:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ufd0rVmR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4432B8045959; Mon, 20 Nov 2023 15:44:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbjKTXoN (ORCPT + 99 others); Mon, 20 Nov 2023 18:44:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjKTXoM (ORCPT ); Mon, 20 Nov 2023 18:44:12 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58BE3C3 for ; Mon, 20 Nov 2023 15:44:08 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1359C433C7; Mon, 20 Nov 2023 23:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700523848; bh=Kd8MO4g1L5NTe6VF4FsH/eaduBF2fDgRgJuS7ZGu1iU=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=Ufd0rVmR5y3R7QnornCtBcuirGAcrKKp42f3eDqcYIB1XonOVDSdvIw6LrO4cW2ar 0NpeKZXlbxFXQqrGmG2KBLfCq9/M0n7dN8/1Dtc2JLwtubEj0mLNR6/jxRpyhuF9OR R9SxEJt5l1+Cr/VOEqAnN4vRCKbhLjltSO2E7Lx316gDOrTKyZ+sZIIToUVsG2vuio h5np78o+4dKBYHNZZFzQUkUCxZc3+p69vTiHJ7Y395UkGtLmJKQr88G0oKHWwoiIGO a5mrFDA/e6gvjX7JVIVBvk4BTRlex4VESUTbpYKwKmoz/14KtZRi7Jb49dbEDDyqRf ukRiua9v/JZeg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 Nov 2023 01:44:03 +0200 Message-Id: Cc: , , Subject: Re: [RESEND PATCH v2] sign-file: Fix incorrect return values check From: "Jarkko Sakkinen" To: "Yusong Gao" , , , , , , , X-Mailer: aerc 0.15.2 References: <20231120013359.814059-1-a869920004@gmail.com> In-Reply-To: <20231120013359.814059-1-a869920004@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 20 Nov 2023 15:44:15 -0800 (PST) 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 <=3D 0. > Lacking Fixes tag(s). See: ttps://www.kernel.org/doc/html/latest/process/su= bmitting-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