From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A74D525634; Sun, 6 Apr 2025 18:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743965486; cv=none; b=krZtM/lZx80xr0ifk2hc6ASeJt2SE5527Q/EutDZecRj6nAPNIEJx8+s3gCBy9F+hV8jqdUV+HmGfWcxlL8XCXSIovQvO8j81IQlm9bhU5tRPNZoFGRTzl41RbtfPwXzMyb1LLlMB3SxoqymotceXDq0DTW/uLBRIFcZpbmKSFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743965486; c=relaxed/simple; bh=CT7VH8lT/JzXbkz7oy9ZRmE+XEGESB2lfJrCxuVOh6M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bCActv8hE1rdVN60fjSeDf24PTV9zyDAPaKKPF8OrEo2D02iXEPRlHACSjRnuBKY05CX9pZT7DPGzj1BzpSZs/D1HkgXNZrEp/SQ7Y5W6RYpL5Fj/jZxxWUWIsRF3v+GVJrUhVAkRgTP5lG3HahGeRDG3gtJuv+PdVhZcYJQis8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pXiFq8Nn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pXiFq8Nn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11DABC4CEE3; Sun, 6 Apr 2025 18:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743965486; bh=CT7VH8lT/JzXbkz7oy9ZRmE+XEGESB2lfJrCxuVOh6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pXiFq8NnzeA070oRtEG2Z/cTdtC/0gjblZCoCil5hLwLjarkC+th9ZwRfIsOx00tv bomEnkNK/nppLFCyJ0YDy9qftR7KKd4iqoXlneHX6dkYYyDAElBGKYyChNya1ZzyOA HYpstoEOvjrit7dQZL8WEofWSUkn7gsYiqisudkka+doKtYl+DVcZdbYD+R4HjXxJ/ RWmMdAp/H6NctaQG9FWot/rdzaq5yXDkYO6e6opUds08PPxVT2otV0d0i6JnCvPmWJ yWlb33+Ruat+eHm1v+HrUmOVbhrrq2IfwV85OBhuHQGfXf5fldMn7HeAYMfK69ErNw DhhECKeQoIKog== Date: Sun, 6 Apr 2025 20:51:16 +0200 From: Ingo Molnar To: Ard Biesheuvel Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Ard Biesheuvel , Tom Lendacky , Dionna Amalie Glaze , Kevin Loughlin Subject: Re: [RFC PATCH 5/6] x86/boot: Move early kernel mapping code into startup/ Message-ID: References: <20250401133416.1436741-8-ardb+git@google.com> <20250401133416.1436741-13-ardb+git@google.com> 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: <20250401133416.1436741-13-ardb+git@google.com> * Ard Biesheuvel wrote: > From: Ard Biesheuvel > > The startup code that constructs the kernel virtual mapping runs from > the 1:1 mapping of memory itself, and therefore, cannot use absolute > symbol references. Move this code into a separate source file under > arch/x86/boot/startup/ where all such code will be kept from now on. > > Since all code here is constructed in a manner that ensures that it > tolerates running from the 1:1 mapping of memory, any uses of the > RIP_REL_REF() macro can be dropped, along with __head annotations for > placing this code in a dedicated startup section. > > Signed-off-by: Ard Biesheuvel > --- > arch/x86/boot/startup/Makefile | 2 +- > arch/x86/boot/startup/map_kernel.c | 232 ++++++++++++++++++++ > arch/x86/kernel/head64.c | 228 +------------------ > 3 files changed, 234 insertions(+), 228 deletions(-) So this patch breaks the x86-64 allmodconfig build: ERROR: modpost: "page_offset_base" [arch/x86/crypto/aegis128-aesni.ko] undefined! ERROR: modpost: "vmemmap_base" [arch/x86/crypto/aegis128-aesni.ko] undefined! ERROR: modpost: "page_offset_base" [arch/x86/crypto/aesni-intel.ko] undefined! ERROR: modpost: "vmemmap_base" [arch/x86/crypto/aesni-intel.ko] undefined! I suppose EXPORT_SYMBOL() in the new startup code isn't properly extracted? Thanks, Ingo