From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0875C33CAF for ; Thu, 16 Jan 2020 19:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B1292073A for ; Thu, 16 Jan 2020 19:20:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579202409; bh=u9JD3C4YLpxJEKI/OEJ1TDTW/fEAkI4JriQ09cx7GO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OBQZCU24ZtiUx7oXeVyxLuct/1tPWZoE/tUAY2HUzEIRZzlDYc3A9pJ51/1QjOaqn HbrBaQZGECdgb4lNo9E0KgBh5hvSH6eCOA1gH8R5gG33Px94SwWAhzoHAPyZXzQsLv 2IBUQarg7lxXLDro4kkYMiskNsEw1xT18L90Lzrg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437607AbgAPTUI (ORCPT ); Thu, 16 Jan 2020 14:20:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:38374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731498AbgAPQyG (ORCPT ); Thu, 16 Jan 2020 11:54:06 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF286214AF; Thu, 16 Jan 2020 16:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579193645; bh=u9JD3C4YLpxJEKI/OEJ1TDTW/fEAkI4JriQ09cx7GO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yRFkAxh1nRu99Tgg8wN2y7HgkY9U8bRTAMQCR7FjuROljy9EeeWSo0JtyzEDChhGT gna4Jrom3c2SmFzuF9jN25nE5LQD5FWJJCD10SrgDnwk25p+L4tMOjaHn2Abi2eEKg Ah6lZ+8ir9OfQ94gajIxOLnntY7LIzKRKeivauKk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Anton Ivanov , Richard Weinberger , Sasha Levin , linux-um@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 176/205] um: virtio_uml: Disallow modular build Date: Thu, 16 Jan 2020 11:42:31 -0500 Message-Id: <20200116164300.6705-176-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116164300.6705-1-sashal@kernel.org> References: <20200116164300.6705-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit bf9f80cf0ccab5f346f7d3cdc445da8fcfe6ce34 ] This driver *can* be a module, but then its parameters (socket path) are untrusted data from inside the VM, and that isn't allowed. Allow the code to only be built-in to avoid that. Fixes: 5d38f324993f ("um: drivers: Add virtio vhost-user driver") Signed-off-by: Johannes Berg Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/drivers/Kconfig | 2 +- arch/um/drivers/virtio_uml.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig index fea5a0d522dc..388096fb45a2 100644 --- a/arch/um/drivers/Kconfig +++ b/arch/um/drivers/Kconfig @@ -337,7 +337,7 @@ config UML_NET_SLIRP endmenu config VIRTIO_UML - tristate "UML driver for virtio devices" + bool "UML driver for virtio devices" select VIRTIO help This driver provides support for virtio based paravirtual device diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c index c5643a59a8c7..179b41ad63ba 100644 --- a/arch/um/drivers/virtio_uml.c +++ b/arch/um/drivers/virtio_uml.c @@ -4,12 +4,12 @@ * * Copyright(c) 2019 Intel Corporation * - * This module allows virtio devices to be used over a vhost-user socket. + * This driver allows virtio devices to be used over a vhost-user socket. * * Guest devices can be instantiated by kernel module or command line * parameters. One device will be created for each parameter. Syntax: * - * [virtio_uml.]device=:[:] + * virtio_uml.device=:[:] * where: * := vhost-user socket path to connect * := virtio device id (as in virtio_ids.h) -- 2.20.1