b-sumner wrote:
Hi @hctim, I'm really not seeing how this patch could possibly prevent ASAN or
other sanitizers from arbitrarily changing their implementations or placing
arbitrary data in redzones. This patch is merely introducing additional
symbols that overlap with the uninstrumented
hctim wrote:
Messing around with global variables (changing their size, padding, alignment)
is a common theme amongst sanitizers. We'd therefore want any strategy applied
to ASan to be generic and apply across other sanitizers.
The patch might not cause issues right now with ASan - but I
skc7 wrote:
Hi @hctim,
In this patch, we are identifying globals that are instrumented using an new IR
attribute and for them extra symbol with padded size is emitted. This is done
only in ASAN pass. Not sure how would that affect HWAsan and MTE-globals. Could
you please give an example for
hctim wrote:
Hi,
My apologies for the delay.
I started to hack together the same idea using `SanitizerMetadata`, which is
definitely the preferred way of adding sanitizer globalvariable instrumentation
(given that everything else already lives there). You can see the WIP here:
skc7 wrote:
@hctim @MaskRay @vitalybuka #70166 and #68865 have been pending for review and
approvals for few months now. All the feedback has been useful in improving the
patch. Made the changes to patches as per feedback.
Please review.
https://github.com/llvm/llvm-project/pull/70166
skc7 wrote:
#68865 and #70166 have been rebased and updated as per review comments. Please
review.
https://github.com/llvm/llvm-project/pull/70166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/skc7 updated https://github.com/llvm/llvm-project/pull/70166
>From 45d7b14e494ce771460ba263c5573f0fb4715246 Mon Sep 17 00:00:00 2001
From: skc7
Date: Wed, 25 Oct 2023 10:46:10 +0530
Subject: [PATCH] [ASAN] For Asan instrumented globals, emit two symbols, with
actual size and
hctim wrote:
Will wait for a rebase on some changes requested in #68865, but it'd also be
really important to write tests for a couple more scenarios:
1. Building with `-fsanitize=address -S -emit-llvm` results in GVs with
`sanitized_padded_global` (and results in GVs without
hctim wrote:
> > It's my understanding your problem is that you are asan-trapping on the
> > redzones when you copy data to/from the device. Is it possible instead to
> > just make those copy-from and copy-to functions in the runtime
> > `__attribute__((no_sanitize("address")))` and copy the