Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2480380rdb; Wed, 4 Oct 2023 02:28:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJJOpG2rUJzronfsKUvdGYQRgP4+1WE+4k9FdYIxtnVq3tC2D42VqIGErtiaj/D6IIqYcy X-Received: by 2002:a17:90a:fe17:b0:274:751a:3f3 with SMTP id ck23-20020a17090afe1700b00274751a03f3mr8191772pjb.7.1696411713465; Wed, 04 Oct 2023 02:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696411713; cv=none; d=google.com; s=arc-20160816; b=BOCTwGn8rrqi+LRO8tQavyKUlXdSbLhmtAZZR8jyZtb6rFzGzmK1dSl2UktJCWER+X /OkORedr0PW4EDnFTUt+udqEtc19fBm6MiSHN3MkaMSeuWvghWiPqRTp0DJtkoj9GVAx YbMJJcUWsADGbcBDDzRxcpNVXMh7/y7JcO/o2tGJop/p3g0QnIxb/LtXXWgWpLBjx13s BmIlHUQf+iUr2oTSH9KATkzwES1RxVWOEH9JeqDOIyIfJ8q6l0bjeGxiYJGJmRI39TIU 0Yv2SQBor2QNFehP5EQAnGq/98jW52DdkcJnDrvgv7bzeSGZN9rpqKTGSZOn+zwtfJcw mtmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KRXKpGBes2rUzzjaWR4OqYKNQnz+8sTz34lO9NeNuWM=; fh=OUfXpiheMtfSjjjiGByCIuWhP+ob4kR9pP4L7Mqh6Kk=; b=TdeT9DTYoGLAqf+pJN6yvZ/UwL7+vV3Hu0A8Bz+xix/EBtxQeus+EPqx8ko24QkWcv 7SAmDrfc4tC6wfbhOlJoa/QuEXk0j6bBkmMiM6u0ktzL5TjmB4QLdIlctKsXDA7MLhWk u94SmHHP2dCxbcHBGLwnzzsKki7jH2zmbw97gKy3QIpfEifaiDvmfbASRKguP1CZYZLj 51xJn10OhajJSgjUwMvSlGRGqZRDgGajefd5UUBzZcug4Cqbn91tQv/apR+j1TiP9gZe 9lpmJLmAWfF9bBsYjUd7qYfMcX8UMmlItOeCFYlM1njqjTjn5bPOfQWL9OOUoMEXsGI9 kiWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=armtjL6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u20-20020a634714000000b00577dd005706si3277207pga.779.2023.10.04.02.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 02:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=armtjL6d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 511B881BB4F9; Wed, 4 Oct 2023 02:28:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241800AbjJDJ2X (ORCPT + 99 others); Wed, 4 Oct 2023 05:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241784AbjJDJ2W (ORCPT ); Wed, 4 Oct 2023 05:28:22 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE38A7; Wed, 4 Oct 2023 02:28:20 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1dd5b98d9aeso385511fac.0; Wed, 04 Oct 2023 02:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696411697; x=1697016497; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KRXKpGBes2rUzzjaWR4OqYKNQnz+8sTz34lO9NeNuWM=; b=armtjL6daOW85htO6dmVOZ0cMkZT5KMwj1b0JmzXfEYZUh0eBW/mKBjVM73hwZF/kR wNdAoMd++OhPVW0gFJpkR0TzAd7mEZxuOspo0q8Gf1MSdkiYymD+ahYFuTncFuVjoZ4I jQ/Py5gd/K4hlxh7gFLSEGT1XfwXiUvFnEFtlb5IN8rkzD7kBtBr96A4oLGR+eVvNw3Z RDBYht/2otzL2J2ZkqnOmRsdeeSuNG3/EOp5rJNIkD0bYYO8WRgyO9Tcv+mPOflKkuT4 6qngFtiNWJMaMFnO3Hj8Qy7t3xgjRrqTdkGdPtb52AD6K9GH/k3KHu0PM00mNHsGptrp yFOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696411697; x=1697016497; h=content-transfer-encoding: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=KRXKpGBes2rUzzjaWR4OqYKNQnz+8sTz34lO9NeNuWM=; b=rub+VUfwFkDzY23Wny3X/fYbSI3uSqozTo3WbH0PiT548UVluFbLRmp2jqRk2jM5oC +LL29PXZc+pabzbcZ11keX9BDQPCk0vBRvinZjEQiDtI/JfhHpQ+UziQIipBB4Is1rse w7np3VmJUTff6BKk0qQLpA54PdEpj2cxoBBQ0YKkUz0QBRBIW5z+PeOKfJQzXoUpw4WH 09Oo7vPN4idMaXyRRtIvT70ymiskB2ApD2ZCqX8dkBwQ8tJLMvSp4uIaETbEBFLjog6i DfNAy9oxbKiAdyKqyZf3vwacNYP1eMf+oEAZ5uTnrSrYEdGH2/At8xoePPODEmbpK+GN +xhg== X-Gm-Message-State: AOJu0Yzga2EWNL/Ech3ZaBoKtqiYMUAgiXajUmzjUpJI+bvhRLfyAEHI HYk27/wB6zGINtjtv8uJu4lYQ8l1DVUk4A2bkRw= X-Received: by 2002:a05:6870:8a12:b0:1dd:611e:d404 with SMTP id p18-20020a0568708a1200b001dd611ed404mr3009612oaq.21.1696411697471; Wed, 04 Oct 2023 02:28:17 -0700 (PDT) MIME-Version: 1.0 References: <20231003130142.2936503-1-andriy.shevchenko@linux.intel.com> <202310031638.D39E80C32B@keescook> In-Reply-To: <202310031638.D39E80C32B@keescook> From: Andy Shevchenko Date: Wed, 4 Oct 2023 12:27:41 +0300 Message-ID: Subject: Re: [PATCH v1 1/1] kernel.h: Move lib/cmdline.c prototypes to string.h To: Kees Cook Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 04 Oct 2023 02:28:31 -0700 (PDT) On Wed, Oct 4, 2023 at 2:39=E2=80=AFAM Kees Cook wr= ote: > > On Tue, Oct 03, 2023 at 04:01:42PM +0300, Andy Shevchenko wrote: > > The lib/cmdline.c is basically a set of some small string parsers > > which are wide used in the kernel. Their prototypes belong to the > > string.h rather then kernel.h. > > > > Signed-off-by: Andy Shevchenko > > I think these should live in string_helpers.h not string.h (which is, in > theory, supposed to be used for the standard C string library functions, > though that's not 100% currently)... These are being used in the early stages where usually we have string.h. So, I would argue, but if you insist, I can move them. What about lib/argv_slit.c then? Because semantically it's quite close to what the lib/cmdline.c is doing. --=20 With Best Regards, Andy Shevchenko