Message ID | 20231205135923.72256385C6FD@sourceware.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3444549vqy; Tue, 5 Dec 2023 05:59:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUpXponautyMtLV8dttCSEyOgWBnpJh71Gkgk9CuRn9SKmaUhe+IiZgs4Pn3d1H7l23mIT X-Received: by 2002:a05:6808:130d:b0:3b8:b063:9b62 with SMTP id y13-20020a056808130d00b003b8b0639b62mr6518014oiv.84.1701784763699; Tue, 05 Dec 2023 05:59:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701784763; cv=pass; d=google.com; s=arc-20160816; b=0e9KlqRNZnWqyX1upjfwuvmuIlRBBnNyLPS6INHVbk4BfQm0L30FepMk5OpTB8WbYn mS0+kvH5FIzoUfxS6YkQmzaDMW2hdkBedfYlL7WMQoy8sk3Yfy7R1kMxCI80+RqtoJuC ybfRk8hC9sVatoldyJHIAiW0a5LPEK68yvon8V+SYZ2HQZ9eexVF6NovAXICk2fF4s/8 M6cJPBM7ZLoH0TOuz4otRPjCBG8d2tnrixxEVBMXDXsflzwtaGER3NDrkNZrVI1Jz7et iM+X1W9w/sWEASMcd+ZBPoLud1O5TtBjQT4nP/ToG7F1YcWDkJRIC4pS9GKCPbwSMeIf NFJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:errors-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :subject:cc:to:from:date:dkim-signature:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=c04Ruz2+agv16cOpaa3/btyjQ5z2gAegXs5rOVnodJM=; fh=Hz/QWAL2vMAbrm3W16QrnQrLktFWGNewssxaKtdN1w4=; b=xY4l+ZNnwhJ/eSCPGB84zlTHFNKGUBOraFChTcgfM/Ut/lvno/KVPGIpapiI9W0XUY BAlfDGZNp9Hjp6is5qIXHr70M7qjNG1WIpfcneoRPHcbp4vGrnfd6XRed2O3LUGXxI0e 4gYcPPxadbLfazD0rWe4o9qR53kAqa0fmmaH/CvRt1CP6Bes4HVjPfruCe1soQUZxaQ5 JByCCpVhTpxgRt5NYx/vXAq/78f9J5fGA1akhPMR1T9eN+sW7VMr0VmNzgcijKTAn4eG 5Mn7X7ylWK6Dn7sPLRrAVinDGC/yq2S6X03i3n41ikUMDoHLebNx2kwnK+muQVAh62Ag yFJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Cfmk5XTt; dkim=neutral (no key) header.i=@suse.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j16-20020a05620a289000b0077588f227d2si12152484qkp.431.2023.12.05.05.59.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:59:23 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Cfmk5XTt; dkim=neutral (no key) header.i=@suse.de; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 72256385C6FD for <ouuuleilei@gmail.com>; Tue, 5 Dec 2023 13:59:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id C6687385DC2D for <gcc-patches@gcc.gnu.org>; Tue, 5 Dec 2023 13:58:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C6687385DC2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C6687385DC2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701784731; cv=none; b=u+STvWsXes3sNzl02b2LI7/F7c0CDjP3RNd8jMfJHT1pkh/XulSpUu2iti9cYvAAU/lkYHsAvoeJNP1w8ed6FPyUXVQBar3nVXXmJKU9vQqoAU+CerHnVkhvKe1E7m3VnrKpcMdbnJcT1v5bUcHqFAm+8qU2CGQUSThTFzHpp04= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701784731; c=relaxed/simple; bh=hQH+qGEgbS0A2MTLtupKJmcmdvabwP64FqNHXKYRu50=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:MIME-Version; b=Ozroa3kO+OH+zrwaJHGg+hPSvo/+SYqj1kH9xn+V8AqbGaVRrJqkwyKt7lTsA3BLQBNxhyqOsArIKUIHl0/79+U8cDFbq4DnpXJHOkFVO3efUp+rN4b4+ds2ZQohq8X5qrog8ABE/wVyEENhu6DLawL46d5nlZkUKXfajj9wsBo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.168.4.150] (unknown [10.168.4.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B200921B6C; Tue, 5 Dec 2023 13:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1701784729; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=c04Ruz2+agv16cOpaa3/btyjQ5z2gAegXs5rOVnodJM=; b=Cfmk5XTtBR5RYwNErv4/c7+kcb/0wE8sOyr2NB0Pm93QwE6Uv5om5/kbRJ6rc3owrQgXkO KpBOvLMcCz4h3eMRubc3SXGYmjZMrB60TGWmR11L4Q0f4HcpMPWb+iIMz819QH7iCfeSG8 j7bYFecIJ5MUAw1qtnkmMfERuq4NNY0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1701784729; h=from:from:reply-to:date:date:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=c04Ruz2+agv16cOpaa3/btyjQ5z2gAegXs5rOVnodJM=; b=3g3Y/iHHq2a+w6RgGUe3eT28kIHG3EOFoZs3rJARNWn+PH+IfcU25rAVJwgeJ0niiOkW1p 4qgpGZ6aT4tnmQCw== Date: Tue, 5 Dec 2023 14:55:05 +0100 (CET) From: Richard Biener <rguenther@suse.de> To: gcc-patches@gcc.gnu.org cc: Jakub Jelinek <jakub@redhat.com> Subject: [PATCH] sanitizer/111736 - skip ASAN for globals in alternate address-space MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [2.40 / 50.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MISSING_MID(2.50)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.00)[15.68%] Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 2.40 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Message-Id: <20231205135923.72256385C6FD@sourceware.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784450660412808711 X-GMAIL-MSGID: 1784450660412808711 |
Series |
sanitizer/111736 - skip ASAN for globals in alternate address-space
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Richard Biener
Dec. 5, 2023, 1:55 p.m. UTC
Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. PR sanitizer/111736 * asan.cc (asan_protect_global): Do not protect globals in non-generic address-space. --- gcc/asan.cc | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/gcc/asan.cc b/gcc/asan.cc index 2424cf69ef1..8d0ffb497cc 100644 --- a/gcc/asan.cc +++ b/gcc/asan.cc @@ -2291,6 +2291,8 @@ asan_protect_global (tree decl, bool ignore_decl_rtl_set_p) || (DECL_SECTION_NAME (decl) != NULL && !symtab_node::get (decl)->implicit_section && !section_sanitized_p (DECL_SECTION_NAME (decl))) + /* Don't protect variables in non-generic address-space. */ + || !ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (TREE_TYPE (decl))) || DECL_SIZE (decl) == 0 || ASAN_RED_ZONE_SIZE * BITS_PER_UNIT > MAX_OFILE_ALIGNMENT || TREE_CODE (DECL_SIZE_UNIT (decl)) != INTEGER_CST