Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1405784imp; Fri, 22 Feb 2019 02:53:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUPjpGJGJJOQExv3nVJNfdwAOnF6T5gdBfbN7Q5noEOOa3xw1cD4kIZAXCmB/qPHZtPwc1 X-Received: by 2002:a17:902:290b:: with SMTP id g11mr3557764plb.269.1550832838763; Fri, 22 Feb 2019 02:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550832838; cv=none; d=google.com; s=arc-20160816; b=zbe4BMtx5QA1+xbNKfpZOWD7awcdwlE9zwxcsi3H4nWkMZQwPelVOKIEhWEwc1Qqp/ 0yerywCJ0EuiT1eFgHDFOFtGfKD0VTRCEZACrGtWL/2WGSsf4Gr4bHSxT3/apWbmxxlg jHaRKmWaovXZAQSvkbBaL1e9eC6t6MlfNMfu0bALq07cAarOd/yMKqCK8/4GJXm6/kc2 jXo064ul3nmWP6Aej2n3/k1FC3kQyBl2YZ0kYab/bpZ9KojNn66NkvDSN4tRBMVnr14w FBvWiskIxvHiC3UadaMKqxHEVemG2ooxq3Kgv6mm+DPWUIsyijYM8+Uy5W+2SODt81A7 ZqSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=50XQG6MSbqk57iA1A7ztSORJEyER8WbufaDLDK9ojBk=; b=kWxUrXZgk8tBIdTKCCVyXraZu9cUxd0E6yFBNq2tXgKo5yvg2FPGz7DKKnLBjQcdfP qDMwtd+0XFmv3ush/8SVh1SmdRtHBnG1w/QgU3ZEW2owjTxf3ScLjjUAHnqjm4jgu8qo 1d4XfqFL34v8q/QC+SZywcmvRK5vwVI30XWv24p+1Sq6RCZXLcJs0d4grL8JDLZltrA/ iaIn7mB5XeezPEkWQ1a9c3C+TnoyqRU/QTDOeGOlDYaA49PhwqlFqLcLfpTeLeRcrvkv +wFk891F+MDewcm95ghQ6AhasQEaYuPtSMrN9052+6f09iqstDAvxwUzPAEZu9ZrkCo9 XEGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ffAzru6Y; 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 b17si1168559pfc.0.2019.02.22.02.53.42; Fri, 22 Feb 2019 02:53:58 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ffAzru6Y; 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 S1726502AbfBVKwz (ORCPT + 99 others); Fri, 22 Feb 2019 05:52:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:52332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbfBVKwz (ORCPT ); Fri, 22 Feb 2019 05:52:55 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 C264920818; Fri, 22 Feb 2019 10:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550832774; bh=I+h2kg3NkqZoczMCw5mdOzpOm4A8AG/Bs6CF9uKFfoQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ffAzru6YdKmfCFWxs5pvRaI2g2wh88RTn0IKvDS5GQ6O15oe7+GTBHKooGG3GoWcK ZAx9FO/T4f6tcFFZOFHeClH+rDTgfTXRUuFojXOJM68idgwO4qo99052G5sVxg7fTM qt63DxSfnZajMW+nk/aG81XeBLH7DGKxWchJQb+Q= Date: Fri, 22 Feb 2019 11:52:51 +0100 From: Greg KH To: Laurent Pinchart Cc: Bjorn Andersson , Vaishali Thakkar , andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, vkoul@kernel.org Subject: Re: [PATCH v2 3/5] soc: qcom: socinfo: Expose custom attributes Message-ID: <20190222105251.GA28554@kroah.com> References: <20190220045829.6852-1-vaishali.thakkar@linaro.org> <20190221121841.GA32108@pendragon.ideasonboard.com> <20190221155742.GD2122@tuxbook-pro> <20190221221359.GD3485@pendragon.ideasonboard.com> <20190222071616.GA2306@kroah.com> <20190222095145.GA3522@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190222095145.GA3522@pendragon.ideasonboard.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 22, 2019 at 11:51:45AM +0200, Laurent Pinchart wrote: > Hi Greg, > > On Fri, Feb 22, 2019 at 08:16:16AM +0100, Greg KH wrote: > > On Fri, Feb 22, 2019 at 12:13:59AM +0200, Laurent Pinchart wrote: > > > On Thu, Feb 21, 2019 at 07:57:42AM -0800, Bjorn Andersson wrote: > > > > On Thu 21 Feb 04:18 PST 2019, Laurent Pinchart wrote: > > > > > On Wed, Feb 20, 2019 at 10:28:29AM +0530, Vaishali Thakkar wrote: > > > > > > The Qualcomm socinfo provides a number of additional attributes, > > > > > > add these to the socinfo driver and expose them via debugfs > > > > > > functionality. > > > > > > > > > > What is the use case for these attributes ? I fear they will be used in > > > > > production systems, and that would require debugfs in production, which > > > > > isn't a good idea. If you need to expose those attributes for anything > > > > > else than debugging then we need a proper API, likely sysfs-based. > > > > > > > > The use case of these attributes, beyond development/debugging, are > > > > unfortunately somewhat unknown and is the reason why they where moved to > > > > debugfs from the earlier attempts to upstream this. > > > > > > > > I think the production requirements at hand prohibits debugfs to be > > > > present, so attributes that are required beyond development/debugging > > > > purposes would have to be migrated out to sysfs - but the idea here is > > > > that such migration would have come with the missing motivation to add > > > > them there today. > > > > > > If the use case is just debug/development, would it be enough to print > > > this information in the kernel log at boot time ? I may be a bit > > > paranoid, but I always worry about API abuse :-( > > > > Putting stuff in debugfs should be fine. No system should ever rely on > > debugfs for a properly running system as it is being disabled on almost > > all "sane" systems (Android included). If a vendor relies on this > > information for a properly working system, then it does not belong in > > debugfs. > > There's certainly no disagreement about that, my concern is about > vendors who will enable debugfs to access information they need just > because it's there. Then they run a huge risk of relying on it. > Do I assume correctly we can "break the debugfs ABI" in mainline by > changing the format of the information if needed ? Yes. The only "rule" of debugfs is that there is no rule :) Please, break it every-other release if you want, no userspace tools _should_ be relying on it.[1] thanks, greg k-h [1] Yes, I know Android currently relies on debugfs for a number of crash-dump type of things in ion and binder, but there is active work upstream in AOSP to remove that dependancy as no Android device should ever have debugfs mounted on a "normal" system for the security reasons alone.