New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 46076 - arm64be fails with -fsanitize=shadow-call-stack
Summary: arm64be fails with -fsanitize=shadow-call-stack
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Driver (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Tom Stellard
URL:
Keywords: portability, Sanitizer
Depends on:
Blocks: 4068 release-10.0.1
  Show dependency tree
 
Reported: 2020-05-26 07:44 PDT by Arnd Bergmann
Modified: 2020-06-24 09:23 PDT (History)
8 users (show)

See Also:
Fixed By Commit(s): a2a3e9f0a6e91103a0d1fa73086dbdf109c48f69 b9c6871a9570975827dc0bbeb39131c99c8daf8e 1a25347f574 f9da0a7f36f


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnd Bergmann 2020-05-26 07:44:04 PDT
Building the Linux kernel with the newly added support for -fsanitize=shadow-call-stack fails on big-endian platforms with:

clang: error: unsupported option '-fsanitize=shadow-call-stack' for target 'aarch64_be-unknown-linux'

I have submitted a workaround for the kernel, but this is likely a bug in clang and there may be no technical reason to prevent the combination.
Comment 1 Fangrui Song 2020-05-27 10:24:27 PDT
https://reviews.llvm.org/D80647
Comment 2 Fangrui Song 2020-05-27 10:40:36 PDT
a2a3e9f0a6e91103a0d1fa73086dbdf109c48f69

Will ask tstellar to cherry pick to release/10.x
Comment 3 Fangrui Song 2020-05-27 10:59:00 PDT
Apologies that I found the wrong place in a2a3e9f0a6e91103a0d1fa73086dbdf109c48f69

b9c6871a9570975827dc0bbeb39131c99c8daf8e is the proper fix. Both are needed because they touch the same lines.
Comment 4 Fangrui Song 2020-05-27 11:03:04 PDT
Reopen for release-10.0.1

Needs to merge a2a3e9f0a6e91103a0d1fa73086dbdf109c48f69 and b9c6871a9570975827dc0bbeb39131c99c8daf8e

to avoid Linux kernel patch like https://lore.kernel.org/linux-arm-kernel/20200527134016.753354-1-arnd@arndb.de/ [PATCH] arm64: disable -fsanitize=shadow-call-stack for big-endian
Comment 6 Tim Northover 2020-06-24 02:49:48 PDT
Yep, this one looks fine.
Comment 7 Tom Stellard 2020-06-24 09:23:17 PDT
Merged: f9da0a7f36f