Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp617362rdh; Thu, 26 Oct 2023 10:50:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEc0mzHba3zChZOmkLvwbe2hqXRh+lPEIR6rt60eViWdIII7bcMRQQfqjaoDH/K52RGg0Gx X-Received: by 2002:a05:6808:1441:b0:3a9:bb08:d468 with SMTP id x1-20020a056808144100b003a9bb08d468mr76383oiv.55.1698342602151; Thu, 26 Oct 2023 10:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698342602; cv=none; d=google.com; s=arc-20160816; b=R3HV9MjxSVYfAWbqUMHoP8TxpbEvm7cPRYcOlfBoSvpR3XkX/Kv9jGsURrHZ/SPABn yKtXASe1DitvPt8NDeZGJPj+q+pCJibU6fVTV8Yf0H78H8Shed//0I1TfiFyhpdYmj5I P3XHQUS/2EsHKL2777bV8hD6gwD/o2uG0Oin5x04xbV1p79cIq24kjOOwZvz8MMfwP8S HilXsZKCxude9QC6ZLor56HR0SzACE1X9KdfBrZBK8QvdcfHPttmRCDbgZYQ6T4xK5Xj /8fMDpKAXWFdFqEHTfPtS90pWDCzbBSpjjo2Xgp3XYw6WMVkps3gfrffa2DeN0gYCkyR 2kWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XCBnAelfrExSVbW+xUZ57lPgMmCuRd7/6v3ahFmt0UQ=; fh=UyhpsydE411lkojN02RSvprA1X9Pi8J5sOZvFVTc6so=; b=0METLBFDok+AFyDImP/oGNKLNIPhivyovM8fx26P/CGvJZT33jOVkdjpqkS53oK1+I +ewe0IxJACrWnILd6p/soAIXCdLOZ8RCjRBRrkMPyiR29oigoRJHQPlLgBayNLj05Mot l1M3JCzOTgYG+89BqK9ZFMGEYWcBHwwuwhSI9378UHtHYyT4GZJqFFMqPz/JLivWIkv8 aEOesHapMSJjaMC2N83xn5NJLA8vZPxF+ieC++j3l0ygRuDMriaaD4YFm+Y5Drd/iz61 D//CKrL9NpWc2zw5YuR6mpWjMph4noH+VN0YN5c3JMogcfidJqu1y2aEYvKTN1FnQB0A 7bZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eFjrFq1w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j128-20020a252386000000b00da039bcba55si8195709ybj.526.2023.10.26.10.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 10:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eFjrFq1w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E1ACC8197E83; Thu, 26 Oct 2023 10:49:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbjJZRt6 (ORCPT + 99 others); Thu, 26 Oct 2023 13:49:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230152AbjJZRt5 (ORCPT ); Thu, 26 Oct 2023 13:49:57 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E85D2AC for ; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6b709048f32so1148332b3a.0 for ; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698342594; x=1698947394; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XCBnAelfrExSVbW+xUZ57lPgMmCuRd7/6v3ahFmt0UQ=; b=eFjrFq1w4XMwQ0pGrT9SjS1/cJTmRZf1KchALMHH2vja37ybo9yBGD8g3b109KUjGR 5YFSKf1WbYD9dATk29VqmsiIxHKDdbIVX5E54Fm9tRikbDz0DJUDfrNiYzW0H5M4h0Yl GTX6n8D01O0Bo7d6wxuvomBsZGGN2MctMj1jw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698342594; x=1698947394; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XCBnAelfrExSVbW+xUZ57lPgMmCuRd7/6v3ahFmt0UQ=; b=Z1fRiteI8VaQeXj/aksArW+j6TVTOm83AqB4ujWPFOJgOvf9TzVasy8BcYh59W0prZ QuUpcPiGiLD2/nKZubnPGp1h6Bxqki+6n9MakJGGNkvXuZ8JaF5LPazzC4uYo9ERZF9u 9nAOSpvme2xitUqyYCLDZdaI6r8Q/u9xj1jx2bGL+qeDB2+AF5Cym6ecMdYFDdANl5HK AEe76FQxOM3ZbYiCln8Ihe96EWYtmShcm+4aEA2eYfEAazVl+huJKIoEkhnzGsfIDrii r5KCUFeVC5F8Fk1fklArt2Yz3Xd+eg5kcohf6Y4FL5YuskEqw4QtPJUoyLx+x3tkoe7d fa7Q== X-Gm-Message-State: AOJu0YylE8rtLUUuSloasLZbbK3QnUdF0RvAoZhNxgTH4RMP0gai0D1s 89w+L2BZuoOqCSVEfssl61reAg== X-Received: by 2002:a05:6a00:194c:b0:6bd:f224:c79e with SMTP id s12-20020a056a00194c00b006bdf224c79emr255124pfk.11.1698342594396; Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id k17-20020aa79d11000000b006933866f49dsm11781901pfp.19.2023.10.26.10.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 10:49:54 -0700 (PDT) Date: Thu, 26 Oct 2023 10:49:53 -0700 From: Kees Cook To: Joe Perches Cc: Justin Stitt , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shay Agroskin , Arthur Kiyanovski , David Arinzon , Noam Dagan , Saeed Bishara , Rasesh Mody , Sudarsana Kalluru , GR-Linux-NIC-Dev@marvell.com, Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Louis Peens , Shannon Nelson , Brett Creeley , drivers@pensando.io, "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Ronak Doshi , VMware PV-Drivers Reviewers , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , intel-wired-lan@lists.osuosl.org, oss-drivers@corigine.com, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 0/3] ethtool: Add ethtool_puts() Message-ID: <202310261049.92A3FB31@keescook> References: <20231025-ethtool_puts_impl-v1-0-6a53a93d3b72@google.com> <202310260845.B2AEF3166@keescook> <39ca00132597c0cc4aac4ea11ab4b571f3981bcb.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39ca00132597c0cc4aac4ea11ab4b571f3981bcb.camel@perches.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,URIBL_BLOCKED autolearn=unavailable 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]); Thu, 26 Oct 2023 10:50:00 -0700 (PDT) On Thu, Oct 26, 2023 at 09:33:17AM -0700, Joe Perches wrote: > On Thu, 2023-10-26 at 08:47 -0700, Kees Cook wrote: > > On Wed, Oct 25, 2023 at 11:40:31PM +0000, Justin Stitt wrote: > > > @replace_2_args@ > > > identifier BUF; > > > expression VAR; > > > @@ > > > > > > - ethtool_sprintf > > > + ethtool_puts > > > (&BUF, VAR) > > > > I think cocci will do a better job at line folding if we adjust this > > rule like I had to adjust the next rule: completely remove and re-add > > the arguments: > > > > - ethtool_sprintf(&BUF, VAR) > > + ethtool_puts(&BUF, VAR) > > > > Then I think the handful of weird line wraps in the treewide patch will > > go away. > > > > Perhaps this, but i believe spatch needs > --max-width=80 > to fill all 80 columns Ah, yeah. Default is 78. Current coding style max is 100... I'll adjust my local wrappers. -- Kees Cook