Received: by 10.223.164.221 with SMTP id h29csp3230676wrb; Wed, 18 Oct 2017 14:47:07 -0700 (PDT) X-Received: by 10.98.200.138 with SMTP id i10mr15912867pfk.222.1508363227888; Wed, 18 Oct 2017 14:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508363227; cv=none; d=google.com; s=arc-20160816; b=m0YPiGTQdAyOB/NTVikjx8J/XCIbbowhHRlJso/lSR8skJZhz3BKhoQmsjKkiXEZmf nN8JpbAyi5bhAx+CVmEOPcolYZCY9qjmww0YTsEqsFKdUZEKnrJVDNBIHaXtn8J/m29t EaiYvjsPRd8d79YqP8wA/D7FWsBmggL92SszONtIvKwm/vuY0+TwuHuqszIo23TaBRJt 1pG2VQmpBjPbkl6UNiuc4UkdtMCrFJhTz69PAY4ux7reH7V4zCCibPbm3dE41QUhawH/ jqjnOyjvRFD3vm18ZJQFaVfL1LjincgpaH/CxnEwRFv2Uw+S/AS3UDK1huxoTtGqlI8f ovOA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=AN8zgJ0FQBNJBEm7nvv9uzI+e9xBkv1zRA3JHShgtDU=; b=Mgnv3YX2wlTmRt/pJU+TeMTMyzz4YmB7IR9PmKe/TisNWyGEpIpKgiITbMKfMgEM6B t/FnVAXRgqbnjWpiQ6tlsit3oDnjTodazBX5dzqq4+1fr7BzNEfC1CpAiI4C+FCOVvVi lu73J1xpNh9XD50wZNaOVS6j+Lj/X3ojpZMhu8bQWEbyTwvYCu6G7CBc7tF/26UpTU+y psxfbcfsd4JIDG5h6za7xADNDfYshD50x0zms8yDvW/TPlyVSVYuA037OD+wO5TNT2ZB gNVhXhP0RkRAZ7kaz3idIMlEgldkKxU5ZvW+52rUv9WrCbBnbgL4/DOAKHb+JIDd5np6 3SMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dbg3X6EH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o78si6808130pfa.509.2017.10.18.14.46.53; Wed, 18 Oct 2017 14:47:07 -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=@gmail.com header.s=20161025 header.b=Dbg3X6EH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751788AbdJRVq3 (ORCPT + 99 others); Wed, 18 Oct 2017 17:46:29 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:46129 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbdJRVq0 (ORCPT ); Wed, 18 Oct 2017 17:46:26 -0400 Received: by mail-pg0-f67.google.com with SMTP id k7so5353293pga.3; Wed, 18 Oct 2017 14:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=AN8zgJ0FQBNJBEm7nvv9uzI+e9xBkv1zRA3JHShgtDU=; b=Dbg3X6EHa54zTQrMjOFAzDiZt1nvS9BDxhULUEOFJ9rfO1pqFc2kEFGrCwqFoXO739 m4qD9cHe8SxQZMwyPtbwekX7T1ZP6OihWVVO2Er7a6hTB9A7YN07bgVn2w4HFxAQaPEs RMFulZPy/IkZ0YY+v7cGT+rL3/cS6FSqXxCNIqMzu4R1a7zBHdGPJbj4KCYEwDGVK1Az xwwAKChOiYzY6WqLCcUUKaQHSl9Av2SCQMK+Fo2fFKce3QiEPTfK+GgpgtHfeED2+iJk hxGZ8+WDOtkwi2RN2XLgLJkW8aenhly4oEI7l/2gHrwEFbhv0fbJ6q8YzOSH4RK4+0t0 Qktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=AN8zgJ0FQBNJBEm7nvv9uzI+e9xBkv1zRA3JHShgtDU=; b=OpDq5fKaNElutAnyTUmE+T8dnd/AEkTPJLJ6u5byMeQmMj98CE9TFEeFasv5MPjv7S kv42w+1rqymWHqnr8Wd7gRAeSXwINevpCdqTjMpaIEr/08adsEL8iQYdKea2kXC16LXR r4KphrgD6/YlTmCiBgctbxe4wZSj7msKX5p4ctXWvsxPv16QwdxIcZ9YzFN+vWr7GOME aN3OVEU1vr1bvZqt7h8yWOEoA012pfX2B8mXC95sEbIVpO7XUd3QWa/IwR7Yhii9FM6G nJixjxAjwM/OJm1sei3q7YLjtkYukIJ5nf3pfQYlYFg1vJWQLYKEnk17Wr73peZcdGF6 gX6Q== X-Gm-Message-State: AMCzsaUSugYjdBO73XPyvIukwYbqcrD0THtgbVY/Zr5UtYhk6eGP2Auw q6SVRE4IT6TqyBzl7pDGunI= X-Google-Smtp-Source: AOwi7QAK2TQqxjaoPycgUHTYIgYLM2WYizwWM32SD9MQ59vcu20oevFJRQg/JOGgK0CJlR+z5Fwqmg== X-Received: by 10.98.87.74 with SMTP id l71mr16057218pfb.204.1508363186171; Wed, 18 Oct 2017 14:46:26 -0700 (PDT) Received: from [192.168.1.46] (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id b19sm24277919pfd.182.2017.10.18.14.46.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 14:46:25 -0700 (PDT) Subject: Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name To: Rob Herring , Pantelis Antoniou References: <20170821151651.25096-1-robh@kernel.org> <20170821151651.25096-6-robh@kernel.org> <59E69786.2030406@gmail.com> <1508341985.25643.12.camel@hp800z> Cc: Alan Tull , "devicetree@vger.kernel.org" , Michael Ellerman , linuxppc-dev , linux-kernel , Benjamin Herrenschmidt , Paul Mackerras , David Laight , linux-fpga@vger.kernel.org From: Frank Rowand Message-ID: <59E7CBAF.9080501@gmail.com> Date: Wed, 18 Oct 2017 14:46:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/18/17 11:30, Rob Herring wrote: > On Wed, Oct 18, 2017 at 10:53 AM, Pantelis Antoniou > wrote: >> 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. > > Are you still expecting review comments on it or something? > Furthermore, If something is posted infrequently, then I'm not > inclined to comment or care if the next posting is going to be after I > forget what I previously said (which is not very long). > > I'm just saying, don't expect to forward port, post and it will be > accepted. Below is minimally one of the issues that needs to be > addressed. > >>> 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. That paragraph is key to any discussion of accepting code to apply overlays. Solving that issue has been stated to be a gating factor for such code from the beginning of overlay development. >>> 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. > > No, but we have to start somewhere and we are not starting with any > change allowed anywhere at anytime. If that is what people want, then > they are going to get to maintain that out of tree. > >> In some cases there is a whole node hierarchy being inserted (like in >> a FPGA). > > Yes, so you'd have a target fpga region. That sounds fine to me. Maybe > its not a static whitelist, but drivers have to register target > nodes/paths. > >> In others, it's merely changing a status property to "okay" and >> a few device parameters. > > That seems fine too. Disabled nodes could be allowed. But what if you > add/change properties on a node that is not disabled? Once a node is > enabled, who is responsible for registering the device? > > What about changing a node from enabled to disabled? The kernel would > need to handle that or not allow it. > >> 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. > > Or have some security hole or a mechanism for userspace to crash the system. > >> 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. > > It is if the kernel will break doing so. > > Rob > From 1581633116245523961@xxx Wed Oct 18 21:41:20 +0000 2017 X-GM-THRID: 1576354368386704057 X-Gmail-Labels: Inbox,Category Forums