mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Oberparleiter <oberpar@linux.ibm.com>
To: Nick Desaulniers <ndesaulniers@google.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com,
	Fangrui Song <maskray@google.com>,
	Prasad Sodagudi <psodagud@quicinc.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] gcov: fix clang-11+ support
Date: Mon, 15 Mar 2021 14:51:36 +0100	[thread overview]
Message-ID: <67b313b0-3254-b394-7aa3-69113fe32838@linux.ibm.com> (raw)
In-Reply-To: <20210312224132.3413602-2-ndesaulniers@google.com>

On 12.03.2021 23:41, Nick Desaulniers wrote:
> LLVM changed the expected function signatures for llvm_gcda_start_file()
> and llvm_gcda_emit_function() in the clang-11 release. Users of clang-11
> or newer may have noticed their kernels failing to boot due to a panic
> when enabling CONFIG_GCOV_KERNEL=y +CONFIG_GCOV_PROFILE_ALL=y.  Fix up
> the function signatures so calling these functions doesn't panic the
> kernel.
> 
> Link: https://reviews.llvm.org/rGcdd683b516d147925212724b09ec6fb792a40041
> Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
> Cc: stable@vger.kernel.org # 5.4
> Reported-by: Prasad Sodagudi <psodagud@quicinc.com>
> Suggested-by: Nathan Chancellor <nathan@kernel.org>
> Reviewed-by: Fangrui Song <maskray@google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> Tested-by: Nathan Chancellor <nathan@kernel.org>

Looks good to me (minus the code duplication - but that's IMO acceptable
since it's cleaned up again with patch 2).

Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>

That said, I'm currently thinking of adding a compile time check that
performs a dry-run gcov_info => gcda conversion in user space to detect
these kind of issues before kernels fail unpredictably [1]. I'm
confident that this could work for the GCC gcov kernel code, not sure
about the Clang version though. But if it's possible I guess it would
make sense to extend this to include the Clang code as well.

Note that this check wouldn't work for cross-compiles since the build
machine must be able to run code for the target machine.

[1]
https://lore.kernel.org/lkml/1c7a49e7-0e27-561b-a2f9-d42a83dc4c29@linux.ibm.com/


Regards,
  Peter

-- 
Peter Oberparleiter
Linux on Z Development - IBM Germany

  reply	other threads:[~2021-03-15 13:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 19:21 [PATCH] " Nick Desaulniers
2021-03-12 19:58 ` Nathan Chancellor
2021-03-12 20:14   ` Nick Desaulniers
2021-03-12 20:46     ` Nick Desaulniers
2021-03-12 20:51     ` Nathan Chancellor
2021-03-12 21:57       ` Nick Desaulniers
2021-03-12 22:05         ` Nathan Chancellor
2021-03-12 22:41           ` [PATCH v2 0/2] gcov fixes for clang-11 Nick Desaulniers
2021-03-12 22:41             ` [PATCH v2 1/2] gcov: fix clang-11+ support Nick Desaulniers
2021-03-15 13:51               ` Peter Oberparleiter [this message]
2021-03-15 18:13               ` Nathan Chancellor
2021-03-12 22:41             ` [PATCH v2 2/2] gcov: clang: drop support for clang-10 and older Nick Desaulniers
2021-03-15 13:54               ` Peter Oberparleiter
2021-03-15 18:14               ` Nathan Chancellor
2021-03-12 20:25 ` [PATCH] gcov: fix clang-11+ support Fangrui Song
2021-03-12 22:05   ` Nick Desaulniers
2021-03-12 22:24     ` Fangrui Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67b313b0-3254-b394-7aa3-69113fe32838@linux.ibm.com \
    --to=oberpar@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maskray@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=psodagud@quicinc.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®