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 E1F5DC6FD19 for ; Mon, 6 Mar 2023 10:05:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230219AbjCFKFy (ORCPT ); Mon, 6 Mar 2023 05:05:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230199AbjCFKFt (ORCPT ); Mon, 6 Mar 2023 05:05:49 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74931F5F3 for ; Mon, 6 Mar 2023 02:05:45 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id j3so5252450wms.2 for ; Mon, 06 Mar 2023 02:05:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678097144; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OJlcjxfKw8jXMW5N6Ul3wEtOotHt+pEdQ/DGM7xaX10=; b=JEqgx1ClmnhOe6ebVyq1YqTIUhSXqSCUzyVnszcOp7awHNdT/xsM+7rlI1qdGO+YiE slQ76DmA72N+jgwPU2NK3rXaHYk02KROwM+j5UoVlE6/S84CO+vB/F3BWaDO7xRB2RIG of8yuUcFzP4Tre4cToIWTCOQJWBuRErMO44gEIuUiHYSd2Cn7gaTQDsMMDbVeLzUpjB4 mzd55rdVRoXyW887zexXWxI8zSMxD3E76H/lTdsw61lekuH6TU9lFSZs1SwhjoOVi1uJ k2ny/foI2AfuKjMCphWC6FEhY+VrVHZTIxhlexwMTUthb5QjBCQqbA/uzSZiUyHHThiI YNPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678097144; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OJlcjxfKw8jXMW5N6Ul3wEtOotHt+pEdQ/DGM7xaX10=; b=8Eei4ngB0xh6QLIRnjtDLrcuw2fPe2yj2NpCSC//JY5d7yo0CUQOSu0CuKxZ3SRc0W F6/MC3IfsDvajV+Q/IG90T2tzvN3wY6U4B2ZByOlm9VEP/2GJX5TWYfjONVS0k7OT30Z 2AVcMfeKph1R14bZCCqkRUfx0A8n79l9a6YKeNaR2dkREdXMmH7WL9xiKelKM+MckIgO Dl0EfV5nwMbl51TRnVjlmLXgzxfahE5nwQjVUDuwaWxjyVyvU4RxaOpdQS2F0+Fkfvkj V5HpmLFNSMxSlQR6wjKet6tYtYHr2Fg01ihk9aqFmrlpdF8LW25GETUUTGc+W1Mq/vlE hm5w== X-Gm-Message-State: AO0yUKX1pU4CIT2HPrNw7J1r33DviQcnZmdA+WeL2WckJAqBDRChk6Wt 5yzTxfsMyA8P2N2k0dJnkF7vYA== X-Google-Smtp-Source: AK7set99ZkofQ6d3rgbVc8vHPZA3jk10S3lFiRC/cDNeG2Kooe0Xt+AMGkkoqceiwIcjL4YA9m24iQ== X-Received: by 2002:a05:600c:45c8:b0:3ea:ed4d:38fc with SMTP id s8-20020a05600c45c800b003eaed4d38fcmr9291657wmo.31.1678097144359; Mon, 06 Mar 2023 02:05:44 -0800 (PST) Received: from alex-rivos.ba.rivosinc.com (amontpellier-656-1-456-62.w92-145.abo.wanadoo.fr. [92.145.124.62]) by smtp.gmail.com with ESMTPSA id p8-20020a05600c2e8800b003e2066a6339sm9863700wmn.5.2023.03.06.02.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 02:05:43 -0800 (PST) From: Alexandre Ghiti To: Greg KH , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Geert Uytterhoeven , Michal Simek , Thomas Bogendoerfer , "James E . J . Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Chris Zankel , Max Filippov , Arnd Bergmann , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH v5 00/26] Remove COMMAND_LINE_SIZE from uapi Date: Mon, 6 Mar 2023 11:04:42 +0100 Message-Id: <20230306100508.1171812-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This all came up in the context of increasing COMMAND_LINE_SIZE in the RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the maximum length of /proc/cmdline and userspace could staticly rely on that to be correct. Usually I wouldn't mess around with changing this sort of thing, but PowerPC increased it with a5980d064fe2 ("powerpc: Bump COMMAND_LINE_SIZE to 2048"). There are also a handful of examples of COMMAND_LINE_SIZE increasing, but they're from before the UAPI split so I'm not quite sure what that means: e5a6a1c90948 ("powerpc: derive COMMAND_LINE_SIZE from asm-generic"), 684d2fd48e71 ("[S390] kernel: Append scpdata to kernel boot command line"), 22242681cff5 ("MIPS: Extend COMMAND_LINE_SIZE"), and 2b74b85693c7 ("sh: Derive COMMAND_LINE_SIZE from asm-generic/setup.h."). It seems to me like COMMAND_LINE_SIZE really just shouldn't have been part of the uapi to begin with, and userspace should be able to handle /proc/cmdline of whatever length it turns out to be. I don't see any references to COMMAND_LINE_SIZE anywhere but Linux via a quick Google search, but that's not really enough to consider it unused on my end. This issue was already considered in s390 and they reached the same conclusion in commit 622021cd6c56 ("s390: make command line configurable"). The feedback on the v1 seemed to indicate that COMMAND_LINE_SIZE really shouldn't be part of uapi, so this now touches all the ports. I've tried to split this all out and leave it bisectable, but I haven't tested it all that aggressively. Changes since v4 : * Add my own SoB as suggested by Geert * Add riscv patches as suggested by Björn * Remove "WITH Linux-syscall-note" from new setup.h not in uapi/, as suggested by Greg KH, his quoted answer below: "The "syscall note" makes no sense at all for any files not in the uapi/ directory, so you can remove it just fine as that WITH doesn't mean anything _UNLESS_ the file is in the uapi directory." Changes since v3 : * Added RB/AB * Added a mention to commit 622021cd6c56 ("s390: make command line configurable") in the cover letter Changes since v2 : * Fix sh, csky and ia64 builds, as reported by kernel test robot Changes since v1 : * Touches every arch. base-commit-tag: next-20230207 Alexandre Ghiti (2): riscv: Remove COMMAND_LINE_SIZE from uapi riscv: Remove empty Palmer Dabbelt (24): alpha: Remove COMMAND_LINE_SIZE from uapi arm64: Remove COMMAND_LINE_SIZE from uapi arm: Remove COMMAND_LINE_SIZE from uapi ia64: Remove COMMAND_LINE_SIZE from uapi m68k: Remove COMMAND_LINE_SIZE from uapi microblaze: Remove COMMAND_LINE_SIZE from uapi mips: Remove COMMAND_LINE_SIZE from uapi parisc: Remove COMMAND_LINE_SIZE from uapi powerpc: Remove COMMAND_LINE_SIZE from uapi sparc: Remove COMMAND_LINE_SIZE from uapi xtensa: Remove COMMAND_LINE_SIZE from uapi asm-generic: Remove COMMAND_LINE_SIZE from uapi alpha: Remove empty arc: Remove empty m68k: Remove empty arm64: Remove empty microblaze: Remove empty sparc: Remove empty parisc: Remove empty x86: Remove empty xtensa: Remove empty powerpc: Remove empty mips: Remove empty s390: Remove empty .../admin-guide/kernel-parameters.rst | 2 +- arch/alpha/include/asm/setup.h | 4 +-- arch/alpha/include/uapi/asm/setup.h | 7 ----- arch/arc/include/asm/setup.h | 1 - arch/arc/include/uapi/asm/setup.h | 6 ----- arch/arm/include/asm/setup.h | 1 + arch/arm/include/uapi/asm/setup.h | 2 -- arch/arm64/include/asm/setup.h | 3 ++- arch/arm64/include/uapi/asm/setup.h | 27 ------------------- arch/ia64/include/asm/setup.h | 10 +++++++ arch/ia64/include/uapi/asm/setup.h | 6 ++--- arch/loongarch/include/asm/setup.h | 2 +- arch/m68k/include/asm/setup.h | 3 +-- arch/m68k/include/uapi/asm/setup.h | 17 ------------ arch/microblaze/include/asm/setup.h | 2 +- arch/microblaze/include/uapi/asm/setup.h | 20 -------------- arch/mips/include/asm/setup.h | 3 ++- arch/mips/include/uapi/asm/setup.h | 8 ------ arch/parisc/include/{uapi => }/asm/setup.h | 2 +- arch/powerpc/include/asm/setup.h | 2 +- arch/powerpc/include/uapi/asm/setup.h | 7 ----- arch/riscv/include/asm/setup.h | 7 +++++ arch/riscv/include/uapi/asm/setup.h | 8 ------ arch/s390/include/asm/setup.h | 1 - arch/s390/include/uapi/asm/setup.h | 1 - arch/sh/include/asm/setup.h | 2 +- arch/sparc/include/asm/setup.h | 6 ++++- arch/sparc/include/uapi/asm/setup.h | 16 ----------- arch/x86/include/asm/setup.h | 2 -- arch/x86/include/uapi/asm/setup.h | 1 - arch/xtensa/include/{uapi => }/asm/setup.h | 2 +- include/asm-generic/Kbuild | 1 + include/{uapi => }/asm-generic/setup.h | 0 include/uapi/asm-generic/Kbuild | 1 - 34 files changed, 40 insertions(+), 143 deletions(-) delete mode 100644 arch/alpha/include/uapi/asm/setup.h delete mode 100644 arch/arc/include/uapi/asm/setup.h delete mode 100644 arch/arm64/include/uapi/asm/setup.h create mode 100644 arch/ia64/include/asm/setup.h delete mode 100644 arch/m68k/include/uapi/asm/setup.h delete mode 100644 arch/microblaze/include/uapi/asm/setup.h delete mode 100644 arch/mips/include/uapi/asm/setup.h rename arch/parisc/include/{uapi => }/asm/setup.h (63%) delete mode 100644 arch/powerpc/include/uapi/asm/setup.h create mode 100644 arch/riscv/include/asm/setup.h delete mode 100644 arch/riscv/include/uapi/asm/setup.h delete mode 100644 arch/s390/include/uapi/asm/setup.h delete mode 100644 arch/sparc/include/uapi/asm/setup.h delete mode 100644 arch/x86/include/uapi/asm/setup.h rename arch/xtensa/include/{uapi => }/asm/setup.h (84%) rename include/{uapi => }/asm-generic/setup.h (100%) -- 2.37.2