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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6FA40C2D0DB for ; Mon, 20 Jan 2020 13:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E7AA22314 for ; Mon, 20 Jan 2020 13:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbgATN0P (ORCPT ); Mon, 20 Jan 2020 08:26:15 -0500 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:54619 "EHLO smtp1.de.adit-jv.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgATN0P (ORCPT ); Mon, 20 Jan 2020 08:26:15 -0500 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 805063C04C1; Mon, 20 Jan 2020 14:26:12 +0100 (CET) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0WEtl-NDxPMY; Mon, 20 Jan 2020 14:26:07 +0100 (CET) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 5FC4E3C00C5; Mon, 20 Jan 2020 14:26:07 +0100 (CET) Received: from lxhi-065.adit-jv.com (10.72.93.66) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 20 Jan 2020 14:26:07 +0100 Date: Mon, 20 Jan 2020 14:26:07 +0100 From: Eugeniu Rosca To: Geert Uytterhoeven CC: Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Harish Jenny K N , Eugeniu Rosca , Alexander Graf , Peter Maydell , Paolo Bonzini , Phil Reid , Marc Zyngier , Christoffer Dall , Magnus Damm , Rob Herring , Mark Rutland , , , , , , Eugeniu Rosca Subject: Re: [PATCH v4 0/5] gpio: Add GPIO Aggregator Message-ID: <20200120132607.GB24951@lxhi-065.adit-jv.com> References: <20200115181523.23556-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200115181523.23556-1-geert+renesas@glider.be> X-Originating-IP: [10.72.93.66] Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi Geert, On Wed, Jan 15, 2020 at 07:15:18PM +0100, Geert Uytterhoeven wrote: > Hi all, > > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: > either a GPIO controller is accessible for a user, or it is not. > Currently no mechanism exists to control access to individual GPIOs. > > Hence this adds a GPIO driver to aggregate existing GPIOs, and expose > them as a new gpiochip. This is useful for implementing access control, > and assigning a set of GPIOs to a specific user. Furthermore, this > simplifies and hardens exporting GPIOs to a virtual machine, as the VM > can just grab the full GPIO controller, and no longer needs to care > about which GPIOs to grab and which not, reducing the attack surface. > > Recently, other use cases have been discovered[1]: > - Describing simple GPIO-operated devices in DT, and using the GPIO > Aggregator as a generic GPIO driver for userspace, which is useful > for industrial control. As per comments and test results in [*] (accidentally attached to v3): Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca [*] https://lore.kernel.org/linux-renesas-soc/20200120121439.GA24951@lxhi-065.adit-jv.com/ ("Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater") -- Best Regards, Eugeniu Rosca 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 3B1E4C2D0DB for ; Mon, 20 Jan 2020 13:30:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FAA921835 for ; Mon, 20 Jan 2020 13:30:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FAA921835 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=de.adit-jv.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itX81-0004h0-1s for qemu-devel@archiver.kernel.org; Mon, 20 Jan 2020 08:30:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33024) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itX4N-0000YH-HK for qemu-devel@nongnu.org; Mon, 20 Jan 2020 08:26:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itX4J-00081x-Hd for qemu-devel@nongnu.org; Mon, 20 Jan 2020 08:26:19 -0500 Received: from smtp1.de.adit-jv.com ([93.241.18.167]:37892) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itX4J-00080n-BD for qemu-devel@nongnu.org; Mon, 20 Jan 2020 08:26:15 -0500 Received: from localhost (smtp1.de.adit-jv.com [127.0.0.1]) by smtp1.de.adit-jv.com (Postfix) with ESMTP id 805063C04C1; Mon, 20 Jan 2020 14:26:12 +0100 (CET) Received: from smtp1.de.adit-jv.com ([127.0.0.1]) by localhost (smtp1.de.adit-jv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0WEtl-NDxPMY; Mon, 20 Jan 2020 14:26:07 +0100 (CET) Received: from HI2EXCH01.adit-jv.com (hi2exch01.adit-jv.com [10.72.92.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp1.de.adit-jv.com (Postfix) with ESMTPS id 5FC4E3C00C5; Mon, 20 Jan 2020 14:26:07 +0100 (CET) Received: from lxhi-065.adit-jv.com (10.72.93.66) by HI2EXCH01.adit-jv.com (10.72.92.24) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 20 Jan 2020 14:26:07 +0100 Date: Mon, 20 Jan 2020 14:26:07 +0100 From: Eugeniu Rosca To: Geert Uytterhoeven Subject: Re: [PATCH v4 0/5] gpio: Add GPIO Aggregator Message-ID: <20200120132607.GB24951@lxhi-065.adit-jv.com> References: <20200115181523.23556-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200115181523.23556-1-geert+renesas@glider.be> X-Originating-IP: [10.72.93.66] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 93.241.18.167 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Maydell , qemu-devel@nongnu.org, Phil Reid , Eugeniu Rosca , Jonathan Corbet , Marc Zyngier , Linus Walleij , linux-doc@vger.kernel.org, Magnus Damm , Christoffer Dall , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Bartosz Golaszewski , Rob Herring , Harish Jenny K N , linux-gpio@vger.kernel.org, Paolo Bonzini , Alexander Graf , Eugeniu Rosca Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi Geert, On Wed, Jan 15, 2020 at 07:15:18PM +0100, Geert Uytterhoeven wrote: > Hi all, > > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an all-or-nothing basis: > either a GPIO controller is accessible for a user, or it is not. > Currently no mechanism exists to control access to individual GPIOs. > > Hence this adds a GPIO driver to aggregate existing GPIOs, and expose > them as a new gpiochip. This is useful for implementing access control, > and assigning a set of GPIOs to a specific user. Furthermore, this > simplifies and hardens exporting GPIOs to a virtual machine, as the VM > can just grab the full GPIO controller, and no longer needs to care > about which GPIOs to grab and which not, reducing the attack surface. > > Recently, other use cases have been discovered[1]: > - Describing simple GPIO-operated devices in DT, and using the GPIO > Aggregator as a generic GPIO driver for userspace, which is useful > for industrial control. As per comments and test results in [*] (accidentally attached to v3): Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca [*] https://lore.kernel.org/linux-renesas-soc/20200120121439.GA24951@lxhi-065.adit-jv.com/ ("Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater") -- Best Regards, Eugeniu Rosca