Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp434636rdg; Tue, 10 Oct 2023 15:07:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExXQv3EmCXnEEDS5EyqwnuIET6GKlO8p7yNbHtTwYfGMNF9oIA8mV6A72WUnPOcHJvo73p X-Received: by 2002:a17:90a:df8b:b0:27c:e344:c180 with SMTP id p11-20020a17090adf8b00b0027ce344c180mr2928377pjv.22.1696975626282; Tue, 10 Oct 2023 15:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696975626; cv=none; d=google.com; s=arc-20160816; b=uHvJY7Jv3vM96amctCcNe3opiihYjI3it7vvFkh4+P9Pt/ntT20o6a8vvxNWNcnBNo 9h8AuetOdGtNqB3laua/AhSu7Q9YJj07kulASk78c8CJKbhH02r+x8q6D8mLLEpz3JQh xqXO+Lz3SL6AyVfWDMBKGeJPuc5j7ZTP9QzOEJ/6oigSmiXUhw5dxB7NFkppwnDp07nz S8+NnNNejC/kotBN53WqMNmwpx9OF+y6b+xfM8zLWYWcgIIpxvzfvU3+3w1PjPKmBiWb pJ/OEYx4f9SOgr1ROe5y1jvfImN3ieorgyz964ampkZ+bppuphbEksqIwq020FXBTyB/ wHsg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Y/MtUEsTq6TBJZ5QdmQcvP3bfZZajTpabyqFCb9A1sU=; fh=3nnB/DuDsmknyVWLINLi5pk0CXHrcoS49Mj9/AnMnvU=; b=IihZxNlq6vz0FGh2aUXrxmeDGd3Vqwz+fQJKNvzVKqT8tDuv69NPZHc0Znf3b2Ndy9 jfO3TRf2NJcSMaEzJ+tYzTONSrfpph70yket24RwmWL6MWYxc6kNLX8aaqVZZOV/5Imb cmZpCNqpNXDL0M+9YUTPXzkiKddc4m5P8WeJkXQYPOOL1775CXTzHx5AJEsp765b/vZz LJEwnGBjnw3TdS51Lcg2JNwdE4htNiQj9+QR+DleY46LYwEe2HQiX766JVpnXRvvnEwT XJdrwbROfPjq+NhQ55f2JQkbVi9nfW+YR1Ka95K9zYbr5tMFKTvM+CyN+z5K5E2e4Vg5 EziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HGALKM1v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id mq8-20020a17090b380800b0027b436159b0si8843516pjb.165.2023.10.10.15.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 15:07:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HGALKM1v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 1A687803EBAC; Tue, 10 Oct 2023 15:07:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231343AbjJJWGw (ORCPT + 99 others); Tue, 10 Oct 2023 18:06:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230418AbjJJWGu (ORCPT ); Tue, 10 Oct 2023 18:06:50 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E34398; Tue, 10 Oct 2023 15:06:48 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9b1ebc80d0aso1046618666b.0; Tue, 10 Oct 2023 15:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696975606; x=1697580406; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Y/MtUEsTq6TBJZ5QdmQcvP3bfZZajTpabyqFCb9A1sU=; b=HGALKM1vPMzkKXk2UECPz5ZY0Dee4o/7GoE5McygB57oEz/gUHjH32TZ9YkkB48xqo GHYNg8VZok38z0keOe0OMRVX9VUGnpXOS9+Q8F0xu6EpPAfh29qV/fgJcDm5lbPtV7v0 EJQVMZB3RCEPas5/3KYbd3hjcYvJfjej0YqJSGJ4zKXOeo/yL257LhaaG2YxOaZLUWJQ 4QPdnG+0YaNUV/VKHkrwQfEBQRRxJbBXPrauzOmRh7FWHThCOJqySKhc4daiJWQo6XKq f3JMhxi5fJDTf7YiSLATYqFflEzDdxh2qJSGxmnunkTgBrcoU3EXlymLZtAhoAW0w1OD 6ZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696975606; x=1697580406; h=in-reply-to:content-transfer-encoding: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=Y/MtUEsTq6TBJZ5QdmQcvP3bfZZajTpabyqFCb9A1sU=; b=BtzcIJcaXUmBdf3MIanBfq3753dW6pE2hmRydlcPAuSVgNbyW1hrU5/iMSF7jWqVY2 W62ObEgSEv0Jn9CnuHdFZiRQjmibLB5Z87HdQqHM2E1S9PkSEEelfrdNHQ5VxSB/JNZf J/rKe4Q4tHo7JokzvQN694etXU/IAt3Dfq7fmepOazilhd7qmp31F6fYECkOvPPUp6AA taDd1zHhZflvFvfjl5YHbChHUlfSGP2oEp4UEJUEjRq0ZwysFytCz97E1rxTiixbGF5O 7P2sAeau+fl9MvSLb/jFYPSSwXTy6M0uC3UXk/iZ7AFPmBiQ9PHGGNm7HN0FKC3fJ+cy g7ow== X-Gm-Message-State: AOJu0Yx1GMeyIlB4m8CgDCRTonbnGRJSH1T2BaBkGeE52xe70p1E1BnS 73PRH2hcYIMhrHsHHawEC5s= X-Received: by 2002:a17:906:1097:b0:9ad:be8a:a588 with SMTP id u23-20020a170906109700b009adbe8aa588mr16733832eju.1.1696975606309; Tue, 10 Oct 2023 15:06:46 -0700 (PDT) Received: from skbuf ([188.26.57.160]) by smtp.gmail.com with ESMTPSA id y5-20020a17090629c500b0099bd453357esm8900882eje.41.2023.10.10.15.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 15:06:46 -0700 (PDT) Date: Wed, 11 Oct 2023 01:06:43 +0300 From: Vladimir Oltean To: Justin Stitt Cc: Linus Walleij , Alvin =?utf-8?Q?=C5=A0ipraga?= , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] net: dsa: realtek: rtl8365mb: replace deprecated strncpy with ethtool_sprintf Message-ID: <20231010220643.w5wmaftubiv7yo7t@skbuf> References: <20231009-strncpy-drivers-net-dsa-realtek-rtl8365mb-c-v1-1-0537fe9fb08c@google.com> <20231010110717.cw5sqxm5mlzyi2rq@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 15:07:04 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 02:48:07PM -0700, Justin Stitt wrote: > On Tue, Oct 10, 2023 at 10:36 AM Justin Stitt wrote: > > > Is there any particular reason why you opted for the "%s" printf format > > > specifier when you could have simply given mib->name as the single > > > argument? This comment applies to all the ethtool_sprintf() patches > > > you've submitted. > > > > Yeah, it causes a -Wformat-security warning for me. I briefly mentioned it > > in one of my first patches like this [1]. > > For more context, here's some warnings in the wild: > https://lore.kernel.org/netdev/20231003183603.3887546-3-jesse.brandeburg@intel.com/ > > > > > [1]: https://lore.kernel.org/all/20231005-strncpy-drivers-net-dsa-lan9303-core-c-v2-1-feb452a532db@google.com/ Yeah, ok. It's a false positive warning, but I guess it would be too hard for the compiler to figure that out.