Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp906586ybm; Tue, 21 May 2019 05:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGSzulXkq8Evob7ya9kTPighdBtTPs6Y0Crgr5zL/w321O+9P7fth1b467vLj19ugDE9tK X-Received: by 2002:a17:902:7283:: with SMTP id d3mr38362122pll.274.1558442665736; Tue, 21 May 2019 05:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558442665; cv=none; d=google.com; s=arc-20160816; b=hfoAlitmpUnzNYcYcrrhN0QtEp6qybhRH9PEWzzCIHm3Dbgy5I3tx9eof48lekr3Vx SP4pFohHzF6DKdYn+HZX6TvijqCgqz9Bwbn+T8E9x8qGiYF9LWjy2iivD7MbJZ5tbczt uN3wKSf6Un7wJNB5DWXctS9tr4Xti73qvDsQuGxrnQBLDGnzjotPieuga3bHix1JXrQJ fr5fjUDmFbwa6sDIxQFobW2Er9Aq4wNavnUPz2QO+0ftrQLIXjYD92PrqUNHdU0uL/Z6 A8AaqBWHEU3QOBdRFnvURpisA/cijY4YAfpo+VXmHtPS2KWbzw/uSZs1aosQOSWGn9QF wIJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=feT6//+XEuoB81grk9RMilnSIDBKvcNXipMC0Uit4Oc=; b=ECTcseXhldBGDxT3iXz6w3ApGuC3qKGIa7U5K8aKFD7tkLH1O1V2+lgwnuhPs21eJL k6ZWLFXGJlzbJVwWtgHh7T55XgJwvsqzhT/aGJUEdnJ1YUKFJ/KMj2yB+AOvYtNBgR6y VN3pXTag+qO9oEx664xs4o01uv0Yl5Nbl0JPaR3Nvu33ykpKBO/VEja+EjR32TTK1s0R 6uNYfs49NAA1PPZwqq5Sug9VF8A0dHn7Atasz2u6E2G/eKJDQTp6OoTftqGSviz7mFfk sI+NndU0WY7NhnRcjfXFMAM/aqK8Jc8qoG/kVsbYSjJO0EfNfWm4fUtHHs5+1fhoyQCF CBwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Pcr8JEhV; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 101si21408178pld.334.2019.05.21.05.44.10; Tue, 21 May 2019 05:44:25 -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=@chromium.org header.s=google header.b=Pcr8JEhV; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728104AbfEUMnB (ORCPT + 99 others); Tue, 21 May 2019 08:43:01 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:37878 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbfEUMnA (ORCPT ); Tue, 21 May 2019 08:43:00 -0400 Received: by mail-qk1-f193.google.com with SMTP id d10so10942417qko.4 for ; Tue, 21 May 2019 05:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=feT6//+XEuoB81grk9RMilnSIDBKvcNXipMC0Uit4Oc=; b=Pcr8JEhVUyLjBBa/8pdVhfH69n3H4/8MH7ZG9kwaFyHZ8ViEkFJ0qxCiaJTPGC0VVN uURwoq4N16YJQUGvv2pNUXHhp8ffX+Y32clwrnI1tWqg/jOouzsMNRJbAUs1uEaKl8c6 RBiE91gYcMFDuX0tT/BBUYEj+/agq+d/z5F28= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=feT6//+XEuoB81grk9RMilnSIDBKvcNXipMC0Uit4Oc=; b=P3VU/MRoBrf3TWjuOlsQHOddz1C4WEUdEw6TAoki04Lzcel18/eE9VD9voZQlsIM1c M2sIY3lk87c8zBH4ydmsXXSpsOMcVqwklI1iM/rpRKqJVYK0aZ26g4lmXrQSAVG+pK5D n72a9DAyy8Ge+sR/2otW8MRGFuT6XLIeuREO4DYCfHhKx10kMSNgcGI39OrPPuuH2spJ giEDl9sfM+L79zeY7qQ1/vi6FxkNjcwHfydyxfJ89V2Una7HBWfIEfU0JQls1QRkbdmP FLUFPD7XTYwBmjK3YQEGoIlICk52P4z6uVkXsDOx8NjCOVOSWrGGMa3TXO/O7eM7/jtj tCAw== X-Gm-Message-State: APjAAAWVULsmAdme+/exXaRPoGQ7eTeQ1VdQ7DsQ7n0XT2ScpJ/aMsz8 Al2N5c6QL/LSoOHKHFPodSfc0N2puZgJjMhyjNCuhA== X-Received: by 2002:a05:620a:1493:: with SMTP id w19mr63010827qkj.214.1558442579573; Tue, 21 May 2019 05:42:59 -0700 (PDT) MIME-Version: 1.0 References: <20190519160446.320-1-hsinyi@chromium.org> <20190519160446.320-2-hsinyi@chromium.org> In-Reply-To: From: Nicolas Boichat Date: Tue, 21 May 2019 20:42:48 +0800 Message-ID: Subject: Re: [PATCH v4 2/3] fdt: add support for rng-seed To: Hsin-Yi Wang Cc: linux-arm Mailing List , Rob Herring , devicetree@vger.kernel.org, lkml , Frank Rowand , Catalin Marinas , Will Deacon , Andrew Morton , Mike Rapoport , Ard Biesheuvel , Miles Chen , James Morse , Andrew Murray , Mark Rutland , Jun Yao , Yu Zhao , Robin Murphy , Laura Abbott , Stephen Boyd , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 21, 2019 at 12:10 PM Hsin-Yi Wang wrote: > > On Mon, May 20, 2019 at 7:54 AM Nicolas Boichat wrote: > > > Alphabetical order. > Original headers are not sorted, should I sort them here? > > > > > > > I'm a little bit concerned about this, as we really want the rng-seed > > value to be wiped, and not kept in memory (even if it's hard to > > access). > > > > IIUC, fdt_delprop splices the device tree, so it'll override > > "rng-seed" property with whatever device tree entries follow it. > > However, if rng-seed is the last property (or if the entries that > > follow are smaller than rng-seed), the seed will stay in memory (or > > part of it). > > > > fdt_nop_property in v2 would erase it for sure. I don't know if there > > is a way to make sure that rng-seed is removed for good while still > > deleting the property (maybe modify fdt_splice_ to do a memset(.., 0) > > of the moved chunk?). > > > So maybe we can use fdt_nop_property() back? Yes I prefer fdt_nop_property, if we don't want to modify delprop or splice. But it'd be good if others can chime in.