aboutsummaryrefslogtreecommitdiffstats
path: root/sys/targets
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-05-02 11:37:03 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-05-02 09:49:51 +0000
commit2bfec9c07f5ec24acb6c42a4b995b5d7ed86d0cb (patch)
tree361119715977672d08344ca1a46053582ec52c08 /sys/targets
parent7153f4a12c4ff498b38115e044dd4962f5e46606 (diff)
sys/targets: use a custom data offset for arm32
ARM32 suffers from the same problem as ARM64 - the data offset may be beyond the addressable memory range. Cc #5986. Cc #5770.
Diffstat (limited to 'sys/targets')
-rw-r--r--sys/targets/targets.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 50f5c5121..1166134bc 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -781,14 +781,13 @@ func initTarget(target *Target, OS, arch string) {
}
func (target *Target) defaultDataOffset() uint64 {
+ if target.Arch == ARM64 || target.Arch == ARM {
+ // On ARM/ARM64, in many cases we can't use many enough bits of the address space.
+ // Let's use the old value for now. It's also problematic (see #5770), but it's
+ // lesser of the two evils.
+ return 0x20000000
+ }
if target.PtrSize == 8 {
- if target.Arch == ARM64 {
- // On ARM64, in many cases we can't use many enough bits of the address space.
- // Let's use the old value for now. It's also problematic (see #5770), but it's
- // lesser of the two evils.
- return 0x20000000
- }
-
// An address from ASAN's 64-bit HighMem area.
// 0x200000000000 works both for arm64 and amd64. We don't run syzkaller tests on any other platform.
// During real fuzzing, we don't build with ASAN, so the address should not matter much as long as