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 D2B23D149DA for ; Fri, 25 Oct 2024 18:14:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5A19D6B007B; Fri, 25 Oct 2024 14:14:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 579566B0089; Fri, 25 Oct 2024 14:14:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 467F26B008A; Fri, 25 Oct 2024 14:14:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2863C6B0089 for ; Fri, 25 Oct 2024 14:14:20 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 225111C6A0D for ; Fri, 25 Oct 2024 18:13:57 +0000 (UTC) X-FDA: 82712923272.01.9296CFB Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf07.hostedemail.com (Postfix) with ESMTP id 6591240019 for ; Fri, 25 Oct 2024 18:13:50 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=R5qFzpTe; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of xur@google.com designates 209.85.160.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=1729879887; 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=lRQv+y2IqS7AxTEkkTnJFxtyxoD2fpd8WHbtE3K+zR0=; b=CZ8umsQGK7mnYqlF4OQyfC1z4kk5FMeLRrQC/x9FvQ0QWORcoLNULPQbaaHbOfiknQxb2r Ntz233JWknuCdyE33x7stvqMuCufpvsWLrs1hBHg6Hi9dkyerKnmugIiUrKcbhNJi23gH+ 3MCFn0MvTMIHNNCFNnp3bcgauiVFtOk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729879887; a=rsa-sha256; cv=none; b=S0m1nRUgf4ErCJf9fbZnVj49vta0RCfTVoa9xuAvUPY0wQE1kbpnZglH2AZNVeUPgyjGAk p2IV92/s0oL+3pVyLbL1XJbVTpTlO7uEvLWghHZCIshW5psSyCB5ycHdryWZ8+G1cst3MN vTEOS3OsRrbnPyA7uSvsgUZX9KWdymw= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=R5qFzpTe; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of xur@google.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=xur@google.com Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-460969c49f2so34051cf.0 for ; Fri, 25 Oct 2024 11:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729880057; x=1730484857; 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=lRQv+y2IqS7AxTEkkTnJFxtyxoD2fpd8WHbtE3K+zR0=; b=R5qFzpTe79CZJyxbgoRqVjA16VsXdBaO+tKa8zofU1R7M9x1TDzgD1eAKifeIu4fYo T3aGu8zyleie4KWlQFeZHqHd4k1wWQFmE7mDSX98mdoieJGOQWNpjxN/pTrk0OwdAqHP ouJEb7uarWKKOvFp1+tML2Gp+BpWbsEVfGlgK49ah8SSb3GQpdkEcXByhs1ildl3SPcj 3pdfq4IHP0/kTZy5xuIXsfwUfnOWIUxVBQnDFYWTtNPUihXVgLU9KHF9MMAOLhLBWQmC 81TN+M7R24eM5jnSY6KaQP1/TfKUCpqqt5dZV4nFebDfzE1A0vLCX0Ar3Y2C6xORJ424 S7GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729880057; x=1730484857; 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=lRQv+y2IqS7AxTEkkTnJFxtyxoD2fpd8WHbtE3K+zR0=; b=g+WuQ16xkUSSIAx5444Bm6iygMMgnor2uh5rnM68oWn1+JVIiuoNs48GcGFTdBT1R8 2LrdZko7InVE4MaX7z3g/wHqYPJevHi0GtKcqENhmc6jXVodehHJ5mk5OpW4VL8vRInQ dv/5vcx+HDj+pn1Meuwi7iIwiQ9XmfLwQwdw3AFUI6359DcnutghgVwnQh/3pzG4BfWZ F74K724RqIhN8gA97s/qJq+84jqymYzwezz5+H2muA2TJI/f3Sh2RWJGUy82Avp74Kt+ ahzx7yVwym3OFIIH8EIoB1q7sXZfWsmv9dBYQ7vy7d7wTAXIK4355vjg7alrvEefxkaX XJ3g== X-Forwarded-Encrypted: i=1; AJvYcCUxJGXkvw2ytwuitizJL5ZwIGWgZIFC23vODzp8OKirwr+Kcd/oggY3MfvDtyqPZj0DQfS5qT/xDA==@kvack.org X-Gm-Message-State: AOJu0YxxuCyfyAhe3IsyIzW8DBTyyqibe04PVUPA7E3x8RdjYUgdMjje y6DD029Doy3x1a+M4QcKEPih2NSEmBIZqY4cn5+XDHK9Xk/IKn2sbki2HOqC2Sz0M/nxY68oQ0x VYALQTRj0Q9uNIzg51XLR0CMEhAfMp3GdVnay X-Google-Smtp-Source: AGHT+IFCW3snO8WDCQ5BeVi/grnTyWnYHJ2KPU63NjiD9zruPXeiJiTQ7RWvWm05eyfhy4acsLFvFYXWJJ/0LRjfv5E= X-Received: by 2002:a05:622a:1206:b0:461:2e49:f1f8 with SMTP id d75a77b69052e-4613c01fd6dmr200681cf.4.1729880056835; Fri, 25 Oct 2024 11:14:16 -0700 (PDT) MIME-Version: 1.0 References: <20241023224409.201771-4-xur@google.com> <202410251411.eRNArTOZ-lkp@intel.com> In-Reply-To: <202410251411.eRNArTOZ-lkp@intel.com> From: Rong Xu Date: Fri, 25 Oct 2024 11:14:03 -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: 6591240019 X-Stat-Signature: 7qzfa3rdun6modhf7q54wka113yzbep1 X-Rspam-User: X-HE-Tag: 1729880030-552937 X-HE-Meta: U2FsdGVkX1+hyVrHK5DJfyR8AourjaZNmdySkVCAS98Gg8D1u8/XR/ABXpkscpG3zwiBdjSeA7guDy9LL+GBbH4qI1MuWb1PNT7+RE4N0hZ7+NNtrXay7r/FZyENSH6eDNQ01wRCSY0L2ScSDtI7qzJ3aKiek7KaYW+wZpwLhFQKVi0NbhNZQkepeHzfxmeNNQaoFSgX8gdWpZi6EfId03mULItFGmZdVFP/hQ/VddzVMTbXA19IJnKDmwu5Y9ToqKKk6x+iEp79RNFoxwuFSp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2pGD/yyH5hnbQ5qlYs68TlmA 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: 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 early 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-AutoFD= O-support-for-Clang-build/20241024-064725 > base: eb952c47d154ba2aac794b99c66c3c45eb4cc4ec > patch link: https://lore.kernel.org/r/20241023224409.201771-4-xur%40go= ogle.com > patch subject: [PATCH v5 3/7] Change the symbols order when --ffunction-s= ections is enabled > config: sparc-sparc64_defconfig (https://download.01.org/0day-ci/archive/= 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/archi= ve/20241025/202410251411.eRNArTOZ-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new vers= ion 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