From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E85E5D10BE4 for ; Sat, 26 Oct 2024 05:18:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2A99F6B007B; Sat, 26 Oct 2024 01:18:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 259116B0082; Sat, 26 Oct 2024 01:18:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FA286B0083; Sat, 26 Oct 2024 01:18:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E47DF6B007B for ; Sat, 26 Oct 2024 01:18:16 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0922812135B for ; Sat, 26 Oct 2024 05:17:58 +0000 (UTC) X-FDA: 82714596972.18.4E4CF67 Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) by imf21.hostedemail.com (Postfix) with ESMTP id 3D6051C0019 for ; Sat, 26 Oct 2024 05:17:35 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Ll3RF5u3; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of xur@google.com designates 209.85.166.177 as permitted sender) smtp.mailfrom=xur@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729919723; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iU1QCoLm9SQ+6m7YZluKnFNfn8ZrWd4KaFL5e+lUweo=; b=jzNW4v0AQ4cGVJzyLqWuVURVXcChm0lou9espVOVmpp5I2DhjhkkJSf1zuRqAZPHIGo+sk SGVI+vXTgkPuinS+8XbBQHAtI9USl0vPqIv2GauWphdafEBz4uUVgoP8CkecCYV2IyHrxI 25R2OsFh2Vdjz4Uuo/IqNpue6it7dF8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729919723; a=rsa-sha256; cv=none; b=UjqgVVbabpAMK8gDFWmEd3nAaYNMocdUiLkKsk+TnCB7vnMlo2MEpWbyCOi8ejqrM4eRXx 4Q3izgcP380T2RPNSetQv98v0xYR2yIjSJo6fWH41+dJvnlPLbPjNCbCd+fOG7MT+eiPxg FoFPqf3z8F0nrxmEVcm5UpGnd0rSnmw= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Ll3RF5u3; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf21.hostedemail.com: domain of xur@google.com designates 209.85.166.177 as permitted sender) smtp.mailfrom=xur@google.com Received: by mail-il1-f177.google.com with SMTP id e9e14a558f8ab-3a4e54d3cefso147005ab.0 for ; Fri, 25 Oct 2024 22:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729919893; x=1730524693; darn=kvack.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=iU1QCoLm9SQ+6m7YZluKnFNfn8ZrWd4KaFL5e+lUweo=; b=Ll3RF5u3UUzsXvmbNMM/U+tgb2gb6VHXIPCv1QFTVyRrLfyMM+Uu1bVZlxCTL51mbr NI8sw1EV7o+jO8qXmir0brs5DK2diNAKPZj8Kv1YXTrZ+ZYiEo+GXww/bPRV+9WQisMh pdlqBDWuKKG8gY1mS0DWQhpXpyxO5xIjgmXy75+crcgV9WF+9NXaSRuGGfA0rm0538GJ 2uRjO/X3VHzbjngxygAe5giZ4n43Jp1yi3Bu9Dgr5VmP60KsakcY5nIZU0vuv4mLNJNE OOGcKSg/dqLdYCv088LYoR0sGTN40ODvTvru9b+/+jCRMZd5+Jz+9i9AlyumUc3K77OS Sr1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729919893; x=1730524693; 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=iU1QCoLm9SQ+6m7YZluKnFNfn8ZrWd4KaFL5e+lUweo=; b=p7lmzuwl5FbxYu2sx9gCnM0lvQ6szHzdjMq3TuC/GvHHODd3nelL+FLnZfoc66X5oe a4ZcRAL6Ey54c9X7dScNcyS8YNXBwbTadQlwJeXINoGAn+mYcjq73N8R7cRbPeAwR/M7 iWWRPk9wmQR6e9+BE/NK73yVf/9Kz9tlKf7JFirQf2BJ5VEnfqqCPd2Gk3leSRl+5KLc H0Ie4UubfZtT+97GHLkFK7o/jxBNqEElKRYq/jXCSfAWf+X7Njd1Ats3QYbNtM/Axb3C RN7NOfgZEyLR6rtWTo+7BUy/udut8mxCK8XAejGQFTuFH6lDoBN5aeerRryIRklHHffj nIHw== X-Forwarded-Encrypted: i=1; AJvYcCVH2igsBEwaiQrGNdnx25FS6dwPySL76B/kmY5s+19Pr2G8r45fNLHFSKksNhEAOUUarD51BxSRIA==@kvack.org X-Gm-Message-State: AOJu0YyXtMxFxD46XkAT3rx5ee7OWeXS4nFm3MubgUlt9cFQZnKQYRde gxpdummHHePHmhgCG6gu1yMtDluey8yAuAvWQJ9uIclCcHaHExA5ik7mVioBnpLczD2bu3WNlH/ zPkd0HdrVgUDmEFb6zDXYeaZscQC63OgXrDXH X-Google-Smtp-Source: AGHT+IGxrZqhWOcm7GYtX9POebfPOUCTw9sWuuzUb9W2nGFOsHwUNqkHgbXjFmKvaPW6lmTMHMaB73N7SS1Qpuv8Hro= X-Received: by 2002:a05:6e02:1d85:b0:3a0:9ccf:4f69 with SMTP id e9e14a558f8ab-3a4ed29d7femr2007395ab.2.1729919893333; Fri, 25 Oct 2024 22:18:13 -0700 (PDT) MIME-Version: 1.0 References: <20241023224409.201771-4-xur@google.com> <202410251411.eRNArTOZ-lkp@intel.com> In-Reply-To: From: Rong Xu Date: Fri, 25 Oct 2024 22:17:59 -0700 Message-ID: Subject: Re: [PATCH v5 3/7] Change the symbols order when --ffunction-sections is enabled To: kernel test robot , Masahiro Yamada Cc: Alice Ryhl , Andrew Morton , Arnd Bergmann , Bill Wendling , Borislav Petkov , Breno Leitao , Brian Gerst , Dave Hansen , David Li , Han Shen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , Jann Horn , Jonathan Corbet , Josh Poimboeuf , Juergen Gross , Justin Stitt , Kees Cook , "Mike Rapoport (IBM)" , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , "Paul E. McKenney" , Peter Zijlstra , Sami Tolvanen , Thomas Gleixner , oe-kbuild-all@lists.linux.dev, Linux Memory Management List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3D6051C0019 X-Stat-Signature: joa4fmskq11s1pjzpdex74jp7b9nttpd X-Rspam-User: X-HE-Tag: 1729919855-607498 X-HE-Meta: U2FsdGVkX18j9o9cwatn8d9c0qe/y2+g6ubBJBklY9JIDY6fQ/mB1MjE+zCT+YsmQZmlkD5oDfDA+BWHTdZ239jJdNM8/mnpY8h8D5YDQyw9hAdj46y7t7ujIHOMoQkkvG7ZGRrvG+1MODHXuT7phH0ZaWfrUGJ0wnXobYunNAKhOIsmMvTVlbFfIstfq1Ctguqf+asL3QZLsffwnsRrjnG2IK1JTyp5/oKShvwWbX8+puf3auJHiENgCPPD9GfW0LzEh8qEUDWkE2Juv5drqyifmq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7Ds1tc4Eo+s0SE+I// X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The fix is now included in v6 of the patch series for review. On Fri, Oct 25, 2024 at 5:27=E2=80=AFPM Rong Xu wrote: > > OK. Here is a simple fix to the issue. > > diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.= lds.S > index d317a843f7ea9..f1b86eb303404 100644 > --- a/arch/sparc/kernel/vmlinux.lds.S > +++ b/arch/sparc/kernel/vmlinux.lds.S > @@ -48,6 +48,11 @@ SECTIONS > { > _text =3D .; > HEAD_TEXT > + ALIGN_FUNCTION(); > +#ifdef CONFIG_SPARC64 > + /* Match text section symbols in head_64.S first */ > + *head_64.o(.text) > +#endif > TEXT_TEXT > SCHED_TEXT > LOCK_TEXT > > If this is OK, I'll send the updated patch. > > -Rong > > On Fri, Oct 25, 2024 at 11:14=E2=80=AFAM Rong Xu wrote: > > > > I can reproduce the build error. > > > > The reason for the error is because in CONFIG_SPARC64, the symbol > > swapper_tsb needs to have a fixed address of 0x0000000000408000. > > > > In arch/sparc/kernel/vmlinux.lds.S > > 37 #ifdef CONFIG_SPARC64 > > 38 ASSERT((swapper_tsb =3D=3D 0x0000000000408000), "Error: sparc64 ear= ly > > assembler too large") > > 39 #endif > > > > This symbol resides in the .text section. The patch relocates "cold" > > functions (tagged by .text.unlikely) to precede other symbols within > > the .text section. This pushes swapper_tsb to a higher memory address, > > and we have the assertion. > > > > However, this sparc code appears incompatible with the original linker > > script. The original script prioritized .text.hot symbols, placing > > them before others in the .text section. Currently, no functions are > > marked as "hot" in the source code. If a function were marked with > > __attribute__((hot)), the build would also fail. > > > > I don't know a good solution other than adding a branch to the > > include/asm-generic/vmlinux.lds.h. > > > > @Masahiro Yamada: I'd appreciate any further suggestions you might have= . > > > > Best regards, > > > > -Rong > > > > On Thu, Oct 24, 2024 at 11:47=E2=80=AFPM kernel test robot wrote: > > > > > > Hi Rong, > > > > > > kernel test robot noticed the following build errors: > > > > > > [auto build test ERROR on eb952c47d154ba2aac794b99c66c3c45eb4cc4ec] > > > > > > url: https://github.com/intel-lab-lkp/linux/commits/Rong-Xu/Add-Au= toFDO-support-for-Clang-build/20241024-064725 > > > base: eb952c47d154ba2aac794b99c66c3c45eb4cc4ec > > > patch link: https://lore.kernel.org/r/20241023224409.201771-4-xur%= 40google.com > > > patch subject: [PATCH v5 3/7] Change the symbols order when --ffuncti= on-sections is enabled > > > config: sparc-sparc64_defconfig (https://download.01.org/0day-ci/arch= ive/20241025/202410251411.eRNArTOZ-lkp@intel.com/config) > > > compiler: sparc64-linux-gcc (GCC) 13.3.0 > > > reproduce (this is a W=3D1 build): (https://download.01.org/0day-ci/a= rchive/20241025/202410251411.eRNArTOZ-lkp@intel.com/reproduce) > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a new = version of > > > the same patch/commit), kindly add following tags > > > | Reported-by: kernel test robot > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202410251411.eRNArTOZ= -lkp@intel.com/ > > > > > > All errors (new ones prefixed by >>): > > > > > > >> sparc64-linux-ld: Error: sparc64 early assembler too large > > > > > > -- > > > 0-DAY CI Kernel Test Service > > > https://github.com/intel/lkp-tests/wiki