From patchwork Thu Jan 3 00:02:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10746711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1D8591E for ; Thu, 3 Jan 2019 00:02:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA1E627E71 for ; Thu, 3 Jan 2019 00:02:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE90C28399; Thu, 3 Jan 2019 00:02:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55EE927E71 for ; Thu, 3 Jan 2019 00:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726136AbfACAC1 (ORCPT ); Wed, 2 Jan 2019 19:02:27 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45570 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbfACAC1 (ORCPT ); Wed, 2 Jan 2019 19:02:27 -0500 Received: by mail-pf1-f195.google.com with SMTP id g62so15844995pfd.12 for ; Wed, 02 Jan 2019 16:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=XegKRqQNwELnHOVCfSkZODWxzEPM42Lqqg4XgBJw9IM=; b=IOCjtxOpeyUXTnR49867Q0wNXdVYqfK/qnMpT9rsXIx+oKbQe67XlpdHG8QYwL1l5T MKyJuyE9hEtZhbjbp8gb3NRir70pHA1JtEVCLn0yB8hm+w0tkfWAJvL9o7j7s0m95cg3 wdCa+r/tDzSbZXJ01/f0JaGnOGlbI06xxYwUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XegKRqQNwELnHOVCfSkZODWxzEPM42Lqqg4XgBJw9IM=; b=SO/4i4Z2SHfIUXioDspTXeMGzV6eT9S30sBq1lXgAdgZwEhalNY2k8vUpq6pwcJ31Y NADKUZsY90R1K8pfDNqmhBsDvBgaYy4a2jGKx5L9ns9iT9G/OgFjWG5000TO6TgM9MVi +jz8RJiRSTwtsnf5ErDFjOL5kD4pvGbhIOlqTRtzQYGhl2R+6zpqnim2V/SslF6DD4+B cUgWYLF/lLMZSqrmMwtxo3uAcoxz5NAH3uTeR6pREHCLDh7bYOa4Yk1ArNxuz/g/3Bni FwZonRxACVLdE2j33NB2TByrY0faTtJjpPFJuHqI5ggua941ta6Y/iReucQBeTygVuDs fAWQ== X-Gm-Message-State: AJcUukdZjaE4ZksQBBbOep9vqrTheUeaXib1pHusz814os3THgtwybHk me0I8xvE4fZ1UWnLAMvd9Gfjrpf0dLE= X-Google-Smtp-Source: ALg8bN7Qy7Int0Wh0u5MAq9VM1IwQjO52o+Xo7I3h0ywe9OYVZskiOfvR8zWKxCHfVYPA+qbdHLV/Q== X-Received: by 2002:a63:4665:: with SMTP id v37mr15454615pgk.425.1546473746517; Wed, 02 Jan 2019 16:02:26 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id u6sm60291199pgr.79.2019.01.02.16.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Jan 2019 16:02:25 -0800 (PST) From: Evan Green To: Andy Gross Cc: Bjorn Andersson , Brian Norris , Ben Chan , Evan Green , linux-arm-msm@vger.kernel.org, David Brown , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] soc: qcom: rmtfs-mem: Support non-root rmtfs daemons Date: Wed, 2 Jan 2019 16:02:11 -0800 Message-Id: <20190103000213.230652-1-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series contains minor fixes needed to better support running an rmtfs daemon from an unprivileged process: - Enable uevents on the child character device by adding a struct class to the parent. I needed these so that I could change the ownership of /dev/qcom_rmtfs_mem1, and drove myself crazy trying to understand why my udev rules never fired. - Enable access to phys_addr and size sysfs attributes. The daemon needs to read these, and they don't really contain anything sensitive, so expose them. I still need CAP_NET_ADMIN to be able to bind to the right qrtr port, but at least with these changes I can run as a different user, and drop all other privileges. Changes in v3: - Removed spurious whitespace changes (Brian, Bjorn) Changes in v2: - Moved class registration/deregistration into init/exit routines (Brian) Evan Green (2): soc: qcom: rmtfs-mem: Add class to enable uevents soc: qcom: rmtfs-mem: Make sysfs attributes world-readable drivers/soc/qcom/rmtfs_mem.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-)