Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A47A4C05027 for ; Wed, 8 Feb 2023 16:41:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231743AbjBHQll (ORCPT ); Wed, 8 Feb 2023 11:41:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbjBHQlD (ORCPT ); Wed, 8 Feb 2023 11:41:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D61ED4E513 for ; Wed, 8 Feb 2023 08:40:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C544161735 for ; Wed, 8 Feb 2023 16:40:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFC6DC433EF; Wed, 8 Feb 2023 16:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675874441; bh=KSTAGgDnOoF+Y8ilpIa2/cv9j+0fPW1oC9ZZcQLM2eE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LFdiQq6ga8XowSHjWP/gHx+MTRZ5gzHOeEQItB6u0vWi/qAM+7TSG3jKpbFM7ST7b HknJHLkLkxSrNsweBODYdwxdhCcwh0ZP6KDRwCyJU1yO6mOkKy8qYEKcaXvB64lfpn 5t0WDjHlkUTIUMzXJ9hPLJ4nKK1YA9uoSz8OxTLGZY/oGJ5o+BeDqc55kJL2VQ4B87 YxoQM4JHEJPWnH2N5G1XeloDTsyVU817GwYyN0sti+KNMVklvT04KqIeKt4+6xi5cW a1l5Zgc6knppsb6GttEz3n6W3/c7nvKpJaBEYvNlwc3B5kdBXl7a+j62nm6XTMgCh2 QXKjMqDmBb5uA== From: Arnd Bergmann To: Josh Poimboeuf , Peter Zijlstra , Borislav Petkov , Marco Elver , Will Deacon , Thomas Gleixner Cc: kasan-dev@googlegroups.com, Dmitry Vyukov , Alexander Potapenko , Andrey Ryabinin , Vincenzo Frascino , Andrey Konovalov , Arnd Bergmann , Miroslav Benes , "Naveen N. Rao" , Sathvika Vasireddy , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] objtool: add UACCESS exceptions for __tsan_volatile_read/write Date: Wed, 8 Feb 2023 17:39:58 +0100 Message-Id: <20230208164011.2287122-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208164011.2287122-1-arnd@kernel.org> References: <20230208164011.2287122-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann A lot of the tsan helpers are already excempt from the UACCESS warnings, but some more functions were added that need the same thing: kernel/kcsan/core.o: warning: objtool: __tsan_volatile_read16+0x0: call to __tsan_unaligned_read16() with UACCESS enabled kernel/kcsan/core.o: warning: objtool: __tsan_volatile_write16+0x0: call to __tsan_unaligned_write16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_read16+0x4: call to __tsan_unaligned_read16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_write16+0x4: call to __tsan_unaligned_write16() with UACCESS enabled Fixes: 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses") Signed-off-by: Arnd Bergmann --- tools/objtool/check.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index e8fb3bf7a2e3..d89ef6957021 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1200,6 +1200,8 @@ static const char *uaccess_safe_builtin[] = { "__tsan_atomic64_compare_exchange_val", "__tsan_atomic_thread_fence", "__tsan_atomic_signal_fence", + "__tsan_unaligned_read16", + "__tsan_unaligned_write16", /* KCOV */ "write_comp_data", "check_kcov_mode", -- 2.39.1