Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4827078ybl; Wed, 22 Jan 2020 05:29:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxvuwQF2xUa3VSXiAa9dHcq+xtBir4g69UEOOeBLRusq5DX7HCebOFmma9QtTVtkB2evybx X-Received: by 2002:a05:6808:2d2:: with SMTP id a18mr6899958oid.120.1579699751669; Wed, 22 Jan 2020 05:29:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699751; cv=none; d=google.com; s=arc-20160816; b=F/59uEXXbF5FXMQyLxDKpVGn2zZmxX9UTT1oXSapWy8PTkcjOKkjzhkjQLoM/6pt7h VRqllxXNfSavXnCe6hTiPHIV3KRHJILg9JNQj5b1taJ/0WJPEYzQiPpOyO58Ptbi1LGv Ta/f+KJuAs4w3hjldxYNH7CYGmRh/tVjXZjskyEaXNGCBeGUyyN+1SqYK/l8DumZ+8Qo tGcpS7Wvn0J2uLnQcCE7arQgD6+xEYfRsbE+h0POv3oUyixi9GAkX7fTj1WaFLOOUA+l tTFK7Yc4+oo/fNmfnugs4wyMTWDh46v6j5RgKjIIiOPyX5F9YY6XOrSi4AKBEu8ZP/CP TQaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iUFozWF4UPtC2AfpzXjW0I0EU3UT2Y6F6ttjvnALJlE=; b=ENyNmUK6KbPx6FCJUiS1JqSVceYXsCNuxIJTcBWcSolTWmcXqwQKjwpb6jIN7Gn/ZU 0oXf6tWzsGTimgAqNf/oKXHUH2uDtcu/j0bkL4GK11KhH1jUmico+JJicbZyzOXzZFL2 PeaK9ibx+jAhxk3LuoqIgbFY7LU7qFpMs+5o8r5by8bd+1ME9/PQ6kLH4zJEMB64MB41 qXtpb4PFSVorrVDKmn90kjFENUPlppN/v9MFlJyDiXcGm6pMEEw8ZCaaqv+jlDXsfpaN UbPC8tSoAZ+qBUiRMCY4i3INP29LglFtejFRVIrPfp1cZDP9vLC0w65F8Ev1ZVVdYKUD YHVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wI8WR+Fd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i17si12221730otr.14.2020.01.22.05.28.59; Wed, 22 Jan 2020 05:29:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wI8WR+Fd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730742AbgAVN04 (ORCPT + 99 others); Wed, 22 Jan 2020 08:26:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:48018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728927AbgAVN0y (ORCPT ); Wed, 22 Jan 2020 08:26:54 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B5FE2467B; Wed, 22 Jan 2020 13:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699613; bh=Ptih1HcvbYD2D0cVEP4/ui41M6xsgb9I+l94+a+B82I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wI8WR+Fd+PS518rnrEjm1iRhM91+uuPguvVySZNCDAOMy6lc+Zsmirtk8nODjPobl idvnyc29bdOyD9C6nfj6ngVWnqYRnVQP/0wHcvU83baMfnch6dS+tEf+7CCmLNVmf4 Od1Tezk2NM8cTMpvkidypOD70FyAwyVs7zFCQC6c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Anton Ivanov , Richard Weinberger Subject: [PATCH 5.4 197/222] um: virtio_uml: Disallow modular build Date: Wed, 22 Jan 2020 10:29:43 +0100 Message-Id: <20200122092847.815724717@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 commit bf9f80cf0ccab5f346f7d3cdc445da8fcfe6ce34 upstream. 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: Greg Kroah-Hartman --- arch/um/drivers/Kconfig | 2 +- arch/um/drivers/virtio_uml.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- 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 --- 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)