]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gcov: fix clang-11+ support
authorNick Desaulniers <ndesaulniers@google.com>
Thu, 25 Mar 2021 04:37:44 +0000 (21:37 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:28 +0000 (15:42 -0500)
commit69cd8b8fbcff54a0636f183f00d22be077ade40c
tree61d1d1b9a6bb323b0a74eae2e9f10a1f94c212df
parent90c484cd0323baaf74dea1e9eb8191acb12c8c63
gcov: fix clang-11+ support

BugLink: https://bugs.launchpad.net/bugs/1922601
commit 60bcf728ee7c60ac2a1f9a0eaceb3a7b3954cd2b upstream.

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
Link: https://lkml.kernel.org/r/20210312224132.3413602-2-ndesaulniers@google.com
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Prasad Sodagudi <psodagud@quicinc.com>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Fangrui Song <maskray@google.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Cc: <stable@vger.kernel.org> [5.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
kernel/gcov/clang.c