Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp613092ybh; Tue, 21 Jul 2020 03:46:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWBEVku34iQflScjNfyIPIcm/8JkljihXcxC0d7fMuNsbtsay9QJ97Yi+BOi8UtLBI/e/n X-Received: by 2002:a17:906:d116:: with SMTP id b22mr23941616ejz.250.1595328419176; Tue, 21 Jul 2020 03:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595328419; cv=none; d=google.com; s=arc-20160816; b=wyifUCTrjMuqVeQUODXYQq122o3pxDqSTLwn779OTAN4phQPfdMjHfiPUtQQYEv+3Z 6+eGmMhEhalokLEN965l3ltjuBuEbJLxRQromLwRAsG1BVR2IIARkN0VRJBTh5N9ozli ndDZe9h+netEGaEH3ENa6TWCvMaC1BVQT9kVVopluhDuLeFRuNDlvn9NKL8gZzHhbrEe jo3j0xl6Rq5aAffUbnqqJ7uUhGOg6AV/JEVD+/lcU30DNo223/sSXILP8IomIJztM/SF 6qx1c6Qtd2M5+5zPEKszm85nLwOyuKCGvRHlVM6TPsN0Hxz+YtExiqcpc32tUpx9WVux 71JQ== 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 :dkim-signature; bh=/jApIZ+aYU0qVc6dDTFunQmBgpuT/R2TmMVlx8MCmgQ=; b=KNp7YbcPvDZsXuSqdWvP2L3kgAx9C70N+jSjd7HogFK/kuPTCJKYucOGYmTvaf/ssW x5+y4oT+R/qWSNcXqGXEduu6X8enciVqWG1pxBFKyS/FfUHl0BFNit7DdobXU7L4O5hC nDsCose4pTN1ihYJICmT0QHAPls+GaXapdXOUR78SSjct55PyK9U2OFm4cQOpjrZSNCA yhJwHP2c6X7SmSKcCXtneDlwVPoDpYXYHb0Fncm4vs7hWx/theFumMcB+p8TB6eDw6g0 NEWQHzkFV7ItO4lSqaWBk0huuyyZUs7lqxiMmQiwKGi4ErJjXlSbkpiEeT4DEzhuyoq/ Ip8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lidGLm0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d18si12092763edy.194.2020.07.21.03.46.36; Tue, 21 Jul 2020 03:46:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lidGLm0v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729228AbgGUKoh (ORCPT + 99 others); Tue, 21 Jul 2020 06:44:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:60898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729208AbgGUKoe (ORCPT ); Tue, 21 Jul 2020 06:44:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A519920714; Tue, 21 Jul 2020 10:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595328274; bh=hKuAGs+rUZGDsVHOETa/8eOzLxdSKKQ5+Xvus7yx3To=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lidGLm0vuEFLVdGjNS9+LIQqgAKZtjjCZWgF4v+dLWiU2yA9rJupWOCrIE7rJ505S jjYAJA3kNoGHNz6IdG4M+JGpPZtNEKjs5rNKMT8jxA7Zp7oEBj4p93NQQ1KMkZLnKS oqscEzWz6n4qq61BkRTIdUBucMsE4Nn73icspVUg= Date: Tue, 21 Jul 2020 12:44:42 +0200 From: Greg Kroah-Hartman To: Dan Williams Cc: linux-nvdimm@lists.01.org, "Rafael J. Wysocki" , vishal.l.verma@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 08/11] driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW} Message-ID: <20200721104442.GF1676612@kroah.com> References: <159528284411.993790.11733759435137949717.stgit@dwillia2-desk3.amr.corp.intel.com> <159528288766.993790.5647904882591265970.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159528288766.993790.5647904882591265970.stgit@dwillia2-desk3.amr.corp.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 03:08:07PM -0700, Dan Williams wrote: > A common pattern for using plain DEVICE_ATTR() instead of > DEVICE_ATTR_RO() and DEVICE_ATTR_RW() is for attributes that want to > limit read to only root. I.e. many users of DEVICE_ATTR() are > specifying 0400 or 0600 for permissions. > > Given the expectation that CAP_SYS_ADMIN is needed to access these > sensitive attributes add an explicit helper with the _ADMIN_ identifier > for DEVICE_ATTR_ADMIN_{RO,RW}. > > Reviewed-by: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Signed-off-by: Dan Williams > --- > include/linux/device.h | 4 ++++ > include/linux/sysfs.h | 7 +++++++ > 2 files changed, 11 insertions(+) This is 3022c6a1b4b7 ("driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW}") in linux-next now, if anyone cared :) thanks, greg k-h