Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1689996ybl; Wed, 28 Aug 2019 19:43:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4mubSxUSA/M42Q+zcqTqrKEQ8LOY4Zpc7zCkHjknbcCdMYx7PKrbgqiZ0qi3rdZcIxwgA X-Received: by 2002:a17:90a:23c8:: with SMTP id g66mr7424292pje.123.1567046601868; Wed, 28 Aug 2019 19:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567046601; cv=none; d=google.com; s=arc-20160816; b=rxO8fWuIDvfeSHr1vavjHok0FZqOcK2ILlSJiVTmHwz1o8iRJbYL1VVUk8Qr0lbY/z OkTJfzUXVddaMreMqD5kIXpXsz3O2cv9E9iYTBKSer6AF/P16Fy+LLNUil0pQ6fndruR FcxbjgQ75b1Mg3XyjLvj8+/OFfuZgBcSWeN1PV4pTOn8koEBATAZ3EqHBo5Zsgfty6YY 56P91Orz9vu7WXvWmVNIai2JryBY8gdOBB+tT79oG2/rH4lSIUFGB+3M/kSL5TTk63l9 /rJEVTICG4qa4a+0K0fSPV/odkG62LTr9Eojll2Y2FF4cae3pan+a5B9lTSWzfvOBJsu OgCw== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VmR7QqNVFjYX3UWzUz2FxmW692IghQTFL5fGmvwUxT4=; b=EbNqNHpQjCbTx5oVv9+4zcJ30nUvuhCSdRBDxJ571XiM4+1BJZhBqmwxm3J5rgGsij d4z5T0Hy77oiHGbLOifImaL9+XdUPwRWF4DkDDb8PvqHtl7vFaQxzEjMWjru7b6EjrXv e8OnAFI/F9ER8O4uTAznFRf/O/8E6xQ9gxdwcbEiX/vuSSgH0ULXAZnLmTXIdMN2E4tb Uttdi7RSxeWmx7SLaqs4XYvUPZKie3WCAGThozd6AE/OiKSTLt/j3F/0GivXNrEIA2GX VoF2+F1q6zqGqqKAm926lVpuqThtuF6XykdzKn5HvS1WQ9y1Fj5ZAzGXioriz+4xjoiI URaA== ARC-Authentication-Results: i=1; mx.google.com; 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 q135si1040699pfc.125.2019.08.28.19.42.54; Wed, 28 Aug 2019 19:43:21 -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; 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 S1726825AbfH2Clb (ORCPT + 99 others); Wed, 28 Aug 2019 22:41:31 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:40954 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726319AbfH2Clb (ORCPT ); Wed, 28 Aug 2019 22:41:31 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6C2B397E212C635202B0; Thu, 29 Aug 2019 10:41:29 +0800 (CST) Received: from [127.0.0.1] (10.177.96.203) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Thu, 29 Aug 2019 10:41:21 +0800 Subject: Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32 To: Scott Wood , , , , , , , , , CC: , , , , , , References: <20190809100800.5426-1-yanaijie@huawei.com> <143e5a85bc630d2bb0324114e78bedec8fbeb299.camel@buserror.net> From: Jason Yan Message-ID: <30a034e9-898c-5734-cf8b-c8704cdb42c5@huawei.com> Date: Thu, 29 Aug 2019 10:41:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <143e5a85bc630d2bb0324114e78bedec8fbeb299.camel@buserror.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.203] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/8/28 12:59, Scott Wood wrote: > On Tue, 2019-08-27 at 23:05 -0500, Scott Wood wrote: >> On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: >>> Freescale Book-E >>> parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 >>> entries are not suitable to map the kernel directly in a randomized >>> region, so we chose to copy the kernel to a proper place and restart to >>> relocate. >>> >>> Entropy is derived from the banner and timer base, which will change every >>> build and boot. This not so much safe so additionally the bootloader may >>> pass entropy via the /chosen/kaslr-seed node in device tree. >> >> How complicated would it be to directly access the HW RNG (if present) that >> early in the boot? It'd be nice if a U-Boot update weren't required (and >> particularly concerning that KASLR would appear to work without a U-Boot >> update, but without decent entropy). > > OK, I see that kaslr-seed is used on some other platforms, though arm64 aborts > KASLR if it doesn't get a seed. I'm not sure if that's better than a loud > warning message (or if it was a conscious choice rather than just not having > an alternative implemented), but silently using poor entropy for something > like this seems bad. > It can still make the attacker's cost higher with not so good entropy. The same strategy exists in X86 when X86 KASLR uses RDTSC if without X86_FEATURE_RDRAND supported. I agree that having a warning message looks better for reminding people in this situation. > -Scott > > > > . >