Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp580796pxj; Thu, 17 Jun 2021 09:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqMelmlNOJ/AjqMcuSyO6w/UzXUDeWgTJvj7YnKCK+MIq7jMU2ul9XXmXLspTJnquAuwyj X-Received: by 2002:a17:906:b24a:: with SMTP id ce10mr6074535ejb.83.1623946052820; Thu, 17 Jun 2021 09:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623946052; cv=none; d=google.com; s=arc-20160816; b=SuZTB3JtXaBoX/hE0zREfeqqrC0nEogABxMG4k1v+SSMgxJs7c5ZZxcb90x4siNgpX RrycqmDptgwt5Tct6kY9QIuXvtCpHEanl4wHFhHjgqM+PrGdSDExHpc5G37c3eaKkKjd RHOLk47iTn0HA8lGJzr7Lg6NHc+0Bb2ETZQoyf5pWVeWu6NIbW+5X6Ny96q3z6ZJZoxK 3wkP4+1f+BEyJ4NuK1GeNUlPQMk1xzWyEXhVo6Yz2aFYSY3XEqSGbzLKDCEafEDGaRHq 5gbLT5Gxhdh8FFLinNvs00tBHuK1RhSEzKeKX2uzFErfO18Fnk+b9ZafyXrIn6itCYC2 5hWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=mhQF38qVkFPjYjvziQjLIcfMR/G9GUoa3asUn5y7JgI=; b=IKfqHOnc8H9JFRLG7SRkJGZJuj3J6dbTMOPq41+OlQfDL4HWbAGFgERQnfqcQiYNFV NVSpUVd+vwbNunzI5PplAdzXu4bD3+D7E6V2MyC6T3dhRE/Q37Pn5Wt6lyZn5jdyhWZo uuY58lbneYqAaQV5WPMzQrwQKMUylSPUGVBcoT9P0O+8tacbrwe8dMZMNPeooxoTRFmx EwFxeOyQjRwpuznLBgzYRjDBaGX8PT/wH3fPRZ5BAwSy2tWds4MZz3F6bKivz2o0Tw/R oDSCBO8P/O9JHBmdTvgff23LDbDcv0kmyei1LlDEFN649g/Ptmn6yKNLHlkCvgXG9tYE YkLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iP9jNH0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy16si4837399ejc.44.2021.06.17.09.07.08; Thu, 17 Jun 2021 09:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iP9jNH0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231722AbhFQMsH (ORCPT + 99 others); Thu, 17 Jun 2021 08:48:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbhFQMsG (ORCPT ); Thu, 17 Jun 2021 08:48:06 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8120C061574 for ; Thu, 17 Jun 2021 05:45:57 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id gt18so9633117ejc.11 for ; Thu, 17 Jun 2021 05:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mhQF38qVkFPjYjvziQjLIcfMR/G9GUoa3asUn5y7JgI=; b=iP9jNH0tsNgPvuewn/VT+nVMdkY8d7VD8RToapmMVc4oEjDzV28adxdL/W2cfFUJ5C F5CwqmsZmzqzCH0tvwCxTMPDtTLpuL1dWTEs6CA6jqifpQWiNkzlLilq5tMnzwzUnRuu FuT1f41khwhCA+Hz2m7SS+epxPjt/j1kED+vLCKKjz+YYC0vwOlHzQmdBFDzhbvo5yaS WkNusz1ipM2tUWcNf7gQRPDyD98E9eOJxJC57z9FAIbl+flpt17+4VIb+u7UB3ggQT7n mSvZTEBcsORfg730BYGVj9SVW6YZioO+2nF3oL5C0GaOzKQnTIioSsSp23D6Kx3zMka7 caKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mhQF38qVkFPjYjvziQjLIcfMR/G9GUoa3asUn5y7JgI=; b=Y1im2B8/+IsHju0YN2L6GSj2fh5uXY6S6Lb8Z8PzudxnYmk3Hy6Uj/f0oLpjRswiNu fAfkPjpRx3uezhLP5SDUuLFtd8VaNI7Fx5SPewGq6ozqdlUCRrO2NG02EvRGZxy8wa7H lwkhbTNEG8s9fT+105cLDKWRTB3pfHKSeF0sh26SySClRag+3rtJPieQzAV/mEsmsUfa 9uUO4TSarY1k/PFKdlFuVL/s4L0MB23r3xmg1cYTYQbzpRtyXy5+eM5eYGI6LnKOD3MV Bvy1/cdOAVmEcA3Ilc3UOXZ3Mh6ZCbzFuoRoJLlliZrTBEhgZgjerydqgDNHwemhBMsE UlaA== X-Gm-Message-State: AOAM531Ej/tW5+prPOfEFBUQHYfq6Zr/mzRJNdyWb+rnL55fUvrTghGs Xl2H3/Yr+YffTFUaQwyEr1VpwLK3m8ErKZn526LaJw== X-Received: by 2002:a17:906:480a:: with SMTP id w10mr5071539ejq.18.1623933956354; Thu, 17 Jun 2021 05:45:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Thu, 17 Jun 2021 18:15:45 +0530 Message-ID: Subject: Re: [next] [clang] x86_64-linux-gnu-ld: mm/mremap.o: in function `move_pgt_entry': mremap.c:(.text+0x763): undefined reference to `__compiletime_assert_342' To: Linux-Next Mailing List , clang-built-linux , lkft-triage@lists.linaro.org, open list Cc: Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , Stephen Rothwell , Stephen Boyd , Jiri Olsa , Alexei Starovoitov , Jessica Yu , Evan Green , Hsin-Yi Wang , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Matthew Wilcox , Baoquan He , Borislav Petkov , Catalin Marinas , Dave Young , Ingo Molnar , Konstantin Khlebnikov , Sasha Levin , Thomas Gleixner , Vivek Goyal , Will Deacon , Andrew Morton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Jun 2021 at 17:41, Naresh Kamboju wrote: > > Linux next 20210617 tag following x86_64 builds failed with clang-10 > and clang-11. > Regressions found on x86_64: > > - build/clang-11-tinyconfig > - build/clang-11-allnoconfig > - build/clang-10-tinyconfig > - build/clang-10-allnoconfig > - build/clang-11-x86_64_defconfig > - build/clang-10-defconfig > > We are running git bisect to identify the bad commit. > > Build log: > ------------ > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > eb_relocate_parse_slow()+0x466: stack state mismatch: cfa1=4+120 > cfa2=-1+0 > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.o: warning: objtool: > eb_copy_relocations()+0x1e0: stack state mismatch: cfa1=4+104 > cfa2=-1+0 > x86_64-linux-gnu-ld: mm/mremap.o: in function `move_pgt_entry': > mremap.c:(.text+0x763): undefined reference to `__compiletime_assert_342' The git bisect pointed out the first bad commit. The first bad commit: commit 928cf6adc7d60c96eca760c05c1000cda061604e Author: Stephen Boyd Date: Thu Jun 17 15:21:35 2021 +1000 module: add printk formats to add module build ID to stacktraces Let's make kernel stacktraces easier to identify by including the build ID[1] of a module if the stacktrace is printing a symbol from a module. This makes it simpler for developers to locate a kernel module's full debuginfo for a particular stacktrace. Combined with scripts/decode_stracktrace.sh, a developer can download the matching debuginfo from a debuginfod[2] server and find the exact file and line number for the functions plus offsets in a stacktrace that match the module. This is especially useful for pstore crash debugging where the kernel crashes are recorded in something like console-ramoops and the recovery kernel/modules are different or the debuginfo doesn't exist on the device due to space concerns (the debuginfo can be too large for space limited devices). Originally, I put this on the %pS format, but that was quickly rejected given that %pS is used in other places such as ftrace where build IDs aren't meaningful. There was some discussions on the list to put every module build ID into the "Modules linked in:" section of the stacktrace message but that quickly becomes very hard to read once you have more than three or four modules linked in. It also provides too much information when we don't expect each module to be traversed in a stacktrace. Having the build ID for modules that aren't important just makes things messy. Splitting it to multiple lines for each module quickly explodes the number of lines printed in an oops too, possibly wrapping the warning off the console. And finally, trying to stash away each module used in a callstack to provide the ID of each symbol printed is cumbersome and would require changes to each architecture to stash away modules and return their build IDs once unwinding has completed. Instead, we opt for the simpler approach of introducing new printk formats '%pS[R]b' for "pointer symbolic backtrace with module build ID" and '%pBb' for "pointer backtrace with module build ID" and then updating the few places in the architecture layer where the stacktrace is printed to use this new format. Before: Call trace: lkdtm_WARNING+0x28/0x30 [lkdtm] direct_entry+0x16c/0x1b4 [lkdtm] full_proxy_write+0x74/0xa4 vfs_write+0xec/0x2e8 After: Call trace: lkdtm_WARNING+0x28/0x30 [lkdtm 6c2215028606bda50de823490723dc4bc5bf46f9] direct_entry+0x16c/0x1b4 [lkdtm 6c2215028606bda50de823490723dc4bc5bf46f9] full_proxy_write+0x74/0xa4 vfs_write+0xec/0x2e8 Link: https://lkml.kernel.org/r/20210511003845.2429846-6-swboyd@chromium.org Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1] Link: https://sourceware.org/elfutils/Debuginfod.html [2] Signed-off-by: Stephen Boyd Cc: Jiri Olsa Cc: Alexei Starovoitov Cc: Jessica Yu Cc: Evan Green Cc: Hsin-Yi Wang Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Matthew Wilcox Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Young Cc: Ingo Molnar Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Thomas Gleixner Cc: Vivek Goyal Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell Documentation/core-api/printk-formats.rst | 11 ++++ include/linux/kallsyms.h | 20 +++++- include/linux/module.h | 8 ++- kernel/kallsyms.c | 101 ++++++++++++++++++++++++------ kernel/module.c | 31 ++++++++- lib/vsprintf.c | 8 ++- 6 files changed, 154 insertions(+), 25 deletions(-) Previous HEAD position was b2dcc0267277 dump_stack: add vmlinux build ID to stack traces HEAD is now at 7d9c6b8147bd Add linux-next specific files for 20210617 > make[1]: *** [/builds/linux/Makefile:1252: vmlinux] Error 1 > make[1]: Target '__all' not remade because of errors. > make: *** [Makefile:222: __sub-make] Error 2 > make: Target '__all' not remade because of errors. > make --silent --keep-going --jobs=8 > O=/home/tuxbuild/.cache/tuxmake/builds/current ARCH=x86_64 > CROSS_COMPILE=x86_64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache > clang' headers_install > INSTALL_HDR_PATH=/home/tuxbuild/.cache/tuxmake/builds/current/install_hdr/ > tar caf /home/tuxbuild/.cache/tuxmake/builds/current/headers.tar.xz -C > /home/tuxbuild/.cache/tuxmake/builds/current/install_hdr . > > ref: > https://builds.tuxbuild.com/1u4ZKFTh12vrYBVf8b1xGpaFOrE/ > > # TuxMake is a command line tool and Python library that provides > # portable and repeatable Linux kernel builds across a variety of > # architectures, toolchains, kernel configurations, and make targets. > # > # TuxMake supports the concept of runtimes. > # See https://docs.tuxmake.org/runtimes/, for that to work it requires > # that you install podman or docker on your system. > # > # To install tuxmake on your system globally: > # sudo pip3 install -U tuxmake > # > # See https://docs.tuxmake.org/ for complete documentation. > > tuxmake --runtime podman --target-arch x86_64 --toolchain clang-11 > --kconfig x86_64_defconfig > > ref: > https://builds.tuxbuild.com/1u4ZKFTh12vrYBVf8b1xGpaFOrE/ > > build info: > git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next > git_sha: 7d9c6b8147bdd76d7eb2cf6f74f84c6918ae0939 > git_short_log: 7d9c6b8147bd (\Add linux-next specific files for 20210617\) > kconfig: x86_64_defconfig > kernel_image: > kernel_version: 5.13.0-rc6 > toolchain: clang-11 Reported-by: Naresh Kamboju > -- > Linaro LKFT > https://lkft.linaro.org