From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15D291E008B; Wed, 6 Nov 2024 12:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730897418; cv=none; b=XZlPEk1lnpks5pG/AoIwwXdRQol9GUtinK02wKeazakVzc4UeRptjglgoCdONvfDPZHZEkuvBm195hcWWwsX5VaCBKY2YIdKnrMgr/7sswN0fez8/AR69H2N5XLOb+dhD9M0rMsOdiRTEaucrtZwGeGUYdxQyZo9n8xTQSkwg28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730897418; c=relaxed/simple; bh=rN11O6qlghfNjhL4WiS7dav9eQR0vMRPGqZ5MvadziY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nk1zzSvcozGIy9lLKU1lcttt89HN5Fx6+n8bFYYI45jC7owAkuOtT0uijhUqjWXff6Wm/5lOgWp5rMvSpIJ+eCfsCVE48j4afHLAMmIn54fCju+G8uwHiTs3rBRvmXGyY/cUSJ8xuuP/Orxs8HLsAAS6HNthv8GSD4VLTDm0mos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RetZyt1g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RetZyt1g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CB79C4CED4; Wed, 6 Nov 2024 12:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730897417; bh=rN11O6qlghfNjhL4WiS7dav9eQR0vMRPGqZ5MvadziY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RetZyt1gYJtjp6uszk+T2fjsQfMNvKD9qE0ZRG8byMYW2hrPXlIYpIragEAxkGl5I SumNtMti41T+1hDIXCFcjzx8FT1woqc9TdJjxn19qIvTVslShARPKNQFXjkLSp7wrV HKLkaOfDEefKpKcwFZTp4TinlhlMD1fc2oyEJoNc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+908886656a02769af987@syzkaller.appspotmail.com, Andrey Konovalov , Andrew Pinski , Mark Rutland , Will Deacon , Marco Elver , Sasha Levin Subject: [PATCH 6.6 047/151] kasan: Fix Software Tag-Based KASAN with GCC Date: Wed, 6 Nov 2024 13:03:55 +0100 Message-ID: <20241106120310.128091557@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106120308.841299741@linuxfoundation.org> References: <20241106120308.841299741@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marco Elver [ Upstream commit 894b00a3350c560990638bdf89bdf1f3d5491950 ] Per [1], -fsanitize=kernel-hwaddress with GCC currently does not disable instrumentation in functions with __attribute__((no_sanitize_address)). However, __attribute__((no_sanitize("hwaddress"))) does correctly disable instrumentation. Use it instead. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117196 [1] Link: https://lore.kernel.org/r/000000000000f362e80620e27859@google.com Link: https://lore.kernel.org/r/ZvFGwKfoC4yVjN_X@J2N7QTR9R3 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218854 Reported-by: syzbot+908886656a02769af987@syzkaller.appspotmail.com Tested-by: Andrey Konovalov Cc: Andrew Pinski Cc: Mark Rutland Cc: Will Deacon Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Fixes: 7b861a53e46b ("kasan: Bump required compiler version") Link: https://lore.kernel.org/r/20241021120013.3209481-1-elver@google.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- include/linux/compiler-gcc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 8c9a095c17571..9e6961078c2aa 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -102,7 +102,11 @@ #define __noscs __attribute__((__no_sanitize__("shadow-call-stack"))) #endif +#ifdef __SANITIZE_HWADDRESS__ +#define __no_sanitize_address __attribute__((__no_sanitize__("hwaddress"))) +#else #define __no_sanitize_address __attribute__((__no_sanitize_address__)) +#endif #if defined(__SANITIZE_THREAD__) #define __no_sanitize_thread __attribute__((__no_sanitize_thread__)) -- 2.43.0