From patchwork Mon Oct 14 14:46:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13835157 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 A36C21CACE9 for ; Mon, 14 Oct 2024 14:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917245; cv=none; b=VR8WzMcvxoEdLMvSGUrBYR/M0PQhYMnAeqXsW7zqH1gtqbd1Rpfgd/wZKRAf87X8MM3UnqnlPpou1VmhkLCClj7wjEZj00d8SthYrg+CLMJicbo+6DOYSbvnr4A8BLFb8JuxbcQxUn0cEUu6gkMHdXRgWKbSuX/FpAyGHKDGZLw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728917245; c=relaxed/simple; bh=e4ylo1FCKZby+zq0gRFyJO22hmlj0ioJwGzNWFVJP5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=odfn18iBJyHZ7w4JV9inMRlrBnhwD/9SIC7T6t0EESkzIgfSh/4mdHk0UpXyQ4kjfEPcWYTavLIDzFhgKyw1Rq+RnMFd+s+hhHCZGJVi3IVKdSN2mkR5Hidzu5mhVPpeEVoCOudg0AMtZnNLIlxtQfOgD6D5A/IQ4oFBpQMH37E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D4+emzVa; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D4+emzVa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728917242; 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=TEhGx1JLq9dSKRa67DDmtCgVp6iAA+J1mNausVPzC38=; b=D4+emzVa8gi5WcZj8DVqlo+9NUF6aOZ34opGUilY1VmyjeqAES9tmRCh2LDB2GZZt5zBYj KFAkZF26rFl5aGPVYS1jimziCjcYC79KaQZ1peMvRch97eQphu2GP8Ro/LqsmUQb8lj39A ayb80iwxTOwDic6KIuGtyYNfAgDXtKw= Received: from mx-prod-mc-04.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-643-EvDDUXnzPSm_Vd_naOQgNw-1; Mon, 14 Oct 2024 10:47:19 -0400 X-MC-Unique: EvDDUXnzPSm_Vd_naOQgNw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6078819560B5; Mon, 14 Oct 2024 14:47:17 +0000 (UTC) Received: from t14s.cit.tum.de (unknown [10.22.32.146]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7C87E1955E8F; Mon, 14 Oct 2024 14:47:10 +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, linux-doc@vger.kernel.org, kvm@vger.kernel.org, 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 , Jonathan Corbet , Mario Casquero Subject: [PATCH v2 6/7] lib/Kconfig.debug: default STRICT_DEVMEM to "y" on s390 Date: Mon, 14 Oct 2024 16:46:18 +0200 Message-ID: <20241014144622.876731-7-david@redhat.com> In-Reply-To: <20241014144622.876731-1-david@redhat.com> References: <20241014144622.876731-1-david@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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. Tested-by: Mario Casquero Signed-off-by: David Hildenbrand Acked-by: Heiko Carstens --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 7315f643817a..e7a917540e2a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1905,7 +1905,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