Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5373536ybi; Tue, 4 Jun 2019 05:50:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnu5k33ldcP3CIdqP9FqSZxiSBxwjRbn+neujpN1yHMqDRcRwRnCQIr/A0qI33c5bol1Uw X-Received: by 2002:a65:5c88:: with SMTP id a8mr1264912pgt.388.1559652619589; Tue, 04 Jun 2019 05:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559652619; cv=none; d=google.com; s=arc-20160816; b=euLA+VtBwQ4LCiWWBtMViAy3Guil9NAkhwU3Go+nZD4Pq3sRm5Bv7nUuK9nUaU2+Zv Ph9ALqrVRZhdrbcWikuuTw5LW/sFsBbNoQEExw7q6FiCkUTUrUkBzo9xmiHga2T2+8dw W+LfQaCzkXlL4lI1238nzwPCmeOQWGUDbpTIBp98jX0Sd9oTVVZgAesyKrEzOMSx8Wpl 2HHu1lH+cEYcUFyMRRlgza8O8GhWDhizmF9HMa5eMFK+t1fuz8CVv/EOfuXtkRMjo/mh Yz6pGLSOv9cEF3bk8u8/WRiJkyM6U7NK8lCwPR6yVC6+wvuNBxUY5Oc2Kr4fEbObqo/S yQxQ== 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 :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature:dkim-signature; bh=eMleS+sVc7Zc0KhR3uyqsACYApIneIVmc3GHjPGqrDY=; b=Frhz9QmZ2Zguwwi0vLhZpNDqNhkWUjRGAJJF+kbWjGQZU+0qx2GNnb7dg4fEZPrY8D Eqf2shqHJppZWKKFFf5zAMB27CbhSljInAQyruYHVlZjd0xYhQI/XTG232j/ixFuy9YK ULXUeowWfMvikGFUeMDRw0cNuiYJH/J6Sp8KusUNuFGeD9/bdB/lq2/jZOz7vJ0ZHQeC 62bCBN5QqYShehfr9Cg8AAU2gyXsVv1++Ws7Sh8RM0NFP3SPYwRb1ifQPkerXxfGQybd vTQkBfRgCqdGp/9Cy3G6kSY0Vk1hYwxcodBVLUpmS+N6Z2Dfln5z5VLbcw8Q3gtZvCWa w4WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.org header.s=pp header.b=m8hGAbc7; dkim=pass header.i=@raspberrypi.org header.s=google header.b=UAFK3f55; 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=raspberrypi.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 132si22342713pfu.263.2019.06.04.05.50.00; Tue, 04 Jun 2019 05:50:19 -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=@raspberrypi.org header.s=pp header.b=m8hGAbc7; dkim=pass header.i=@raspberrypi.org header.s=google header.b=UAFK3f55; 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=raspberrypi.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727699AbfFDMsl (ORCPT + 99 others); Tue, 4 Jun 2019 08:48:41 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:58070 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbfFDMsk (ORCPT ); Tue, 4 Jun 2019 08:48:40 -0400 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x54C3fT3009824 for ; Tue, 4 Jun 2019 13:15:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=to : from : subject : message-id : date : mime-version : content-type : content-transfer-encoding; s=pp; bh=eMleS+sVc7Zc0KhR3uyqsACYApIneIVmc3GHjPGqrDY=; b=m8hGAbc7piD4I8YIin4BLF5Q2Lh0qd2mi4kUK1tjBSA1Xr1n493QAvBHk89kCo7EkPSN DT0YqnQKaQsxF0qe1x81QYluHMcoz26L3eE9f4aH38Y2OVEyc11XnMCm59aA1rciQzAq Bv6bJkSOcMXs+E+GqnMZWPMwZemfgE42g3i6qBS1UbR7i/VcnfizFo3tXHKARN0amI86 zhimPkzXw569K4TvlxfVwM9kS/Q5IF0QQpp5YeuZLnn6tjzyrgK3YrbIkhUaf70m+wwo WFZbvvVC9FqD7CILUGzLL3jATT0zibUP39bPXGzyi12X+qsD+HSGxzO/KltftAH8pY0k Wg== Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by mx07-00252a01.pphosted.com with ESMTP id 2sues31h2a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Tue, 04 Jun 2019 13:15:26 +0100 Received: by mail-wr1-f69.google.com with SMTP id i11so4095883wrm.21 for ; Tue, 04 Jun 2019 05:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; s=google; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=eMleS+sVc7Zc0KhR3uyqsACYApIneIVmc3GHjPGqrDY=; b=UAFK3f55FN4X7/3h+WMHvJ3diLRNNMUPV+7au85j95UyUkIoi9RDMD9sRbsQ+HzpgJ p/+8i1x10zvy0/PIRHtadUnra8gWO+RrKY2hHTifTUiygbQpDEiPG6pXLsryBJjFiz2S H2gg6k0JkQkK+azNIWoQZeD7w4rtGHp74nW4+WtngY/LZc9c0TgKzfe16u7KlQeY4ibD LHWXDfr1CFP4k8uvysBX9aYSzY2jeB8GztL3kdHQS1jDe/WIAK/GMeC/us9GRQt6a85e loBWGpD7s3OHykUEM3wlLaLHbKa3UcTnOE19lhXLbaQTYxykVMOWPz4DQZHsY7yy8cao +94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=eMleS+sVc7Zc0KhR3uyqsACYApIneIVmc3GHjPGqrDY=; b=CbiopfLLAXbbfifcDOSNUFQJf1f8HembOeutWaa2GNZ5C7gcGFDRaJ0xqmf7VfF5SD kT+UaKWfM3lu7/iTC8zymGBcanA1Xw9BGO4QoLmzqpLp7rCh3tL5jbNKviEgoHHId5Zt UJbDWUl9C58LJkmfaVElnPlPDnbZkUcUBP7UkvoyJuoAQIF5smSkbb4HTcCbd6O7Mu/O hn1GffoFmrig3PbGZHA6mFKpJfdkpToh1aLbeCvjhEoZEHg2YLcJN5aNb0Nra3Ohe3LA DvBObchEQJ2yhzPGISp6QitwMnNYiE7HeTkULWXzn/GE3pc04EUESzs5uSbxHCZdx20K yIkg== X-Gm-Message-State: APjAAAXufIH8IOg9e9b//82gMuZT75pugB2BBOQ0dsGvmId/+CkVYNZR UPynAZMdroZZMMptZ0h0Y/UwKGAa949Ieg2cReKvGA3DxW3hlf0XbSLVnKUB615pw7y2DgSHErm hMY3Z2fC8QlkWd9nJv6wmEWmn X-Received: by 2002:a1c:108:: with SMTP id 8mr13418779wmb.159.1559650525706; Tue, 04 Jun 2019 05:15:25 -0700 (PDT) X-Received: by 2002:a1c:108:: with SMTP id 8mr13418764wmb.159.1559650525426; Tue, 04 Jun 2019 05:15:25 -0700 (PDT) Received: from ?IPv6:2a00:1098:3142:14:2cbd:20df:89bf:def2? ([2a00:1098:3142:14:2cbd:20df:89bf:def2]) by smtp.gmail.com with ESMTPSA id 65sm33948458wro.85.2019.06.04.05.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 05:15:24 -0700 (PDT) To: Rob Herring , Frank Rowand , Pantelis Antoniou , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" From: Phil Elwell Subject: Dynamic overlay failure in 4.19 & 4.20 Message-ID: Date: Tue, 4 Jun 2019 13:15:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-04_09:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, In the downstream Raspberry Pi kernel we are using configfs to apply overlays at runtime, using a patchset from Pantelis that hasn't been accepted upstream yet. Apart from the occasional need to adapt to upstream changes, this has been working well for us. A Raspberry Pi user recently noticed that this mechanism was failing for an overlay in 4.19. Although the overlay appeared to be applied successfully, pinctrl was reporting that one of the two fragments contained an invalid phandle, and an examination of the live DT agreed - the target of the reference, which was in the other fragment, was missing the phandle property. 5.0 added two patches - [1] to stop blindly copying properties from the overlay fragments into the live tree, and [2] to explicitly copy across the name and phandle properties. These two commits should be treated as a pair; the former requires the properties that are legitimately defined by an overlay to be added via a changeset, but this mechanism deliberately skips the name and phandle; the latter addresses this shortcoming. However, [1] was back-ported to 4.19 and 4.20 but [2] wasn't, hence the problem. The effect can be seen in the "overlay" overlay in the unittest data. Although the overlay appears to apply correctly, the hvac-large-1 node is lacking the phandle it should have as a result of the hvac_2 label, and that leaves the hvac-provider property of ride@200 with an unresolved phandle. The obvious fix is to also back-port [2] to 4.19, but that leaves open the question of whether either the overlay application mechanism or the unit test framework should have detected the missing phandle. Phil [1] 8814dc46bd9e ("of: overlay: do not duplicate properties from overlay for new nodes") [2] f96278810150 ("of: overlay: set node fields from properties when add new overlay node")