Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2591772lqo; Tue, 14 May 2024 03:37:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3LyCbp8E0undOyD0UF6FvMpTaD3aTn55KG38PkBnlBUpIBoIfU7gtGveX3uyZZdPa21S+BZwwr7ButwOzU7ADKU4iN6fbzybP6k/aBA== X-Google-Smtp-Source: AGHT+IGx5ARvF20yMxsty4fkt6nFwJkP3hQ+T5Y8frez20oiHjQ8lnCNMisS14vMQa8A0G3IEPg+ X-Received: by 2002:a05:6870:9195:b0:23d:5caa:cefc with SMTP id 586e51a60fabf-24172a236admr14306957fac.12.1715683020692; Tue, 14 May 2024 03:37:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715683020; cv=pass; d=google.com; s=arc-20160816; b=JoARDj/E4yR8ymK6gsS3QfgH8jd91FgaAavYjIOgYWAHtiYryJuWbQNOESKpDAWZBA BKer7A5g7hcvXwArbo9jZwG565o+zJFcvPzgGHPbAiU6Pf344Qt0WoUDqKQUrjRE+UtW s7+EFWilm36gKYaCA+IH9Y7/o+yktput6zOtqeNHtTC3rlPDFYwgDpejhsaVZ0OUqkum qbODTUyAXcxUvaqLEnbz5QRHGds3XUSP6oYgJGzA1doRatK34zpABwFdAoZ3PAc9Sipd VmJoupQpeLaRG0T8PG8ThpoyaGMb/eXhxUdKxUYVzpyb6gy3LL9/vZ2+wvrEjgzy79aF UeXA== 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=r6wk4j6Y3ycl2nV4Dg4z8d02Nq2gzcm4qrwGHnkYfK8=; fh=VzOVdMhw4X6Pop50qdtU4gcRr0vN/MFDvrk+U4uouKk=; b=VTeh2TnwoTI0MQb7aqkQxkyot7uS67nYuPXbYX1Us1T4B+4SBrol/zW+14vDfmrpOG 5S1Sl7YMB/xfV0kUbYAJyXTu/ZvkfsN9xoTpx3MNWlsFqXw1H3TcecyQOpTlBuAR5reP CJrjbne1PrUnN3p7kRRnxy8Pxx1xKkACPM5WFtx1ZSQ1nZLpXbqt++m6koTOYjo/Mrn/ x13MkNKQrVMfQT/JKU4CMbTa04CI96US6UQw1Jp0nSt18M7I0HdZ//QMFkM422WlBubN xrLzXOR4OHHDUCugmbF0ydTZ/5A+Sn8fifU40q74DK+djYQrrURhXZIFWSC4zbWDezbI DY8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jTv9LLcT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f6a13si10632967a12.294.2024.05.14.03.37.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 03:37:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jTv9LLcT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 45E6D282645 for ; Tue, 14 May 2024 10:37:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EAAA13B2A9; Tue, 14 May 2024 09:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jTv9LLcT" 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 3F6BE57880; Tue, 14 May 2024 09:54:42 +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=1715680483; cv=none; b=KHjy3/rZBkrFFGDvC6nciPA0GI+1bCRjoY5RUNebRLT+A8UnwjxDULF5bMClxvbd95WsP3uZplHMtNObRQ0IumzzKt5br7Gos9ljk1mnG6Gy9oNQaEnhzBlrvLhKSLc/ktd2z3D3q5E7O0Q8NFYSghHrvEDEUPFFp39Q54+NzBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715680483; c=relaxed/simple; bh=DhlsuRve0S/bf9PTRDFvtnsC2Bg9NA5k/tsCkw0kzBc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YIcLobuoGjRUgHySPHHsdeNZOEqke/vKYaWFuX1NYM2kaJrdmFG90xWl8guNSE7GbVuGIcx0lE3LiKZtlhM21Jbk/XGUcoQDslWZcVh8TVwEjn+eYOSE5adFq6YvNMSzhjYTkJ41ban+zwpdoLzRX0/1C9nIBgYyyB4GOep4Buk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jTv9LLcT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A03C2BD10; Tue, 14 May 2024 09:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715680482; bh=DhlsuRve0S/bf9PTRDFvtnsC2Bg9NA5k/tsCkw0kzBc=; h=From:To:Cc:Subject:Date:From; b=jTv9LLcTc736u0yF7UNrsYkkDfEwr6/7O8roXeX/951T4+DYGToOqyJyCq2Vw/O/N BCXjwIsRX0UZvUhcS+mNYz/vDjM9+idKe+SrK1g0HNPBWFWgqPoJvXXGwcJrjJ5rhv jSxw2dcKwbaAcs2C/FoUuDf5AAoHilDEUMLjnVelAWfCaXht2hV7TYBUGrylIygXKx 2CGs1Qc6Y0pZioC/j8lRHBTI0ORJA3yZnOqLKHP8yXjcF4euCvGIxEJ4NiYBaNp7MR eFlY7/iwoD0K8gUMIERFIAJ8Jmq/jDJk796DojbIndwI5PpGZYlBWGwMofge09rF12 m5xjAqfE3hvCg== From: Masahiro Yamada To: Kees Cook , Marco Elver , Andrey Konovalov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-hardening@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH] ubsan: remove meaningless CONFIG_ARCH_HAS_UBSAN Date: Tue, 14 May 2024 18:54:26 +0900 Message-Id: <20240514095427.541201-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit All architectures can enable UBSAN regardless of ARCH_HAS_UBSAN because there is no "depends on ARCH_HAS_UBSAN" line. Fixes: 918327e9b7ff ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL") Signed-off-by: Masahiro Yamada --- MAINTAINERS | 1 - arch/arm/Kconfig | 1 - arch/arm64/Kconfig | 1 - arch/mips/Kconfig | 1 - arch/parisc/Kconfig | 1 - arch/powerpc/Kconfig | 1 - arch/riscv/Kconfig | 1 - arch/s390/Kconfig | 1 - arch/x86/Kconfig | 1 - lib/Kconfig.ubsan | 3 --- 10 files changed, 12 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index ebf03f5f0619..01124115a991 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22650,7 +22650,6 @@ F: lib/Kconfig.ubsan F: lib/test_ubsan.c F: lib/ubsan.c F: scripts/Makefile.ubsan -K: \bARCH_HAS_UBSAN\b UCLINUX (M68KNOMMU AND COLDFIRE) M: Greg Ungerer diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b14aed3a17ab..284103a56fbb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -30,7 +30,6 @@ config ARM select ARCH_HAVE_NMI_SAFE_CMPXCHG if CPU_V7 || CPU_V7M || CPU_V6K select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_KEEP_MEMBLOCK - select ARCH_HAS_UBSAN select ARCH_MIGHT_HAVE_PC_PARPORT select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 7b11c98b3e84..919f470338ed 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -107,7 +107,6 @@ config ARM64 select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANTS_NO_INSTR select ARCH_WANTS_THP_SWAP if ARM64_4K_PAGES - select ARCH_HAS_UBSAN select ARM_AMBA select ARM_ARCH_TIMER select ARM_GIC diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 516dc7022bd7..dd974ab9b4e0 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -15,7 +15,6 @@ config MIPS select ARCH_HAS_STRNCPY_FROM_USER select ARCH_HAS_STRNLEN_USER select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST - select ARCH_HAS_UBSAN select ARCH_HAS_GCOV_PROFILE_ALL select ARCH_KEEP_MEMBLOCK select ARCH_USE_BUILTIN_BSWAP diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index daafeb20f993..afe348ed1202 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -13,7 +13,6 @@ config PARISC select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_STRICT_KERNEL_RWX select ARCH_HAS_STRICT_MODULE_RWX - select ARCH_HAS_UBSAN select ARCH_HAS_PTE_SPECIAL select ARCH_NO_SG_CHAIN select ARCH_SUPPORTS_HUGETLBFS if PA20 diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 1c4be3373686..185a24424f47 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -154,7 +154,6 @@ config PPC select ARCH_HAS_SYSCALL_WRAPPER if !SPU_BASE && !COMPAT select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UACCESS_FLUSHCACHE - select ARCH_HAS_UBSAN select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_KEEP_MEMBLOCK select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if PPC_RADIX_MMU diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index be09c8836d56..19ce88409c82 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -41,7 +41,6 @@ config RISCV select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE select ARCH_HAS_SYSCALL_WRAPPER select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST - select ARCH_HAS_UBSAN select ARCH_HAS_VDSO_DATA select ARCH_KEEP_MEMBLOCK if ACPI select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 8f01ada6845e..789a5128af9a 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -83,7 +83,6 @@ config S390 select ARCH_HAS_STRICT_KERNEL_RWX select ARCH_HAS_STRICT_MODULE_RWX select ARCH_HAS_SYSCALL_WRAPPER - select ARCH_HAS_UBSAN select ARCH_HAS_VDSO_DATA select ARCH_HAVE_NMI_SAFE_CMPXCHG select ARCH_INLINE_READ_LOCK diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 4474bf32d0a4..2583d8beb3a2 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -100,7 +100,6 @@ config X86 select ARCH_HAS_STRICT_MODULE_RWX select ARCH_HAS_SYNC_CORE_BEFORE_USERMODE select ARCH_HAS_SYSCALL_WRAPPER - select ARCH_HAS_UBSAN select ARCH_HAS_DEBUG_WX select ARCH_HAS_ZONE_DMA_SET if EXPERT select ARCH_HAVE_NMI_SAFE_CMPXCHG diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan index e81e1ac4a919..0d53e085d4f2 100644 --- a/lib/Kconfig.ubsan +++ b/lib/Kconfig.ubsan @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -config ARCH_HAS_UBSAN - bool - menuconfig UBSAN bool "Undefined behaviour sanity checker" help -- 2.40.1