From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 546593101C2; Sat, 19 Sep 2026 14:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789828810; cv=none; b=N87aYBb3ifDKnMtSBQkPj8C4kCTxymw9H1WnubGdnthMrp4y78rHmhXE8tclfp3/94jtTB9slg2xmT7M7HrmyDjS6+ZR+T3+orX1GtkiY78B/B2NPgnID1IyhjlNPhIYi88mekOQ9rYYCkUIauGXEmv9CPozSME3PKM4/4UdJns= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789828810; c=relaxed/simple; bh=5+wsLqNiz1ftRnY/1v6UHJknDM2g9naN/MHmlwTljBQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eZOKpz8QVv/zTgMT+O+t7jT3zAxjUrLcBhCwL20gFwlMUf7oNpXyyS43VSQB1Gt7XSIkcT9Z3X9Cz0IQ3uFyepGXqD5bdZCrikOuE21sc57SoXcd/SHWRPs1K5qs/CH38n+NY9FOr9b8KhlXfJsL/yvVO30vET2B98smRJzkSd0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bmle4uSt; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bmle4uSt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9816A1F000FF; Sat, 19 Sep 2026 14:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789828808; bh=wjlxL5aZkP+VxdLu3dOkGnCdnF8bXwL4sZrwxhwgEoI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bmle4uStbjC80tnxl/vjfpvmYYVkjjgMRY8+5/8q3PJtzA+t0bmdendomXHO0ws9H U7AkZ01hXjF9UNEcQJjw7O9/G4ZVuIuTmE9nQZ3vbmzWCvaO165TT83I/rtJG67Uk8 ZFOFQWbnJPaWf/uRXVtzgN/37w3mP1J0r/35iCXOcKYjsonGbQyJWBByqZl7EDsn8A AoQzM7VokTP4qPCH98a+dd0vu239lXSc8hrSG3iX73m64ZC18rGxk7qnPGd28l/Jyx Wc2TmR6JoQ+w2Nml9DQH/pX6LYALY6ZyyxX+/DvfhQiCD1q+q2+EZx1en4Sr/c+Iwd Sv6mRmehV0F6A== Date: Sat, 19 Sep 2026 15:39:53 +0100 From: "Lorenzo Stoakes (ARM)" To: Nathan Chancellor Cc: Nicolas Schier , Kees Cook , Linus Torvalds , Nick Desaulniers , Bill Wendling , Justin Stitt , Masahiro Yamada , Alexey Gladkov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Catalin Marinas , Will Deacon , Mark Rutland , Ard Biesheuvel , Ilias Apalodimas , Josh Poimboeuf , Peter Zijlstra , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?utf-8?B?w5Z6a2Fu?= , Jonathan Corbet , Randy Dunlap , "Gustavo A. R. Silva" , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Jens Axboe , linux-hardening@vger.kernel.org Subject: Re: [PATCH v3 01/20] kbuild: do not allocate .modinfo in vmlinux Message-ID: References: <20260917-build-speedup-v3-0-9ecf4163ff36@kernel.org> <20260917-build-speedup-v3-1-9ecf4163ff36@kernel.org> <202609170950.480F90A28@keescook> <20260918005142.GA1585590@ax162> <20260918-meek-spectral-nightingale-53d88d@l-nschier-aarch64> <20260918214445.GA3589065@ax162> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260918214445.GA3589065@ax162> On Fri, Sep 18, 2026 at 02:44:45PM -0700, Nathan Chancellor wrote: > On Fri, Sep 18, 2026 at 07:09:30PM +0200, Nicolas Schier wrote: > > Yes, thanks. Looks good to me and I think it's a good idea to apply > > that patch first. > > > > for Nathans patch: Reviewed-by: Nicolas Schier > > Thanks, I have pushed this to kbuild-next-speedups as > > 36d4a11b56aa ("kbuild: Remove alignment on .modinfo section") > > which Lorenzo can base on. I have also tentatively included the patches Ack, will rebase future revisions on this patch. > that are basically ready in my eyes based on consensus and review so far > for initial build testing. I do see some comments on some of those > patches though, so I will hold off on fully applying them until the next > revision. If there are any other changes that we should consider taking > quickly on the next revision, please feel free to point them out, it is > a bit hard to follow these threads sometimes :) Thanks :) > > [1]: https://git.kernel.org/kbuild/l/kbuild-next-speedups > > > [ Lorenzo's patch, updated by Nathan ] > > [...] > > > diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux > > > index 6833b517cacb..95b523fe4f9e 100644 > > > --- a/scripts/Makefile.vmlinux > > > +++ b/scripts/Makefile.vmlinux > > > > [...] > > > @@ -103,10 +100,7 @@ vmlinux: vmlinux.unstripped FORCE > > > # --------------------------------------------------------------------------- > > > > > > quiet_cmd_modules_builtin_modinfo = GEN $@ > > > - cmd_modules_builtin_modinfo = $(cmd_objcopy); \ > > > - chmod -x $@ > > > - > > > -OBJCOPYFLAGS_modules.builtin.modinfo := -j .modinfo -O binary > > > + cmd_modules_builtin_modinfo = $(OBJCOPY) -O binary -j .modinfo --dump-section .modinfo=$@ $< /dev/null > > > > By shifting from "$(cmd_objcopy)" to "$(OBJCOPY) + args", > > $(OBJCOPYFLAGS) is dropped. It this by intention? > > I am not sure it matters in this case since I don't think there are > global OBJCOPYFLAGS, I only see instances that come from specific rules > but I might be missing something. OBJCOPYFLAGS is exported from the top level Makefile: 655:export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS KBUILD_LDFLAGS And is set by various arches e.g.: arch/csky/Makefile 2:OBJCOPYFLAGS :=-O binary arch/mips/Makefile 348:OBJCOPYFLAGS += --remove-section=.reginfo arch/openrisc/Makefile 20:OBJCOPYFLAGS := -O binary -R .note -R .comment -S arch/sh/Makefile 79:OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \ -R .stab -R .stabstr -S arch/s390/Makefile 123:OBJCOPYFLAGS := -O binary And none of this should impact .modinfo, and if it did it'd be broken as then .modinfo would be different for one arch and not the others. > > -- > Cheers, > Nathan -- Cheers, Lorenzo