Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1123582pxf; Fri, 2 Apr 2021 01:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx7g67qbb0+5biwfADaQyB29QcNOnHSsgeIBPVrtFOIIaouQL9MnveWuqJWohsdk+DJqb4 X-Received: by 2002:a05:6602:2110:: with SMTP id x16mr10679751iox.16.1617352905607; Fri, 02 Apr 2021 01:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617352905; cv=none; d=google.com; s=arc-20160816; b=qYbtTGYcAHeX8ysBrUis+UgZog1GdvFpS7VBNzwPi/rVHCZp2W6LvMQbnF17J3dFId UDrRoB5peFOWhqvVme89Sn+q0HO6N2oDo2Jl2zFtZ77LRCjcNX8IX9555kntRAn1LN2b CcTxIM0O060wjj7v71FV8UAMw7zmFVBiPvR1EdMfYxQYoO1TiLpd+OLN3AZrRK/b66Xb P12WSw1SqWR86yq4fOzDF+PPpniDNNUwzNrA1KxyTPM1VqjQi2bjhBVsZ7m7xqpUzvOU jTpd44uzbeke2OMOAsJk4ejuq8vSt7sJYLnsbqTPXl+GiJr4hILPovsC+wZPO429zKzQ /3zQ== 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:dkim-signature; bh=6Oq6IecKAdRhb0vISLYp5X5UHBzYjzxfpkAIMVbe92U=; b=iIAkTww6c7xmW7UPav8BYs8gca8odNKptYuI2alO84GZrckvXToYBmZw8GOfPjzEkK fjtPS3wrSFkibZqxancs4n8EnhYCnMDvcrrE8Bevxa0oakQmWgoNKAxNCexpIT5uvr4B aST4fmqfu/35xeRfpN7GXdw4tbhaNGoK1dZnc+b5i4clvc9y2ZkRR0fOIjg2sWrOAYab qzm5rhBkqcHt51xnFz3zr2TOa1aKT+G2mpHmojScokZ0CeP2D7Geas2qMS20Y7UXBWWk clFXZWOC9CnAg8vrK6NtwPQeVNQzy879T6dZRgUPtSZ5ltIVQwy5SELgwup5PibCsQNH 0NnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fjps3LQD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si7476009jai.126.2021.04.02.01.41.31; Fri, 02 Apr 2021 01:41:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fjps3LQD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbhDBIlQ (ORCPT + 99 others); Fri, 2 Apr 2021 04:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhDBIlO (ORCPT ); Fri, 2 Apr 2021 04:41:14 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C869BC061788 for ; Fri, 2 Apr 2021 01:41:11 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id 7so4732643qka.7 for ; Fri, 02 Apr 2021 01:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Oq6IecKAdRhb0vISLYp5X5UHBzYjzxfpkAIMVbe92U=; b=Fjps3LQD0JVSTFEjcIJsN/pB1IYiA7TeDmRcqH6s+eEYlwyNlSHz9uRMvQ2GLPPIiC l/wX05Tqh0BIrKwfFyba/hVXWtCj6dqOAdWNkCW/Jsbpo6vHVBn1fJVPSLf7SaVBhAyL mEKzmhe7TOP82udk5b4ri0mtvsNWubfjW6dKKg0367P4w0zSCHl+Y7M7DVaMWLfzkY/a PM6O9aMLLhWenH7pWtIX/J6ZWhqxcGqLP3nJB4sugvZ0wJvBVrghMZkCaxRE2nENLKJM w3yaZNMpHhvuDvxcikMZe78A61aD4BVCBJrQX6X7ZjdEJ2MOANUTykWjSoo68oJX8wzP 7WQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Oq6IecKAdRhb0vISLYp5X5UHBzYjzxfpkAIMVbe92U=; b=h3e5hYgaXI1KSw8UYtXKRa4TZ6HLxHufux7wmsUhGCqb35frIrbvy0vi14bF86GapA R4LoMmzq/MHwvp8WFmEWvFbCDLo4v2ySG3MdghuRBBeuW8j8RTAbY1eXmDtkut2ApIFK aFdvhkHVOgx44dXf6aPBbYjDz5AS72NSbqXZlY3Bj9SgEuEOKxmeV+G+Ek3+XT8In6H4 S9ANNJUkjgXl9zVgKjJi5ts0W/MF+cNaHl9xYGVvvyrmHLoP4X9douN795AsjGJYPnQd UfLgKB//hOH9QprKiAZbAIt4StEFkafPG4OZbw1eTYct6yExS/uAvzQKU4ldMt/PqpSk 7Udg== X-Gm-Message-State: AOAM530F4qqtGSV2rFW1efWAbT82o7SiVsm5P7S+WN7dU8JGY3ucJmdH AAeAuYlG2LRTFlBAcqA6DezIjejaxgWonfZCtSsLDQ== X-Received: by 2002:a37:a7cb:: with SMTP id q194mr12418288qke.350.1617352870441; Fri, 02 Apr 2021 01:41:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dmitry Vyukov Date: Fri, 2 Apr 2021 10:40:58 +0200 Message-ID: Subject: Re: [PATCH] riscv: Bump COMMAND_LINE_SIZE value to 1024 To: Palmer Dabbelt Cc: macro@orcam.me.uk, Alex Ghiti , Paul Walmsley , Linux API , linux-riscv , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 2, 2021 at 6:37 AM Palmer Dabbelt wrote: > > On Tue, 30 Mar 2021 13:31:45 PDT (-0700), macro@orcam.me.uk wrote: > > On Mon, 29 Mar 2021, Palmer Dabbelt wrote: > > > >> > --- /dev/null > >> > +++ b/arch/riscv/include/uapi/asm/setup.h > >> > @@ -0,0 +1,8 @@ > >> > +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ > >> > + > >> > +#ifndef _UAPI_ASM_RISCV_SETUP_H > >> > +#define _UAPI_ASM_RISCV_SETUP_H > >> > + > >> > +#define COMMAND_LINE_SIZE 1024 > >> > + > >> > +#endif /* _UAPI_ASM_RISCV_SETUP_H */ > >> > >> I put this on fixes, but it seemes like this should really be a Kconfig > >> enttry. Either way, ours was quite a bit smaller than most architectures and > >> it's great that syzbot has started to find bugs, so I'd rather get this in > >> sooner. > > > > This macro is exported as a part of the user API so it must not depend on > > Kconfig. Also changing it (rather than say adding COMMAND_LINE_SIZE_V2 or > > switching to an entirely new data object that has its dimension set in a > > different way) requires careful evaluation as external binaries have and > > will have the value it expands to compiled in, so it's a part of the ABI > > too. > > Thanks, I didn't realize this was part of the user BI. In that case we > really can't chage it, so we'll have to sort out some other way do fix > whatever is going on. > > I've dropped this from fixes. Does increasing COMMAND_LINE_SIZE break user-space binaries? I would expect it to work the same way as adding new enum values, or adding fields at the end of versioned structs, etc. I would assume the old bootloaders/etc will only support up to the old, smaller max command line size, while the kernel will support larger command line size, which is fine. However, if something copies /proc/cmdline into a fixed-size buffer and expects that to work, that will break... that's quite unfortunate user-space code... is it what we afraid of? Alternatively, could expose the same COMMAND_LINE_SIZE, but internally support a larger command line?