Received: by 2002:a05:7412:9886:b0:f7:18da:975a with SMTP id ji6csp3133853rdb; Wed, 20 Dec 2023 01:55:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYAaPVH6Dqk3ePdtBuTQ3X3ShLN2CKznUkFyByQ3RMFzwFcHqr9s6aXzHTRxPZa1wlGYSX X-Received: by 2002:a05:622a:30a:b0:425:4043:41a1 with SMTP id q10-20020a05622a030a00b00425404341a1mr32592021qtw.77.1703066111807; Wed, 20 Dec 2023 01:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703066111; cv=none; d=google.com; s=arc-20160816; b=gO52wT6T5UVrSV66BOnunB80G1FgFD3lnmZUX3Nvrcg6Yi7cjtYWRqHhdCbY2fjV3m SI4fCRfrz61or8oWeyyYDixCHq3XcLVLh3tNS1r+iZEue+yB/BR9BIb3MZhC/c69LI2D y7ccbIN0FYT0jMw0eg9c356bCfAOfWAGEGspE/2DP2FgfrHve+HLY+5/ddK0m4yQ+/Mz ACpEFq4HZganQ0B15rqZAheIFsyCllvwSyfQQhMwYXm9dRI2lXasWO/4UYFkfhJIGASS T/0Jgi3d35mzfZ3lPNlVUdRNNL5/hObYgfFDX4MKrqHxb9BHm1H87z5InZg9glX62d7d WJfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=mdMl+0w5mxyZ0vTmPRSqUENVLMYM8Y48+3cOXUO3d1Q=; fh=4UQ3bcXAVFg/GB5S5oc1s1xFbPidhileiT0C3N0cOss=; b=Be6x6pJ1rawLPRGJeUki/MQRu13iddROVzBWmsDUHoXjg15z4Y9jmjdT2Yn267QYF9 O3XeFbaOTrPFmL2/XC0aon4e/iQgtPDoN2+Z5WYR0TqnZ/0b92gVtQy+8AlNV+uOvh8r S++4JBRP+r9yPuCNI9xjbiJHCH9Yn0abn/wdadMlHFsuXc2hbYMiZiHhCd27aUfHc16Y NpBmiSsfktsPCBaqcZwNab9nQLyMsrd8pBqpMUWcnEjBdqBN8N16nJzFTNAob2H57l+J /cPQ8TLgjU8/Zp0LTMbYl13nJFWpx9Ue/dhmi7gORtzFtPa21uvUF9cwPJyGGR+glqsw Zo5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gurwpEAI; spf=pass (google.com: domain of linux-kernel+bounces-6661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 cc24-20020a05622a411800b004254bfb3917si31722197qtb.172.2023.12.20.01.55.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 01:55:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6661-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=@gmail.com header.s=20230601 header.b=gurwpEAI; spf=pass (google.com: domain of linux-kernel+bounces-6661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 402301C223F8 for ; Wed, 20 Dec 2023 09:55:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28A012032F; Wed, 20 Dec 2023 09:55:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gurwpEAI" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05F7E2030B; Wed, 20 Dec 2023 09:54:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso6790283a12.3; Wed, 20 Dec 2023 01:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703066096; x=1703670896; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=mdMl+0w5mxyZ0vTmPRSqUENVLMYM8Y48+3cOXUO3d1Q=; b=gurwpEAI/NFkAC5bvXHGPMNY4YIdX64HfClKdjvNiMLsZ4kdkr+/TS83KMBQTbBQiF 98XUWU71B/7vIec1fWDVCvWRR4Eyb0+1xRaihGsa3ydc6rjBJq5qNHlI770IB3PFastK B9f2XVyWBDP51yawXQ+zWzwNBN2LQ1/7Jqiajsb0o7Fj8+y5948fXMEcnk5LvdAFzdNK YDT6gk3q7CMnqwyPVcnZmzFh1yz90A6Yz52fPuiNor3TJOmmKAt54L8f0IOl1UqPsKBE dHmQB357XB6ubBXViqDz1rvw9stiNvX0xuSZ2L5oKkDUZvnhjCbCtOqzc9adDpAN1lD5 uH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703066096; x=1703670896; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mdMl+0w5mxyZ0vTmPRSqUENVLMYM8Y48+3cOXUO3d1Q=; b=FiCWWs1H8jBychos/5g5iKNcO6iQoQ0dHuQsJJYxCs65LcIop5jp31LXLMYLs6BShi Fsj/AMd380HIvpocOSPvjUkZeB39QlRgo/qLpbKorIkWFFjoxg8+T3O/PiaL2mISbvFl fX5Diu5dHHMYB+/Hvqx4Int/MoVfaYCyFTKe4YxXfmUJez5Q9+Ny2woi3TocAxrBVrhL Pzqx+TMGwoBEkF2QE3yVgnO/748gOV4bCXcPM8uJvJHMjpTuBrPkQs27zgwRUOTAueyE x0h/EUREM3feeigTAPUD6WsntK0uiJ5TmQonyuvwvZsAVqytjaW6ZKxMYTdoI7DRqPw8 HveQ== X-Gm-Message-State: AOJu0YxS0To7FWu7ubN0ePN/RxicyYxo38+JuHa/0tfqkoyfOZdyxcId OlOvcFfNAs9+qlJgjD8O+w== X-Received: by 2002:a17:907:86a5:b0:a26:8856:95c with SMTP id qa37-20020a17090786a500b00a268856095cmr1172869ejc.22.1703066096090; Wed, 20 Dec 2023 01:54:56 -0800 (PST) Received: from p183 ([46.53.248.146]) by smtp.gmail.com with ESMTPSA id vq6-20020a170907a4c600b00a1d5444c2cdsm16713510ejc.140.2023.12.20.01.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 01:54:55 -0800 (PST) Date: Wed, 20 Dec 2023 12:54:53 +0300 From: Alexey Dobriyan To: Qu Wenruo Cc: Andrew Morton , linux-btrfs@vger.kernel.org, Christophe JAILLET , Andy Shevchenko , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] lib/strtox: introduce kstrtoull_suffix() helper Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > Just as mentioned in the comment of memparse(), the simple_stroull() > usage can lead to overflow all by itself. which is the root cause... I don't like one char suffixes. They are easy to integrate but then the _real_ suffixes are "MiB", "GiB", etc. If you care only about memparse(), then using _parse_integer() can be arranged. I don't see why not.