From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.134.164.104 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796043956; b=GTFI2Z8/XM94/as3/kHtQSSF40jmoCDzmkm3nHhTSpvICgdHw092J67cG6NQXVBqaM7Q 7y4G0feFZLdbUOAg/82NoapuPqIRv9kqQuo4cHG+RkIJUeqL/3p+OYQuydkZaKuzblnqB QFU1MF4HxIJZ96+dNJ1vwMYt5FeDe8xiaoZbQhsKv4V+uJV0JOlWEXTfXQtGwX75QgyOu N+c7N2yhaZxYKI2/dU3D2wAV6PmjO4mhRrE3V297byG5AFCzJ02dL7lVF1ja3FZx1SXqJ PNrUNRgGYia9RVMS8jwaOm98CW6n8c24kZhghD1v/bTEbdGh35dofSoC+imj7MzYwpw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796043956; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID: References:MIME-Version:Content-Type; bh=u5l+ohan8sNqOleu1s26rt2oKJFSonzngE8LKNUppAk=; b=0nrVDZdDM12XLsKNQH3MPLK28+Gdbl1eeQI5ny1VCHHfEuM+fPX105gTcwKabbclbiwI mIbtbh4IVe8RW1u2Pf7K1KhLzmakGEZY6Y5H/SdPfhlp685B/E/2zXta8KtiQ6RNbJi8F p3QKZ4tSQmbE2fExthI9BHeCIvMd1xwtGHySqkWkYxp10ffGl5krflWnqYsn6gQ3GjXgm HIAWkm8YwICbyGK24S5uvhZpTOOAS6tlRImE/gh3kguR9AvdbegBJGpAvbxUS5ltSFQex 1IYcK/ynuYoxLpN4IMJw4OWSl4HzMjCD3B9fr3pHp4dxdD6MhZQeklXl60gYIfL6SVw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=IypIopU3; arc=none smtp.remote-ip=192.134.164.104 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A7C9606A327; Mon, 30 Nov 2026 13:05:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5A7C9606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=inria.fr header.i=@inria.fr header.a=rsa-sha256 header.s=dc header.b=IypIopU3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=u5l+ohan8sNqOleu1s26rt2oKJFSonzngE8LKNUppAk=; b=IypIopU3CArfOeVvQoiXptEnQeIi3+MsgMfkI7l9XvZ7Prgs+3LZPQI3 mL3O3sG6q3nFuj6qDjP0oY6U1sycFiO7SAVvrK5Xhuv53vrcJInJLykz6 R/1CK9dDAHqTvlgwgR3OUW3aSwh+ruJX6J0AXOgvF1+Yp76Q/ir2UQGg8 4=; X-CSE-ConnectionGUID: 9dYBOSiXSKOXnz4jONQeKw== X-CSE-MsgGUID: WgDtFsGxR8mS7Nj08R5jmg== Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.27,242,1787004000"; d="scan'208";a="164270555" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 14:05:46 +0100 Date: Mon, 30 Nov 2026 14:05:45 +0100 (CET) From: Julia Lawall To: Markus Elfring cc: cocci@inria.fr, tools@kernel.org, kernel-janitors@vger.kernel.org, LKML Subject: Re: [RFC] Detecting unchecked return values (with SmPL)? In-Reply-To: <214cdbae-b798-4ea4-8c1e-9eabdfd1663a@web.de> Message-ID: <3241c2f-7d9-f7e-d2f5-1e7980340c4@inria.fr> References: <214cdbae-b798-4ea4-8c1e-9eabdfd1663a@web.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-2006008604-1796043946=:3554" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-2006008604-1796043946=:3554 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Mon, 30 Nov 2026, Markus Elfring wrote: > Hello, > > Macro and function calls for which a return value is not assigned to a variable > can be found also by a script (like the following) for the semantic patch language. > > @display@ > identifier i; > statement s; > @@ > ( > *i(...); > &s &s seems totally unnecessary. julia > ) > > > Some developers and software reviewers care for a corresponding topic. > > CWE-252: Unchecked Return Value > https://cwe.mitre.org/data/definitions/252.html > > > Thus I suggest to refine case distinctions accordingly. > > 1. Identifiers can eventually be excluded if they would denote items > with the return type “void”. > > 2. Identifiers can eventually be restricted to names that would denote items > according to non-void return types. > > > Which structures would you choose for such data processing purposes? > > Regards, > Markus > > --8323329-2006008604-1796043946=:3554--