Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14106170rwb; Sun, 27 Nov 2022 17:44:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf41AlDaKyFUDhxryi3E1uaE8XHoausQtYq/dqeHda1o+YZ2G1J1eZCaFoQy80eZOSKwaA+0 X-Received: by 2002:a63:5d55:0:b0:46e:fd0a:fe7a with SMTP id o21-20020a635d55000000b0046efd0afe7amr26147211pgm.59.1669599886163; Sun, 27 Nov 2022 17:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669599886; cv=none; d=google.com; s=arc-20160816; b=DabfeGLRjE/y1fEPDSLVSrdU1XDzfRnQAQzX1FftQCZMjoHDzRb3IWdyhLvNO913VO qqEpIRsEBrSRiNcMBhPqJvBkQjIZe+NHVvGtIVMCWbjDS5tKQqFsJPti/3wB3vnvvU7f mAEQ9XE1ltGWpjzKm89cL5Tt/0+Vw3i26avpi3F4tTdZL3TWYyy/IY31zmTQznLZW79J UKl/IwZ01PoPy8FNhUIsxLYtxnSrXTXzZnI2yEZ9m1EhgOPgswv4E88yu7VvVjHDmkZl ICUtHpDx6XmprCGMKUvOJe5791Kphv9DT5ymsam/KCknC8VLttDc+2dPk6oRgg3rlYOy A7AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=gJyNVXZ0Nag03x8wF+5JRQFWFO/c5LE8KY9nLBrkk88=; b=SbiImOoAGxd60YXyXit2gALrpAbV6L+Zx5ab1lJX7sCjC6F8fpqu+2xzsT1EIz6DOd dMPcKXBEKJJy6VwnyQ5tnNdn38EdjSY9e9RgPelQcZRQ0rAvFGs8ed/+dGPLn2gfIQ3f P+ut3q8EwgQQoTWvFFzeXs1lpbhfscgZSCd5a95i0D4uJGDkAj3ZRAFzqY4T3V9Q+IF2 V0Cq22fF8ZHT0YOOk1cv5kDBh7xo5/Xy9ZfdaviWLIacc81SfU/mdgEqlow09cPhLsC/ ZEJ2C3nE/TJFtODxXKM4X3QijAVouwBsp1SuJAds0jSK9OKrY5PVd6UPz/J3zCfxvM1Z LlHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a170902728d00b0018958008877si9915523pll.39.2022.11.27.17.44.33; Sun, 27 Nov 2022 17:44:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbiK1BVm (ORCPT + 84 others); Sun, 27 Nov 2022 20:21:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiK1BVk (ORCPT ); Sun, 27 Nov 2022 20:21:40 -0500 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DEB1215; Sun, 27 Nov 2022 17:21:39 -0800 (PST) Received: by mail-pl1-f170.google.com with SMTP id j12so8745297plj.5; Sun, 27 Nov 2022 17:21:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gJyNVXZ0Nag03x8wF+5JRQFWFO/c5LE8KY9nLBrkk88=; b=bLMyj4V5AWVB0OeRG/09OtV3gMmpTuJLlGhu6nz7ssByxfqschyx0S/n3XnkS1gFHu XBhI25l1OTaVevG8WDxxQ2dXXGLC/GT+WbI7bsNMDIhp/wG5F0ILl5LQHK8i6b9mhtnV vy8Fvv78MAU0eQXUUARcKM+ZgI+54eazUdTw3g0pUh89o7xFg4w+5OpBqz2a7Y5cb8T3 jRmVVAYdRvwbjifbvjmw70BIMsEOoGGg17xmpHTSrEDaHwvYz6FJLlf2CFynyl3F9M+Q gH00e42S+H5AMWMe6cnfjtJ1i/bOe2dUG32lMRkQeomRhwPtcrnKeY+Q78WgkjH7ReDb eLNA== X-Gm-Message-State: ANoB5pk3XxOjnKyJ3wPBIPCH1x5Kiad3zHT65tyJSy/sIuVepfgHV3r9 r9CQ8jw9kJ35dsc6/5dmODpMs1uqKzsQlzkD/is= X-Received: by 2002:a17:902:b608:b0:189:7a8b:537d with SMTP id b8-20020a170902b60800b001897a8b537dmr7566610pls.95.1669598498489; Sun, 27 Nov 2022 17:21:38 -0800 (PST) MIME-Version: 1.0 References: <20221104073659.414147-1-mailhol.vincent@wanadoo.fr> <20221126162211.93322-1-mailhol.vincent@wanadoo.fr> <20221126162211.93322-4-mailhol.vincent@wanadoo.fr> In-Reply-To: From: Vincent MAILHOL Date: Mon, 28 Nov 2022 10:21:27 +0900 Message-ID: Subject: Re: [PATCH v4 3/6] can: etas_es58x: export product information through devlink_ops::info_get() To: Andrew Lunn Cc: linux-can@vger.kernel.org, Marc Kleine-Budde , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Saeed Mahameed , Jiri Pirko , Lukas Magel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon. 28 Nov. 2022 at 00:08, Andrew Lunn wrote: > > I checked, none of gcc and clang would trigger a warning even for a > > 'make W=12'. More generally speaking, I made sure that my driver is > > free of any W=12. > > That is good enough for me. > > > I do not care any more as long as it does not result in > > undefined behaviour. > > Agreed. Hopefully sscanf cannot go completely wrong and go off the end > of the buffer. That i would care about. Bit i guess the USB fuzzers > would of hit such problems already. On the surface, the sscanf() seems OK. It will break the while loop when reaching the end of the format: https://elixir.bootlin.com/linux/v6.1-rc6/source/lib/vsprintf.c#L3429 or the end of the string: https://elixir.bootlin.com/linux/v6.1-rc6/source/lib/vsprintf.c#L3501 (I am skipping details here, there are other branches that will break the while loop and all of them look good). And me not being the first person using sscanf(), I hope that if a bug existed, it would have already been spotted by some static analysis/fuzzing/code review :) That said, I think I answered all your comments. Can I get your reviewed-by or ack tag? Thank you! Yours sincerely, Vincent Mailhol