Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752945AbbKYPqz (ORCPT ); Wed, 25 Nov 2015 10:46:55 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38680 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752049AbbKYPqw (ORCPT ); Wed, 25 Nov 2015 10:46:52 -0500 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: gregkh@linuxfoundation.org, stern@rowland.harvard.edu, kborer@gmail.com Cc: reillyg@chromium.org, keescook@chromium.org, linux-api@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, jorgelo@chromium.org, dan.carpenter@oracle.com, =?UTF-8?q?Emilio=20L=C3=B3pez?= Subject: [PATCH v1 0/1] ioctl to disallow detaching kernel USB drivers Date: Wed, 25 Nov 2015 12:45:33 -0300 Message-Id: <1448466334-21346-1-git-send-email-emilio.lopez@collabora.co.uk> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1424 Lines: 40 Hi everyone, This patch introduces a new ioctl, USBDEVFS_DROP_PRIVILEGES, to voluntarily forgo the ability to issue ioctls which may interfere with other users of the USB device. This feature allows a privileged process (in the case of Chrome OS, permission_broker) to open a USB device node and then drop a number of capabilities that are considered "privileged". These privileges include the ability to reset the device if there are other users (most notably a kernel driver) or to disconnect a kernel driver from the device. The file descriptor can then be passed to an unprivileged process. This is useful for granting a process access to a device with multiple functions. It won't be able to use its access to one function to disrupt or take over control of another function. This patch is currently being used in Chrome OS; I have updated it to be in line with changes in v4.4-rc. Cheers! Emilio Reilly Grant (1): usb: devio: Add ioctl to disallow detaching kernel USB drivers. drivers/usb/core/devio.c | 50 +++++++++++++++++++++++++++++++++++---- include/uapi/linux/usbdevice_fs.h | 1 + 2 files changed, 47 insertions(+), 4 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/