From patchwork Fri Dec 21 20:09:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10741015 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 E297C14DE for ; Fri, 21 Dec 2018 20:10:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE13A2848B for ; Fri, 21 Dec 2018 20:10:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0782851E; Fri, 21 Dec 2018 20:10:11 +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 646312848B for ; Fri, 21 Dec 2018 20:10:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389698AbeLUUKL (ORCPT ); Fri, 21 Dec 2018 15:10:11 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34028 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389015AbeLUUKK (ORCPT ); Fri, 21 Dec 2018 15:10:10 -0500 Received: by mail-pf1-f196.google.com with SMTP id h3so3079685pfg.1 for ; Fri, 21 Dec 2018 12:10:10 -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=EQAIQUQsGcLI8rqNjfwTQN3sEVOL/4WZkv+xAEAj404=; b=di3eqWtmE28dmOERpS2sBG/HSbxaz/0CaTaVYP15xuUJP/6Es5dTB5Jxd8AzvW43Ov UQc5WHE+XLNRFgFt0hhmAbPLBUhsiUlBSiWS2WdAG5T8e3gBKCNoFlwOnjoQYwNrmvfx 3mm7hp3djO57PV8/svRtL2qfznzMC2YfZOmTQ= 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=EQAIQUQsGcLI8rqNjfwTQN3sEVOL/4WZkv+xAEAj404=; b=s824yG4kc+ArwtS3zkz0L4/ZVJWQmYbPZivmKzWRI38SQ/KogiyxbQq5F/uI0FYd9o BwtNW97ucEhamLNPirMUWpe6zYhIGOdKYkF+Qw1rd0uTFpNJ8CtWrrmCX4YwOgH0xchQ ZymNcfv+gDpE3cMxXfxgm0K/iR7n3UwD9nnJm2sN1mQTaZwf8FU2aSQOxU4fBwqlmhcc qmfPXHKM6ncg/U9AfxkbSbDw2tQdeD16Ho+HCH5lqes8ZG9oixsrlY+dQUZ8I5a8V4iP gt1sslp4gHyyFb0KVkaAodCP1A0NA0kVxt9PK94wVQGUrIXKNJojSjFVTx+hO4Ut+Z6Q DoTg== X-Gm-Message-State: AJcUukeuyqLRoszT7lo1qlxQA52I/M7S7eRxOrx50kbhTqiW82xCNjHJ JenFHmuwi+W9Zl1dSoqqwmLJSw== X-Google-Smtp-Source: ALg8bN4MaYkHKLb3gsXffS7gr8jUws92VRLpo2aDZxWHnj/3DbQkCjZ75FX7uGRWMiG6nViOZuPvYA== X-Received: by 2002:a63:6cc:: with SMTP id 195mr3725360pgg.401.1545423010054; Fri, 21 Dec 2018 12:10:10 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id o1sm35300406pgn.63.2018.12.21.12.10.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Dec 2018 12:10:09 -0800 (PST) From: Evan Green To: Andy Gross , Bjorn Andersson Cc: Brian Norris , Ben Chan , Evan Green , linux-arm-msm@vger.kernel.org, David Brown , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] soc: qcom: rmtfs-mem: Support non-root rmtfs daemons Date: Fri, 21 Dec 2018 12:09:59 -0800 Message-Id: <20181221201001.160613-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 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 | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-)