Received: by 10.223.164.221 with SMTP id h29csp2911016wrb; Wed, 18 Oct 2017 08:54:13 -0700 (PDT) X-Received: by 10.159.194.18 with SMTP id x18mr15714912pln.273.1508342053035; Wed, 18 Oct 2017 08:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508342052; cv=none; d=google.com; s=arc-20160816; b=hpJmI7IEAtvljpebdzQWJvysIXATfG6xXLFI7V21tQRleZxIvnN8L9rI524NZgJLsA cOvf2E0AMxqJJAtHSzdJW3nKjpfMIWXU3u1fvLbtpdgmh6Of5n/TbuO5qFDtg/gpFsZh ig1zstY18565WMBSs9qWBvEdOlFoXg2A//ZkOY5vy6Nfyfa4NpaxLKIhJMylWZfBc2M8 Zw+2r3/T51rRBMUz6nCcEKf9elHb33nBeeXoE5FUn7hp7n/ESdMQB87KDugbuigkcBYU 24yOvSDOjFgHB88yQj/Smz331dO3s8dtWthAsD2WQ/KaUpHu2knJSva3ZWPdG7xRUdFd PXZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=LdkJCqOMiKI6DiDrhH+1TDe7v73rB6n6ohcksFAuICA=; b=i/Ez3kHds+m+NXsWifW9Zn9CkXdDtyUrq8tGXHpFBwt0idjWQW65XmQcykRaw0O1vU f0ncemcZWnCtuTlnePMG1yYtPRUiNQPIOLNk/sqn+46dsuxFtgtP+HW49wkhw+tqDwRG 58qEugXT5/bYpSsSbZQJyJj6Glg2rP0XxgeIsippQG9/x7NGOKRDxqNQAXwkyBkj0YQI /XbPXqd3rL2d86tUNpeUDDvP8Duw9vMfQmRoKQ63ORmfmXQ/B3IZGXtdKyCngpDmDYAa uxL+gkmqarQaV/3BbnVmwdnrM7rv8M6hA/wX3mTglYQq615+I4nW5JmBUgTlVi+UaII3 DE0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@konsulko.com header.s=google header.b=opHc6Lwi; 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 d7si6249569pgf.557.2017.10.18.08.53.59; Wed, 18 Oct 2017 08:54:12 -0700 (PDT) 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=@konsulko.com header.s=google header.b=opHc6Lwi; 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 S1751762AbdJRPxV (ORCPT + 99 others); Wed, 18 Oct 2017 11:53:21 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45644 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbdJRPxT (ORCPT ); Wed, 18 Oct 2017 11:53:19 -0400 Received: by mail-wm0-f68.google.com with SMTP id q124so10890214wmb.0 for ; Wed, 18 Oct 2017 08:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=LdkJCqOMiKI6DiDrhH+1TDe7v73rB6n6ohcksFAuICA=; b=opHc6LwiTLjXBK5+HTGV0y1NK9kTqpHGCQVJ13DJtw627iLWAxPwqscuEIT5wSNWHn 5p0vycrJNozvxzOi8Mj0BDepm+uwrv2ubDxmS8IXOSgwK8SqjrPztt7X0o0o96Q3WVQT Fnlh3O+HCsmq8i+dWQHpVtbe1mfphNuu60Hjg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=LdkJCqOMiKI6DiDrhH+1TDe7v73rB6n6ohcksFAuICA=; b=HHZL12JgOlrnwYp72EzxgdiGGutzuQ/WIEgLteFAvYqMEyW3+++WHFOREtyMbq+QYL Pk+dtTj8smBSmyE6cnsGjHE4dt7oEBG5wLyBsjtT9JbaofjlL7wDIbUS30zZfmPHu9WV jBAJD1+V9lWspWrxT7+sSuPdwEJfrmsTtVr5nm36siHIOv26FYtEMXKuJs5qfVUucAOG ibKUBzHBM6AsGa+pZciZ6eKlGVT8iiKg0s3Sr/xrzFqmaM/RNuWc49U2s6DXGbY+ugrj ZO8AocsB0iIpF1tJEVo4qUEMcGA8ifQ4jyQ00S/wcW+kz/TdaAeCJ2LNSW3wQb2BJft7 gAqg== X-Gm-Message-State: AMCzsaU/s0It7xDcdQqoLLxMQW0lToBvD5bKvu3Toi5hFWgFkQS0aLMv etUVWahMNozLM9zMFzMN59FM4Q== X-Google-Smtp-Source: ABhQp+QuNCDA8xIbNXaC7ggCvpoQDbhbUK3i/dJBtz/yYcNS7FFsdP5zLB0M4HaMPCSowdHPV6Ur2A== X-Received: by 10.28.30.196 with SMTP id e187mr6588381wme.36.1508341997891; Wed, 18 Oct 2017 08:53:17 -0700 (PDT) Received: from [192.168.2.248] ([195.97.110.117]) by smtp.gmail.com with ESMTPSA id m44sm1297397wrf.27.2017.10.18.08.53.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 08:53:16 -0700 (PDT) Message-ID: <1508341985.25643.12.camel@hp800z> Subject: Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name From: Pantelis Antoniou To: Rob Herring Cc: Alan Tull , Frank Rowand , "devicetree@vger.kernel.org" , Michael Ellerman , linuxppc-dev , linux-kernel , Benjamin Herrenschmidt , Paul Mackerras , David Laight , linux-fpga@vger.kernel.org Date: Wed, 18 Oct 2017 18:53:05 +0300 In-Reply-To: References: <20170821151651.25096-1-robh@kernel.org> <20170821151651.25096-6-robh@kernel.org> <59E69786.2030406@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-10-18 at 10:44 -0500, Rob Herring wrote: > On Wed, Oct 18, 2017 at 10:12 AM, Alan Tull wrote: > > On Tue, Oct 17, 2017 at 6:51 PM, Frank Rowand wrote: > >> On 10/17/17 14:46, Rob Herring wrote: > >>> On Tue, Oct 17, 2017 at 4:32 PM, Alan Tull wrote: > >>>> On Mon, Aug 21, 2017 at 10:16 AM, Rob Herring wrote: > >>>> > >>>> Hi Rob, > >>>> > >>>>> With dependencies on a statically allocated full path name converted to > >>>>> use %pOF format specifier, we can store just the basename of node, and > >>>>> the unflattening of the FDT can be simplified. > >>>>> > >>>>> This commit will affect the remaining users of full_name. After > >>>>> analyzing these users, the remaining cases should only change some print > >>>>> messages. The main users of full_name are providing a name for struct > >>>>> resource. The resource names shouldn't be important other than providing > >>>>> /proc/iomem names. > >>>>> > >>>>> We no longer distinguish between pre and post 0x10 dtb formats as either > >>>>> a full path or basename will work. However, less than 0x10 formats have > >>>>> been broken since the conversion to use libfdt (and no one has cared). > >>>>> The conversion of the unflattening code to be non-recursive also broke > >>>>> pre 0x10 formats as the populate_node function would return 0 in that > >>>>> case. > >>>>> > >>>>> Signed-off-by: Rob Herring > >>>>> --- > >>>>> v2: > >>>>> - rebase to linux-next > >>>>> > >>>>> drivers/of/fdt.c | 69 +++++++++----------------------------------------------- > >>>>> 1 file changed, 11 insertions(+), 58 deletions(-) > >>>> > >>>> I've just updated to the latest next branch and am finding problems > >>>> applying overlays. Reverting this commit alleviates things. The > >>>> errors I get are: > >>>> > >>>> [ 88.498704] OF: overlay: Failed to apply prop @/__symbols__/clk_0 > >>>> [ 88.513447] OF: overlay: apply failed '/__symbols__' > >>>> [ 88.518423] create_overlay: Failed to create overlay (err=-12) > >>> > >>> Frank's series with overlay updates should fix this. > >> > >> Yes, it does: > >> > >> [PATCH v3 11/12] of: overlay: remove a dependency on device node full_name > > > > Thanks for the fast response. I fetched the dt/next branch to test > > this but there are sufficient changes that Pantelis' "OF: DT-Overlay > > configfs interface (v7)" is broken now. I've been adding that > > downstream since 4.4. We're using it as an interface for applying > > overlays to program FPGAs. If we fix it again, is there any chance > > that can go upstream now? > > With a drive-by posting once every few years, no. > I take offense to that. There's nothing changed in the patch for years. Reposting the same patch without changes would achieve nothing. > The issue remains that the kernel is not really setup to deal with any > random property or node to be changed at any point in run-time. I > think there needs to be some restrictions around what the overlays can > touch. We can't have it be wide open and then lock things down later > and break users. One example of what you could do is you can only add > sub-trees to whitelisted nodes. That's probably acceptable for your > usecase. > Defining what can and what cannot be changed is not as trivial as a list of white-listed nodes. In some cases there is a whole node hierarchy being inserted (like in a FPGA). In others, it's merely changing a status property to "okay" and a few device parameters. The real issue is that the kernel has no way to verify that a given device tree, either at boot time or at overlay application time, is correct. When the tree is wrong at boot-time you'll hang (if you're lucky). If the tree is wrong at run-time you'll get some into some unidentified funky state. Finally what is, and what is not 'correct' is not for the kernel to decide arbitrarily, it's a matter of policy, different for each use-case. > Rob Regards -- Pantelis From 1581610807413500709@xxx Wed Oct 18 15:46:45 +0000 2017 X-GM-THRID: 1576354368386704057 X-Gmail-Labels: Inbox,Category Forums