From patchwork Wed Jul 3 04:01:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 11028917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D41661398 for ; Wed, 3 Jul 2019 04:02:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB48B288D7 for ; Wed, 3 Jul 2019 04:02:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACD8628969; Wed, 3 Jul 2019 04:02:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3F85E288D7 for ; Wed, 3 Jul 2019 04:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6iI670HL94f8PoIjXLsQRiGG2umrtqHgA8WAhdHjHNQ=; b=XPtDdHFUv3s49q g0r7i2Xx/vKRGtTK4Okl/fhrzZlyKSH5LJsYJnmyx7+LQu4K7itkepdgmWAIXBxPbZKgsPslU1k3H Q+qHrCw3y0tAEq+BzJk4Dz/CaBNT0xRd8dof2jrAbqnJlbj1//JGABTbD474hOxdcl3EkaP0FDIo1 7HBinpQ7dH6273cyj4T23ElWa4gJOYYOhUsLNqPF1oBLxhKRX8Kb+7CqhglwjhdRNnEYnT+S3+EWB roUTEukM9YEIixdAHORbjBtSlYDqu+iIWlDhSS6xGby6MMydLIh8eUkTh+q8fD65yttyG/nY/cGjC WeaCZvcdj0N6CudsbEbg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hiWT7-0004Yz-UD; Wed, 03 Jul 2019 04:02:05 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hiWT5-0004YJ-5w for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2019 04:02:04 +0000 Received: by mail-pf1-x443.google.com with SMTP id m30so513095pff.8 for ; Tue, 02 Jul 2019 21:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a41tlxI3deF8mBQyeJjNOoUyGsQDaLWBbpsll/2BB1E=; b=ldPEePY/CSRIya7EensPhLGU4lCTQEgvlymGX4fulaJJueDcrqAClpz98u8ShCieOH wQuKqaTBPgis3hItv/X/ASArP5S9nZGG3UrQCadBI24PjbwGjqciD7qCcFJXXTFOWQJw vPnVAznon9sBK9yHagHb33xIyG2/HAT/2qrpw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=a41tlxI3deF8mBQyeJjNOoUyGsQDaLWBbpsll/2BB1E=; b=IY+fznFhDem1YjAj31sHFlXlGtLqZR2tRKs1Qa7hRD0+ynZfook3DfCR5fREP5m5Gr CwuOq0gXJ9pQDjumPw9j5F69lGm+4IRkZKaHaZXGF9mAJUnqQNuscnkIn1soG7Mqlt9B chuvXfrmQt8F30ItGR2zi0PhWmiIGA58SB1NguMjM737xcXwumNrOgDmm0vVGb84b6ju nCmbfkvPQ+ZLcC9jg4cBWNDcXxljmWLuKrtCdN4dpdk8s9dAbEJ87Da3pGoZuvBAes7I 2OZKiBFUS8aOwj7KZ0/dYtF91BYTh2qdXiSkg6JS8g31ukLNqrcdFX5kItPC5czBORWq dJCA== X-Gm-Message-State: APjAAAWiPSyxRT0mAilLtWy0DBfFV/GobpbeD/3n+e+N7jq1WIDI6R3k BygD4YmM3dSdj3EOWg576iMP5QmjVLUGVw== X-Google-Smtp-Source: APXvYqz6wOPvZSwaSd2ffeykekDPUmq8VZpbTmT3TXJqMwHRgWoE5B6ncXviHzbITcLuBwiXeYDhdg== X-Received: by 2002:a63:570c:: with SMTP id l12mr35802901pgb.25.1562126521378; Tue, 02 Jul 2019 21:02:01 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:b852:bd51:9305:4261]) by smtp.gmail.com with ESMTPSA id w16sm608327pfj.85.2019.07.02.21.01.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jul 2019 21:02:00 -0700 (PDT) From: Hsin-Yi Wang To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 0/3] add support for rng-seed Date: Wed, 3 Jul 2019 12:01:33 +0800 Message-Id: <20190703040135.169843-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190702_210203_248497_10C5F10F X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Yu Zhao , Kees Cook , Ard Biesheuvel , Catalin Marinas , Stephen Boyd , Will Deacon , linux-kernel@vger.kernel.org, Mike Rapoport , Jun Yao , Miles Chen , Rob Herring , James Morse , Hsin-Yi Wang , Andrew Murray , Andrew Morton , Laura Abbott , Frank Rowand , Robin Murphy Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Introducing a chosen node, rng-seed, which is an entropy that can be passed to kernel called very early to increase initial device randomness. This can be used for adding sufficient initial entropy for stack canary. Especially architectures that lack per-stack canary. Hsin-Yi Wang (3): arm64: map FDT as RW for early_init_dt_scan() fdt: add support for rng-seed arm64: kexec_file: add rng-seed support arch/arm64/include/asm/mmu.h | 2 +- arch/arm64/kernel/kaslr.c | 5 +---- arch/arm64/kernel/machine_kexec_file.c | 18 +++++++++++++++++- arch/arm64/kernel/setup.c | 9 ++++++++- arch/arm64/mm/mmu.c | 15 +-------------- drivers/of/fdt.c | 10 ++++++++++ 6 files changed, 38 insertions(+), 21 deletions(-)