From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F482C433EF for ; Wed, 24 Nov 2021 13:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346097AbhKXNVq (ORCPT ); Wed, 24 Nov 2021 08:21:46 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49473 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347696AbhKXNTp (ORCPT ); Wed, 24 Nov 2021 08:19:45 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 53FC75C0095; Wed, 24 Nov 2021 08:16:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 24 Nov 2021 08:16:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WSyhMN v7DKJJ0zodmmUWhnighX/DRJgOPXAnXZvn+rY=; b=ZDBhN9RUlwRj6OztRe+Hqi 1QKUQb6blE/WwcHxYiAvvAruw0GGVaK08jBa7kMOFbESP5kUV8zO57KSHJhs/hi+ ZjGqYL+HNvJuPMR9S+XPKZt2YPgNQyqVgpQMEBDgIqm+GfmtnAyKml8z/z6XT/WQ o1L7v+cxtB3vOEuCrOQpsCJ27Qk/0kxeRCD9ZzXewK9+KUhwdtaI6/1IfXIn2gdi 1kCyRqHRgxOy90/KmEhfS6JBII6+ImXi2y+m/bgBe5opjezBs13WRsJDOWYgUjXt t6VxPyVs4zxRtvWOZiN4GvT+sivPMN5F/NjJcToZlEtQ/DH/wpmmKBIBVsqz1aGw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeekgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepkfguohcuufgt hhhimhhmvghluceoihguohhstghhsehiughoshgthhdrohhrgheqnecuggftrfgrthhtvg hrnheptdffkeekfeduffevgeeujeffjefhtefgueeugfevtdeiheduueeukefhudehleet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguoh hstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Nov 2021 08:16:33 -0500 (EST) Date: Wed, 24 Nov 2021 15:16:29 +0200 From: Ido Schimmel To: David Laight Cc: "netdev@vger.kernel.org" , "davem@davemloft.net" , "kuba@kernel.org" , "nikolay@nvidia.com" , "roopa@nvidia.com" , "bernard@vivo.com" , "mlxsw@nvidia.com" , Ido Schimmel Subject: Re: [PATCH net-next] net: bridge: Allow base 16 inputs in sysfs Message-ID: References: <20211124101122.3321496-1-idosch@idosch.org> <03c0d0b106954d24aba1f7417a41349f@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03c0d0b106954d24aba1f7417a41349f@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Nov 24, 2021 at 12:55:33PM +0000, David Laight wrote: > From: Ido Schimmel > > Sent: 24 November 2021 10:11 > > > > Cited commit converted simple_strtoul() to kstrtoul() as suggested by > > the former's documentation. However, it also forced all the inputs to be > > decimal resulting in user space breakage. > > > > Fix by setting the base to '0' so that the base is automatically > > detected. > > Do both functions ignore leading whitespace? With this patch (kstrtoul): # ip link add name br0 type bridge vlan_filtering 1 # echo " 0x88a8" > /sys/class/net/br0/bridge/vlan_protocol bash: echo: write error: Invalid argument With simple_strtoul: # ip link add name br0 type bridge vlan_filtering 1 # echo " 0x88a8" > /sys/class/net/br0/bridge/vlan_protocol bash: echo: write error: Invalid argument