Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp704167rdb; Thu, 15 Feb 2024 12:45:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWJPnOB31Zhr0BhiNOhZ8WajxKXiSz8Qb2YRVc0oq5iig9rH7O5XZTD0zsCodCCVZbxrhXltGxOujKrS4mQmZrGQsQLg8EcT6qyoDsnfg== X-Google-Smtp-Source: AGHT+IGREQWzpzjwfRHevMqTzICEfy4oAhe/bw2Bs+y8BHH1BtWsj73Gz1S6t94mlrpBvtfvVWsZ X-Received: by 2002:a17:90a:77cc:b0:299:2f70:6f with SMTP id e12-20020a17090a77cc00b002992f70006fmr503680pjs.40.1708029907929; Thu, 15 Feb 2024 12:45:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708029907; cv=pass; d=google.com; s=arc-20160816; b=0bSDsoWKp3JkabcFhDYX7DB/Q3ndURwqUdP7o46lk46SiN/NI/j4MuB0Dl9YD0b8+v lS4HNA0N8wdLNz4RSLYwhVhSY86MaJIsuC93l0TS7JlswW8IF8y1E6HfoB5+77QIwLi2 ZMnUSHVi40n3wgCJIlOqnivHxaxp1HfSsFI2o0kY0Cexg1bxUOhBHEMFulMC48EyRyML Tdn4LebnsGknP4oGhX+DnIhlqPGgEwmg1WgaA+OeuYSngmtnp8AypLSPCFlAaIorCfIv YCmWZMbyzELSFyzRf9zlvdS2dTsruSe7VvNWmEZtZmDnkGLI4sFwVfYE39usCKhlVcpY cLxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=fF4CYJosd2iSah9wz4jFtr9h13cemZL0kC1QXjjsWLo=; fh=HNPew3q8P66zth+h/nJ/uwnxL/AeqSWSewWs7UHY15Q=; b=v38rFKtzLc1gNl/kpzsG8lYYAHeosB5PZE51uTOCxB2QujJWRlqWjtxo9LTsw8l5Hl pKG7u52fl+LX+WKU1b4L1zymeQHT1Zt0Da1tf/NhyaJu8W1n5AhaPdnEHeMLim8DSm+f urkxJUSHZd/PVytOm2aQVu4frqkdKXE6vCFwO1WlOzBjSauJuka6crZ2gh8MZSM9K63x eeqO2iaW/iVKlj++yeJuE8q4wjQcWHbQeqEOG8vtZMYmd2Cy95p8G1pQLqFNgoVahRKF OQ6NCLfYh4wzmukoA3vqJTJeFG6ycJC9JBf5UlIj7EXYfE5/FjHFXJJZVwz02O7Bfykk IgZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="R4/IGeaS"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-67590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w189-20020a6382c6000000b005cdf9c9b7e3si1700635pgd.179.2024.02.15.12.45.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:45:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="R4/IGeaS"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-67590-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 125B1B22BC9 for ; Thu, 15 Feb 2024 19:34:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 954A213A885; Thu, 15 Feb 2024 19:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="R4/IGeaS" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9D6813A24E; Thu, 15 Feb 2024 19:34:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708025650; cv=none; b=Eq2fQ1PpX36pBgqqRH5U0WPoR+MNoA7F5G4gKoRm8APUl+p7FT95aQhb3LaVprtpx+lPoBlDtF+AUgfsD0Z3oL94j4VBsz0GQm+3ZME74THLSyTMVnEwkjiEHP67An3jD0jbu6xEiboSo6rZniidurAwjfpmK70SY984vmNcKno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708025650; c=relaxed/simple; bh=uI6p2EeYM8i+aIvLwXONNd+KHjJzBDE6AmusnfGfHWU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tC0hVUIuZd8BFz9xcpmVLpgOmyzDZZkvn0JZfvqzVMQcc7KkIeF16biPtzIDXJNOv3VXKv1jYp993J/RtMvS5yiFydUB9hDU6zj9oafg3jvYENgrRKZ0lLzkjlcoazJDJyCtv2dpnwiJdMfom078V/xzesrCbuotMKdktjSdx3Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=R4/IGeaS; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708025649; x=1739561649; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uI6p2EeYM8i+aIvLwXONNd+KHjJzBDE6AmusnfGfHWU=; b=R4/IGeaSNCICSNAnblNjGgyW8AwsURJyNjddio39Gfds1AyOm2KN/J3b VxiBdZbEU9omzd4HpZY4Ex05fFDW0f21eeC9w8IB/tpEYmth1ZZJPw8JV VVBbS3QMoHuoS8SsKh3HfYVWoEWXXwzqZMH9qdEnmVkRLg3VvWkKWgwn3 9tKRbZnMdorXpRUAMW7TRlB0+HYlttYcGYGPywZXRRqVmcyMAw3k5EMOO 6IGIW/mfitYOR7PqVIO10yJSEtWJHTMczlE/OFJF1VswNymsBT7IGzJc4 iMeu7LiPxCPBPDmKtGZXK6xSKpgzgevSqvgcUV98+s1L3etecFOgxtMJl w==; X-IronPort-AV: E=McAfee;i="6600,9927,10985"; a="5948070" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="5948070" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 11:33:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10985"; a="912217507" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="912217507" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 11:33:34 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rahUB-00000004sJI-0qA7; Thu, 15 Feb 2024 21:33:31 +0200 Date: Thu, 15 Feb 2024 21:33:30 +0200 From: Andy Shevchenko To: Kees Cook Cc: Michal Wajdeczko , Jani Nikula , Julia Lawall , Nicolas Palix , cocci@inria.fr, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] cocci: Add rules to find str_plural() replacements Message-ID: References: <20240215180156.work.548-kees@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215180156.work.548-kees@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Feb 15, 2024 at 10:02:00AM -0800, Kees Cook wrote: > Add rules for finding places where str_plural() can be used. This > currently finds: > 54 files changed, 62 insertions(+), 61 deletions(-) Can we extend this to cover string_choices and call the script probably str_choices.cocci ? -- With Best Regards, Andy Shevchenko