Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3831433ybv; Tue, 25 Feb 2020 08:05:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyvUxFYL+Hwy4kfRBKQt+tkzTqaJjsaOFzkbdZ2q44WSX30p9528QXTzB9+6AByBi8Sew4i X-Received: by 2002:aca:a857:: with SMTP id r84mr3994649oie.41.1582646727360; Tue, 25 Feb 2020 08:05:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582646727; cv=none; d=google.com; s=arc-20160816; b=owEt5F/YOMiHTOgGyPhHrS5tVWeku9ID/fkA8M6DV1Td0wU+qYEaGkuHTAP+wk+vCE GVEnpYJCIIxnfcKEnVxv9FyIlAEtT4sTZ9HwwxFlXnsfNZ8lOIJhbRU8yVJNML3wNe5U /3LRfaEL/Yn0UBTSg077t9RCAFkDKVtcWWN1t0WerMnxYZZgfgvHY8uxV8UCraQxXtN7 B2EHy0y7Qa2UfbD+hswxETTefZiBCrm6+ebHZ88EA8W+CW+rVinV9/gcZ64maXuWeV4l jRVwzK+3CnXX8sKsJFUhlHPo2talEhAVt6nEvzrJ+VBz3F70KGhoNUkL+kxnT4Emd0sh VzrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sKeVQGM5Nu/M7YD/0lGJ2pXGy8ao7NOhmeLCmj653yo=; b=ktGJONWl1jHHPrSzfKcZtoKQYHJRDx7WHrGfJoqodGc6Ipzxb6bruzf3lHw8+88OIq FdQkwYambuqPwZLkXgOznmft3rUoQxOSvI054JNK5BbY1BIpSEK0lCITiMN/B3AKBNTD vDM5BwDR8p38YEjQgGuS4C2jz8cDzSQiYnYpVbzYT8AdrQ9C7KxnkdliqfjHBl/dkAGI ton03a7fONeeUDl5QDSqf+ezTzVxP2i/pFCzouZDSHOmncZ0EcqEYQNJ+IU1A4nYMFGV Gm0jdNTKSL1ByyTjNdtpAYAlVn0nr5GKeqK86mbY49vAWUZpaY9X751dhyxIMhpHWMcJ YGIQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si6024634oib.164.2020.02.25.08.05.15; Tue, 25 Feb 2020 08:05:27 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730209AbgBYPnq (ORCPT + 99 others); Tue, 25 Feb 2020 10:43:46 -0500 Received: from mga06.intel.com ([134.134.136.31]:21025 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbgBYPnq (ORCPT ); Tue, 25 Feb 2020 10:43:46 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 07:43:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,484,1574150400"; d="scan'208";a="350167914" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga001.fm.intel.com with SMTP; 25 Feb 2020 07:43:43 -0800 Received: by lahna (sSMTP sendmail emulation); Tue, 25 Feb 2020 17:43:43 +0200 Date: Tue, 25 Feb 2020 17:43:43 +0200 From: Mika Westerberg To: Nicholas Johnson Cc: "linux-kernel@vger.kernel.org" , Srinivas Kandagatla Subject: Re: [PATCH v1 1/3] nvmem: Add support for write-only instances Message-ID: <20200225154343.GG2667@lahna.fi.intel.com> References: <20200225125141.GA2667@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 25, 2020 at 03:30:22PM +0000, Nicholas Johnson wrote: > > Actually I think maybe we make this one only writeable by root, in other > > words it would always require ->root_only to be set. > There is a world-accessible rw entry already, which would, if anything, > be even more dangerous than a world writable entry. However, there could > be a hypothetical use case. I agree it is unlikely to be required, but > who knows? You mean 0644 entry? That should be fine as it is not writable by anyone else than the owner (root in this case). > Based on your statement that no sysfs should ever be world-writable, > should I be trying to remove the world-accessible rw as well? No I don't think it is necesary. Just let's not add attributes that anyone can write without good reasoning ;-)