Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2567797ybl; Mon, 20 Jan 2020 05:27:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwRLMAR6qCsWP2ycCzk5fBda80JXpfzX1i60BV+kK8nH9WzyhNuPmPy8X/8MlQDRt3HfMyI X-Received: by 2002:aca:490e:: with SMTP id w14mr12567610oia.67.1579526842653; Mon, 20 Jan 2020 05:27:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579526842; cv=none; d=google.com; s=arc-20160816; b=Tyd7Pt1GmtzLLe7jpaDHViorX260GFVezjXHCshufR1oTar7navScWH6yKPX2gp6oT Iqg/5+WtzO+TPWbv4RnVWlQXwaBm7HpHQXR3t73NFEdqPLmjvRvMvzK2jM4f1biY2VMn ApSGZgpOvLIXlqNGB89JKa9NEg+3GZiQ8+9FACXkcDStrJF6OuiOJc2NYaqqOvDLEBz9 Bz9zxv/+9KAx+5jEcfijKT/Ui2WkCsVGwR8HqCnK9V2Pw9nUfL2jG5ySZeAOsLRZE42G J8+3/VdyYejOV3jy1kabqYwMHx1380HNf4dSsTDA1SFxwoHZCT5jFTxqmqcP+DWG1sY2 dBxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4iiP7DDWJQ0PAha+WDD8HfP2GwQpC8lp9cMYBCxnso4=; b=qwmziIpj6Fck0NfN1jh/gm40ki8rAKqw+Eg+ZhXnpx0mooeHpYltIWsadTSykg19np pdZJRyI+7wTYJ1FwE39XUGc4hVgDJIWhKi83vSjYooZVJTYxh80l/lPhGBwQwUeKbYey njfAnAsvYaJnjaXAK43inR4R3+B6Lm2ax7XlpmaO0hd1nenS5bS9z3Y5gHndtB3OKGPx 4m4OakW+4OxXyz6hL0uVCCOsFngymXDA/wivJFaRfMLv2AadyhRR4H5++/wMXFCEtWJL a7wzhvS4SHgkeb3n804339necLU56BpRRnkQkJt/I8t8+PKfPVsqONs3QsDTW5xeQRZ9 Rdbg== ARC-Authentication-Results: i=1; mx.google.com; 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 w1si18140090oia.169.2020.01.20.05.27.09; Mon, 20 Jan 2020 05:27:22 -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; 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 S1726982AbgATN0Q (ORCPT + 99 others); Mon, 20 Jan 2020 08:26:16 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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