From patchwork Tue Sep 10 19:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13799285 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BC30EDE9AD for ; Tue, 10 Sep 2024 19:16:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 335B28D00A9; Tue, 10 Sep 2024 15:16:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E5F78D0002; Tue, 10 Sep 2024 15:16:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15E718D00A9; Tue, 10 Sep 2024 15:16:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E72A58D0002 for ; Tue, 10 Sep 2024 15:16:23 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 9A359409B3 for ; Tue, 10 Sep 2024 19:16:23 +0000 (UTC) X-FDA: 82549784646.30.22EAC8B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf14.hostedemail.com (Postfix) with ESMTP id EF767100018 for ; Tue, 10 Sep 2024 19:16:21 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AeEKVmnG; spf=pass (imf14.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725995678; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5dwp1+ZWlakCCMbjLs+RuljQC2sU4OdCWLWut1FtVKY=; b=c1KAQKUGUhyqF+RRZ90Ru5heciYIC5BSARvxAdHn8s/9knr6zJPq9JgA2/4JqTZkXYoK6A +eO5UF+NKpDGgl9xVxBskrwviUFBcq7k/yKonb0ih7Cqvi/XnH4spnDDVWYSUjx583tGA2 pEZKgMUbhYJtd8HLdbZpTnxMvHn5xG0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725995678; a=rsa-sha256; cv=none; b=NNRvKQI+HSL7wbt7o2Hnp8+MWvs34WtZWcGkgGFMf07BV8C3d41VVCzRCMInhhW7tK/XSe oJ+bqGLwBDVwlzZATskPWOXhX98/1E4BheFongwFlMN8AHzgfLVPxBjXJcFairiEycRXnp RTyPTLJu+Aj0figNcC+9jvSWqMzlBKo= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AeEKVmnG; spf=pass (imf14.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725995781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5dwp1+ZWlakCCMbjLs+RuljQC2sU4OdCWLWut1FtVKY=; b=AeEKVmnG5HssL77rPvUa4egyndi3n54UxKNx+GSUzR7ZhHvaFLdIzY0Uw8u5JGVNKb6SJX 7K0PLflM2Pm24LT6r3TljaMMoFe9fYSjv1wKjsAZ8c/SI6l4UjveD460Uu6DLrwBx5/gq0 ImvnGyxtYTnmk5qY6kpX+ha2IWasyE4= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-221-xIwG_QIJM6al6Jomp-rQGQ-1; Tue, 10 Sep 2024 15:16:19 -0400 X-MC-Unique: xIwG_QIJM6al6Jomp-rQGQ-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 64853193E8EC; Tue, 10 Sep 2024 19:16:17 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.22.17.222]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6AF713001D0F; Tue, 10 Sep 2024 19:16:11 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-s390@vger.kernel.org, virtualization@lists.linux.dev, David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Huth , Cornelia Huck , Janosch Frank , Claudio Imbrenda , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Andrew Morton Subject: [PATCH v1 4/5] lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390x Date: Tue, 10 Sep 2024 21:15:38 +0200 Message-ID: <20240910191541.2179655-5-david@redhat.com> In-Reply-To: <20240910191541.2179655-1-david@redhat.com> References: <20240910191541.2179655-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EF767100018 X-Stat-Signature: 3ywtdhhqdq3x817dqz4y1y4jyow4rs19 X-HE-Tag: 1725995781-225091 X-HE-Meta: U2FsdGVkX1/SvPOe6k1kEsIHaj0gCBzDq6wG2iRXW4pd4ZtlY0SorhVtS+FJj3pDAtptXgn7Dyv8fblVagTOMjorBl+1hKVacVG4hpe9baxirTpV2AH9rwoE/fb9S98dX+eEK/ll2pu3vjio2+YtHHpwPfghv112HdvNyKOD3UwGLdS97ceDATy4KPOx01kkcy9mov1/2wLPfHMkgHRax46IddyOFVjzsunoj2qJTwB/ytFsE7VSHQ78CQcL7StalQ0Kwmfl8xJTXFIuRUIMpYAle4dAm1T6nSOcbLAz3jsWKyk834xAonTzJGMNsOTlA9DDxEP0utDovz/9Ue60zeJckR922LPdoXFuO3QVl89CJI7asn38mR39qmgkO3k9x25B8/CAfKensX5KAVUy9ABglgO8sC0jlCNrre4GtF5gQGfNhtEtb7zr6pi2P6aPE0NTv29lXDiHvPNurICiGXB/vCmjxv5UFwHcmhxiQdMVBJFha6UHcExGOWPb5lQX4PY7p/8n/IbdobaIsY5hhqEcfVRHB4Y4yjrksiyzAWcjNd7Q8gPSWUOQ/OdPLLC4fUSJM83D4FegZ4MVIYqGYRV3iajl5Un+3782uVQ+C1MgFFyR08MiWejvsTgVKQ63U7ZaIh5/wki9TVHvraxXHoA+W/dc7MMBErGLeKKcr2zce80f/E2KXA6/BVux7dPgQxnEL6vFlailMZDscaQ7BDwo2are6WYx+5p/RoThP4lPgPjNRy8NSyMfI0NrzRcfILba7SrHkqIOLT1LKvdL2lx+hVp0m1U4eQ6Uf0l18CETyENMXtTqkFC4E01JX31fjANWW5x0tdFnIwf528JdV0LdwFhbFaczUT6GEtMZd4q0ildz3WUzRmQBJAr9sL62ro6DeJbPZgmdfc1Tj1WyQ/SA98E3ghorVvyzL0IiSdSy7hM8Nyl8JAQCiaG1xX+PLP+2OPeN+Tm+XKMJPzt AWn60avY 7NRahrmE/xMAUJbJhTXtgNiTXhPgzz36Sch5uItE+luJq+Fr7Wzk0bIY8C5XSMqb7+gWGgK7ndOZhTaENRrKuLFvJJLsT1G7FlA1MFjwZzRYf5JZ2pdfGzS0eMs3ZyBgeccnWO91bnpYK9K9or+y9yMTWAtj3B8WtqAVuDvwTsQhlrrRFxd8lyujxclG4MOr4Zt1nQb77eDNjTiLW5rY1b6ApxJNFyrJZgpIKdICT8S67iAcGSDMhKp773yVe5Vxrgbd5ELmxBveUloVmc4Kiow6MaRQA0/JFEezrhTToxEGX1DhrOem7XD/biV2YBDbjvwy+xyBI2XgDzAbBGBo4BXj4U/UlvhqjhPhUZEmhX5Nt45MWn8gqR8cVxQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: virtio-mem currently depends on !DEVMEM | STRICT_DEVMEM. Let's default STRICT_DEVMEM to "y" just like we do for arm64 and x86. There could be ways in the future to filter access to virtio-mem device memory even without STRICT_DEVMEM, but for now let's just keep it simple. Signed-off-by: David Hildenbrand --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index a30c03a66172..fce22ce54983 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1887,7 +1887,7 @@ config STRICT_DEVMEM bool "Filter access to /dev/mem" depends on MMU && DEVMEM depends on ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED - default y if PPC || X86 || ARM64 + default y if PPC || X86 || ARM64 || S390 help If this option is disabled, you allow userspace (root) access to all of memory, including kernel and userspace memory. Accidental