Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp868645rdb; Sat, 6 Jan 2024 13:00:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVWuZ1NMYOQpRzAvc/6P47u4d/UD8kqM3j4kW1K3uQOQGAcaE9n4mpyOTBxzZCXH6RQhFa X-Received: by 2002:ad4:5aad:0:b0:67f:53a:a728 with SMTP id u13-20020ad45aad000000b0067f053aa728mr2466408qvg.50.1704574844847; Sat, 06 Jan 2024 13:00:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704574844; cv=none; d=google.com; s=arc-20160816; b=Zu4i4m9MG7CG/nx+cxypFneTO3VSAgVyWzNgIbR/MxkHrSgx7bD82OGvz1/nX1iYRi s44+fgXpJgdzJzj/3xNedGALcjn6ANrW9Ny7hqcc797LoLllGqI/kICwztnVrbG3wUBU +Re4qFrzVQWfVua8CVSidNEEjtjdUdXc2TuAsPFsp0w2UqgxcvQDwMI0GmrhCEvftcwt mrXFXsEQZQczLTwFHtqSFf/u8t3i4itp4pegLkaIa3DwEzS+8ozBcogVxD3agjU55wit ntuLc2HoZHwOhrm5JGNSrQAhxfE1Rs8hKE+PQzH/8d4aZgXY7Xi1Vq/BTI/KsIH+1j5A 1yCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=vRybF2NFC9jlZRWacqu6bWMvltjg/DL98Cm/HMV1TSw=; fh=EYJHFI3kunRiIZggpQACllPDn8VS3sEmqHW5Ih2HMrk=; b=c10BINvP9DWqwGQDVsC0VhgymygTYHBSj76e6HZfMWHo5j1flr2haN0VSfcJ7AJ4c8 DkUpcCD/7JMu90IgwOsoI1gJZf8O6k0K0nq5Ti+XZxfgWvb+JWvasoHgA8IqlOEN68Hk y0rt5k/QXTpRhBNECdRw5a7p9I+zOL2bkVhMSwg7QyEZZsDpLe6Vs2mkEBHzHpztha9D BTveyNY/J2bk52ookM+/FWOvJLLjMIgrmSJwDVkCp7QovhXBPVaKjT7CWMOqHp2LLd6f bz2mhKYEFDYHr9FRt2zQjprzzURMhSX93E9ndRJ3F5eXlK9FKRnhQS98j5AOdmZa2RWL 3v4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.com header.s=s31663417 header.b=YMUmvnwW; spf=pass (google.com: domain of linux-kernel+bounces-18713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r10-20020a0ccc0a000000b0067f756eb9f9si4638523qvk.226.2024.01.06.13.00.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 13:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.com header.s=s31663417 header.b=YMUmvnwW; spf=pass (google.com: domain of linux-kernel+bounces-18713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 947F81C20F17 for ; Sat, 6 Jan 2024 21:00:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CDE50F9CE; Sat, 6 Jan 2024 21:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.com header.i=quwenruo.btrfs@gmx.com header.b="YMUmvnwW" X-Original-To: linux-kernel@vger.kernel.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 B1A66E575; Sat, 6 Jan 2024 21:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.com; s=s31663417; t=1704574717; x=1705179517; i=quwenruo.btrfs@gmx.com; bh=q8kMFaYUTh0daI3iKSMpizdypHcTuUe091zMsPWVA7o=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=YMUmvnwWRYWPC1YGxp+W6l0N32b1yaxD8jkLg8KWqXF9bfFmsoT0+sF1+IvmW/v6 fmA0WUMMdVZmsJTSxY7re4/ygV7zHzZ2uhzVb3gPgmOQhVD1APjqMqxOUuViMw6KR aJ5OQBXZP8qyaP74neY/q1/6wp43pYtLaKG06k8HSPr3YiLaaUnWz66xuGCA3bWeh ubOLzQPi6fb4SY1lB4gC35RXN7z0JY6O58Ig/07WTK2dHXmSD21UWc+6gNa7BWo0Z vsl9jACIiIO9xQA4FGSdLF3CJFn2NNIFyIk1fbnV/vtjY+vuaEupm5MnMtuUx4EGn IUe+IAkbsPNlYRpDTw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [172.16.0.153] ([118.211.64.174]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Msq6C-1r2LNl0Qky-00tFut; Sat, 06 Jan 2024 21:58:37 +0100 Message-ID: <7708fc8b-738c-4d58-b89e-801ce6a4832a@gmx.com> Date: Sun, 7 Jan 2024 07:28:27 +1030 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/4] kstrtox: introduce memparse_safe() Content-Language: en-US To: Andy Shevchenko , Qu Wenruo Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, christophe.jaillet@wanadoo.fr, David.Laight@aculab.com, ddiss@suse.de, geert@linux-m68k.org References: From: Qu Wenruo Autocrypt: addr=quwenruo.btrfs@gmx.com; keydata= xsBNBFnVga8BCACyhFP3ExcTIuB73jDIBA/vSoYcTyysFQzPvez64TUSCv1SgXEByR7fju3o 8RfaWuHCnkkea5luuTZMqfgTXrun2dqNVYDNOV6RIVrc4YuG20yhC1epnV55fJCThqij0MRL 1NxPKXIlEdHvN0Kov3CtWA+R1iNN0RCeVun7rmOrrjBK573aWC5sgP7YsBOLK79H3tmUtz6b 9Imuj0ZyEsa76Xg9PX9Hn2myKj1hfWGS+5og9Va4hrwQC8ipjXik6NKR5GDV+hOZkktU81G5 gkQtGB9jOAYRs86QG/b7PtIlbd3+pppT0gaS+wvwMs8cuNG+Pu6KO1oC4jgdseFLu7NpABEB AAHNIlF1IFdlbnJ1byA8cXV3ZW5ydW8uYnRyZnNAZ214LmNvbT7CwJQEEwEIAD4CGwMFCwkI BwIGFQgJCgsCBBYCAwECHgECF4AWIQQt33LlpaVbqJ2qQuHCPZHzoSX+qAUCY00iVQUJDToH pgAKCRDCPZHzoSX+qNKACACkjDLzCvcFuDlgqCiS4ajHAo6twGra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rrD In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jzsjw6N+nkYBtBUo8TeUj/nImXMjGzZkF4q87f2bxzL/n4qFIUn T+ggO+aWnkHu4MQv/w1ircSIcOiQ8luYDoccBBlJQJX8qG+45objSsB7C+TqISDnangino6 /G/EXgArbQeHv4/TaBHbwp+JAKH4BWZ/BI7KmfwpYrnsVj2FDsdwwKIeeiCSDOmOGad6G9W p/RQgcCvNohiuxlj7IHfg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TD8zMtWHZ9A=;DD1MjWag+zbXE0ueYEvBgdfdlOJ GQ2qRVdqw3dyB+znbAiRJ0ADVH5b2/jKv/YoWHA4x3uOJEE4x7aaL6mY6uCTZNlRLNKAFdkCq CO0jPZt1apTqp8UH6h0pmDw9HoCCrC6qmx0ApH6xGTR/dkURRQB79RO5OhNiw3rFtqTrkfTxk TDn+0uVolXhJYibOIiWpTgYeqsRayzMiZRDmTsyrOV9brMtlFCf7hQ43VKHsjDyIXE+r/Cgy7 QnlO/COTcthibcRSw1k89UtGlkr0R6MClhfUjTSTdvM2lssQ5yEd+p49Z1RdsIA8cnM8Xewzs MZl66mlszqiMuk6FV6TB82s17dThGaIhmDgyUHmhq4pU+8kQopC4xJ3PpstdlUl12evuPB6CU rUgI0qllZaE71Zqj+QjOS7O4jXcoC+iB6chkj0sn6MUhkRIgLDc8ElmBtU+s8lOy+PGsZ/jlf C/WdXtW9CMe3zVvLb6GBwNsnRVKuqttdXzs1JdgmoGtNrKnF2yvovnkuNuRj5GpB6VGZG/57Z aaIYHi9ONtsM5V/JGkqFttfO/60L8gaY1DTbmJf4eEiZXg8Ix2WXN6/KrzPrAHcXw4n1f+uVK F9L5k2clvbMXvDUZdEgSLDETTo++pXnFQku5XXT+DueNd3fsa1erOi6nv9mZOEnTYvA+GjUyI MoY5GUOResTISrVksxL6XguUrWvQRltbiQ5Wp02+lzt8535wpDlv41Cc1C2M/khsxsudTyXxQ Mt8r2HgHaayJfJvVDNwX7q4Vd9AY92LSKkdI1xG2PbhbYIydzft2qTsBDIqW+v5NV0Z5Q9eC6 AO60521eZlSxgteZkPpBZnqCbN9iQMTN0nd9JFfWWUAPHakoKwK6yTbIyj98+rQUihUboaSEG xC6E7DjLfa746I2JlZO7YZ1+VsNg3FEjZmZTXPi/pBbYPWRpSnobd7FiAuVyKT4vnG6kxMLAM Sitb2Q== On 2024/1/7 01:04, Andy Shevchenko wrote: > On Thu, Jan 04, 2024 at 09:57:47AM +1030, Qu Wenruo wrote: >> [CHANGELOG] >> v3: >> - Fix the 32bit pointer pattern in the test case >> The old pointer pattern for 32 bit systems is in fact 40 bits, >> which would still lead to sparse warning. >> The newer pattern is using UINTPTR_MAX to trim the pattern, then >> converted to a pointer, which should not cause any trimmed bits and >> make sparse happy. > > Having test cases is quite good, thanks! > But as I understood what Alexey wanted, is not using the kstrtox files f= or this. > You can introduce it in the cmdline.c, correct? Just include local "kstr= tox.h". Not really possible, all the needed parsing helpers are internal inside kstrtox.c. Furthermore, this also means memparse() can not be enhanced due to: - Lack of ways to return errors - Unable to call the parsing helpers inside cmdline.c Thanks, Qu > > I'm on leave till end of the month, I'll look at this later. >