Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp786696rdb; Thu, 22 Feb 2024 22:40:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVrYMT2pXgt3neIO70cUYwGYHSPHU4gZQz15Kq/uSulk1HD6ejuCwQdBciGs/Jt5jZtKwvJrpcHxLBeWy6LaUnTbCU1hDPBBxp1AT3Gug== X-Google-Smtp-Source: AGHT+IFFpbi3pJ+jl22bM+r6EGChmvnVcvRiVXDHGqUgiihjXLukX+jIfWAQ9fZWDanzYWv0ltN0 X-Received: by 2002:a05:6214:5d8c:b0:68f:d3d7:d9bf with SMTP id mf12-20020a0562145d8c00b0068fd3d7d9bfmr1128052qvb.10.1708670448627; Thu, 22 Feb 2024 22:40:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708670448; cv=pass; d=google.com; s=arc-20160816; b=jkMo5HY04OleP0VFU+PgD0OkOClFRIprEKCFmPw0eRL3JBpzG6zORCYc4YRzY1eMQV uLbBrsLmiahEuGDHYAMTdNfkiZz5PhEsYc1QBuxIEGJ2LmU9ZDpwLxdoN8eLGr5XkgqY iROp6ONS+1L9gTlp+AGax6cLD5BnYILIgMyXrLBpDk8+gH+5zR+o65dyNIGL64ktDUJL Hx7Sqf7TUy0fknePAfSS36c5ngsFD1tvgwVqK/BEawaoetQjclrr1zy83WtgIHXxY4fi nHeFPYXZSpHqnhywYYunn2BpnArT3JknsMqnTLVKAt5mxnKLejYdChkGU3tJjHwv5YYt Z3Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=VlAxTgaIbiVQpF/ZQwxp07S3UGXkKE5YGd7hWgHUVZY=; fh=WxAP+TNbQYETYTeHUv3LIENiyKDo1dJdDj9laEK0XiA=; b=MM/fvfxNZ7FIb1xFJ04cdHWkdhwWWA5EmpmaHa+hH3HAQS7cYHtqqrC2OqWMMzVE1o 1evvKmmxiNZ5ixCbpeMecTw5pqqa8V/4gRxLvNXIbeYYVRkBLZ7q6JSJHmrkYQ7k62io MNoNyVOcqhqzdN5uoggcBiAPizVgulxdZFWImPD0eeYKcNT1aqLBbKvaBpoqVXHUtfFy CyQDKovNKMm0d6J3gBWQD8cM4azPq7TRcti31xzRcliWBqgMJbVtMYB9bfwEv0nn2Njc UBnV9mdMqJlozMQ+6aX9Y4KPfZ1tY4MmsSVPWLllm4SbZtwZyoYQJKw/eN3edCGP9uHR h+SA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eV3OchLK; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-77843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jx8-20020a0562142b0800b0068f5cbb3f36si12195898qvb.298.2024.02.22.22.40.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 22:40:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eV3OchLK; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-77843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7336F1C214FE for ; Fri, 23 Feb 2024 06:40:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11C1C12E46; Fri, 23 Feb 2024 06:40:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eV3OchLK" Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B785C12B8F for ; Fri, 23 Feb 2024 06:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708670436; cv=none; b=OiOF4vhxUWpqv6b3q8XL8+LEp/sfHOfLazQH3WjfkRfiM7+3YO1XftkkIBwtl6MDRJJaTfVThwgkR4qd0Px66KXn65z/7yhG6ey2ykj4Er2WH3WutjvhFgCcRTz60PtRDpQ3eYgOYTUO9RPmlTXxm0qGbOy/zRWhotEh5XT1Z7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708670436; c=relaxed/simple; bh=Jyw2KgNMUcRwAe/3vjo2g69lJx3RZu+Q5aJy6+FMHow=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lctlHG87eSdU1TuIndQkVjy9lI73XvP6m1bn4/QwT7p3XfKJsc842Y0TQplev3JSkvU8KYW5NtE+00hSsudnWUUFdTdAU72MsrrqA1ThHFxkAD7yurT6Bca8HhXQ0JLTt+nek8+586v1w4YfRkWcqS977HKae2bvY+9uJhZdDg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=eV3OchLK; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-6e08dd0fa0bso491523b3a.1 for ; Thu, 22 Feb 2024 22:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708670434; x=1709275234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VlAxTgaIbiVQpF/ZQwxp07S3UGXkKE5YGd7hWgHUVZY=; b=eV3OchLKQ+IJMkX7dilqyGYCScwsDzzATI15T2ioXpCYg7sE7CJ3DvJ5Tw4ScpHbPI VXcb/cNPMWAMwWkL1VeT6gj9CERkmGGJ4LrDbcjNQUlWAhOsnb3NHYGDn2+YqYDH6wdS WxbvYEkNQeuPMMWxzWwFix74opGCymt2Khveo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708670434; x=1709275234; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VlAxTgaIbiVQpF/ZQwxp07S3UGXkKE5YGd7hWgHUVZY=; b=e9GJiyU9otjZHyA1QQgkBWf6VRl2Tw1yeKwEPTsmnXKE7rpxq4gBdMwAVl6RaOye3c GFKX1ZXLBoTuKsgbNiehDfN9dCnRt8zNSNFykWYvK4ii2YWbaLgRxapwQ6x0VsX8CvBJ YFmQNW22jIghGSPBYxkHyi2b9JriSm0k6vsjLLzaacL9R8nvg+5NjE1hsOQEPJr/0zMC Mp5/Zq49O/bE+/6Pa1UXql8/wXmGDz/sl1Qgus0wTYhtjA8kAevPzHU9KD2vw+52n+Oe pMWhtffm+JV+muNVGxlIRMkMwMlmCMuv9LB2obrAlN0r2vWXdwZigZFues3j305WL7M+ 1jkA== X-Gm-Message-State: AOJu0YzPgSsiPNpoKtumQsVCsEFQaSD9vdRmZ8RWnSuJSXAqd0L0mGKM mFKPuHVojX75egZxAyH4VIbNvdqiLRExhkA99deJUsviNUluL1v/lJATWQeZDQ== X-Received: by 2002:a05:6a00:4307:b0:6e4:5ff9:f037 with SMTP id cb7-20020a056a00430700b006e45ff9f037mr2262350pfb.12.1708670434104; Thu, 22 Feb 2024 22:40:34 -0800 (PST) Received: from localhost (175.199.125.34.bc.googleusercontent.com. [34.125.199.175]) by smtp.gmail.com with UTF8SMTPSA id fm18-20020a056a002f9200b006e484e13454sm5653680pfb.32.2024.02.22.22.40.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Feb 2024 22:40:33 -0800 (PST) From: Stephen Boyd To: Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Jason Ling , Florian Fainelli , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , llvm@lists.linux.dev Subject: [PATCH] arm64: ftrace: Don't forbid CALL_OPS+CC_OPTIMIZE_FOR_SIZE with Clang Date: Thu, 22 Feb 2024 22:40:29 -0800 Message-ID: <20240223064032.3463229-1-swboyd@chromium.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Per commit b3f11af9b2ce ("arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE"), GCC is silently ignoring `-falign-functions=N` when passed `-Os`, causing functions to be improperly aligned. This doesn't seem to be a problem with Clang though, where enabling CALL_OPS with CC_OPTIMIZE_FOR_SIZE doesn't spit out any warnings at boot about misaligned patch-sites. Only forbid CALL_OPS if GCC is used and we're optimizing for size so that CALL_OPS can be used with clang optimizing for size. Cc: Jason Ling Cc: Florian Fainelli Cc: Mark Rutland Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: Fixes: b3f11af9b2ce ("arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE") Signed-off-by: Stephen Boyd --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index aa7c1d435139..6b96d75a3a3d 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -198,7 +198,7 @@ config ARM64 if DYNAMIC_FTRACE_WITH_ARGS && DYNAMIC_FTRACE_WITH_CALL_OPS select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS \ if (DYNAMIC_FTRACE_WITH_ARGS && !CFI_CLANG && \ - !CC_OPTIMIZE_FOR_SIZE) + (CC_IS_CLANG || !CC_OPTIMIZE_FOR_SIZE)) select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \ if DYNAMIC_FTRACE_WITH_ARGS select HAVE_SAMPLE_FTRACE_DIRECT base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d -- https://chromeos.dev