From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 590993858407; Tue, 9 Jan 2024 18:55:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 590993858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 590993858407 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704826512; cv=none; b=U2WGdP06T3xNE4kf66BGYr97AkxbERWCskWIBJzmK2JO/VgAGAMIj0RN8R6cc1A9r7aEbZraYjhqmy1QhKwWp+Ljc7NGB46iA7yIJ9l3uE+BDtH8qBBynE8jIAf0AqCW73qQz7OjcFkVs4y71DN77jfgBHvZJXGdqeVIty0PJiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704826512; c=relaxed/simple; bh=sidaO/OE5zlem7u3nl2JXfP2AvOJWBgcvuBbNXRRdvY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=TEmDFQVHgdZKDWtBMuQuOiFGDWqCTuOA17qK/k3c7DszAQOQzPHefACacvmdKs8CL/RAjzWlZciBbQm1ITHCZ5gB7vceBvV/wE/+j2JSkrsqIf35AoeF/eeD8kDbgqPfSmT70knAEjytQJgw/29/QMJ0p/+VG+dZgHv198cHSmA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3607bb6596aso13581015ab.1; Tue, 09 Jan 2024 10:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704826509; x=1705431309; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hxI18si0sisM1YoXKryc9bgyWHLInvwmDbo4NGGWaGw=; b=ZTc5FPFQp2+re+XB2CfwH0UhePaxa3RuKi3+mtjvY3ex/IYgVUFDyqCI6ucUUbEaE3 RLpfR1yXiWZs8vxOMYjyXSzRwFTghkXcb3IzkPrYLFcpBIaFRSd9aWRhCa0u1hRhM2Lv g4dtFkLyGNl/h7eUTH36cf7xe1hYwiQRWC2OEj3DdnZ4z8hA+s/TdKFgVzCs/sw+LIEM XHGx6qXjCuFdh07XYtxQXe/FlGBWsQMt14SaYu3RL9G9UTH1WmwLy6Z1UfYtAUOipnsa PAo8yI623Z1Mz7hVTu7403Z7StTCneqNRwDU0WXQ6cf5eFRXHwyIRkf/EO9o14o9JkrP h1Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704826509; x=1705431309; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hxI18si0sisM1YoXKryc9bgyWHLInvwmDbo4NGGWaGw=; b=sgwArJyJVJwR+RG307MxeRxLbgbf89e8oHTLCSehgPZ4tyO89EDrSE0xYafRDzmN0Z E21lazvfU7woaRwpYi5olcEIGRNjc+Zi8APnJvYxL5Vpfdgurm3gH76uLUhvq2ZXZlUM vXYO0mC22tg2lGfXy8DxzQdmENnekda8E4V6EI+QXNBLdtKwkbLI+gVzcrjAp7YkcaUg ihiE5eBy43iA/KqDDgGqS7mJuB4s4jfIcTEs+MEVzotDqgihutep3Gzawite6xdYxqM+ i0hnQaK4qTrAmNMMehUa6SctdeC7KBrQGH6bBrom4fXRzWloEnn7WJM+/bFRQZPR5jcP +TGQ== X-Gm-Message-State: AOJu0YyjaOtfrAxe9e9DDGqj6HvJVKi7SFGqO3FXOU7HbA3OGdi/sK7X bSZxymbdwevHUURcK4ezZDL8tTuBSNU= X-Google-Smtp-Source: AGHT+IG6VQRVbVAos4dHqxwwjesll/TmX2oiOg6y3eK6bCB/ggYqE+1IRLOTZClOAM69LjnlxU/Lbg== X-Received: by 2002:a05:6e02:1a0f:b0:35f:ef06:637 with SMTP id s15-20020a056e021a0f00b0035fef060637mr6452666ild.36.1704826507981; Tue, 09 Jan 2024 10:55:07 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id cq4-20020a056638478400b00468ed10d45esm795245jab.154.2024.01.09.10.55.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jan 2024 10:55:07 -0800 (PST) Message-ID: <31208620-16ed-4453-af96-cfdc463d0adc@gmail.com> Date: Tue, 9 Jan 2024 11:55:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] asan: Align .LASANPC on function boundary Content-Language: en-US To: Ilya Leoshkevich , Jakub Jelinek , Jeff Law , Richard Sandiford Cc: Andreas Krebbel , gcc-patches@gcc.gnu.org, Segher Boessenkool , Stefan Schulze Frielinghaus References: <20240102194511.3171559-1-iii@linux.ibm.com> <20240102194511.3171559-3-iii@linux.ibm.com> From: Jeff Law In-Reply-To: <20240102194511.3171559-3-iii@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 List-Id: On 1/2/24 12:41, Ilya Leoshkevich wrote: > GCC can emit code between the function label and the .LASANPC label, > making the latter unaligned. Some architectures cannot load unaligned > labels directly and require literal pool entries, which is inefficient. > > Move the invocation of asan_function_start to > ASM_OUTPUT_FUNCTION_LABEL, which guarantees that no additional code is > emitted. This allows setting the .LASANPC label alignment to the > respective function alignment. > --- > gcc/asan.cc | 6 ++---- > gcc/config/i386/i386.cc | 2 +- > gcc/config/s390/s390.cc | 2 +- > gcc/defaults.h | 2 +- > gcc/final.cc | 3 --- > gcc/output.h | 4 ++++ > gcc/varasm.cc | 14 ++++++++++++++ > 7 files changed, 23 insertions(+), 10 deletions(-) So this needs a ChangeLog obviously. I assume you've tested on s390[x]. It should also be tested on x86 since it's the only other platform that redefined ASM_OUTPUT_FUNCTION_LABEL. Assuming those tests pass without regression, then this is fine for the trunk. Thanks, Jeff