From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 230B0C5DF60 for ; Fri, 8 Nov 2019 14:36:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC40E214DB for ; Fri, 8 Nov 2019 14:36:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nePW0rF7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="ClWfAB/I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC40E214DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AYNR1EJXknpDQ3sG7+yrzdl+vZUV+FbmIgul5uKbEKc=; b=nePW0rF7n762l97PenB3MkoOH 5M5MOEvatoWdbdMzffpeSikP2rJXGXa+0VlBsmpPp3Ixq+JPpKVANMYayZCK1L9GSoM/RkIPXcrDv SVEr2iNJ66B8D5CXmFwxDbAHYHd/q9bRogNaPsIjDACeah3JQh+L0P1uXtsSd5DJKRo7Q3acXKKne RnhcemMKunJXOXCQ4bcmK3yy8XRAM/nAD7Koam36PsP5dVz79HZZDGPIDmMZeGOeKgeIMl5MfeyoE Rz7FS3jDsonEc9kZROQ3M1CsPuLkRDCcCMsPVk9cXptCkrnw5oksVwgZFFkRYKTZ7vn+f4AuxHy+r 1DJK6f34w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT5Mm-0004Gy-4T; Fri, 08 Nov 2019 14:36:00 +0000 Received: from heliosphere.sirena.org.uk ([172.104.155.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT5Mj-0004GD-7Q for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2019 14:35:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kLfXvQkC42L9tczjPcJq75OcxcztTAqs9D1ZZfjvAhk=; b=ClWfAB/IoOsWuKCAKV/+IAte8 YkI/YccN97xAYCmTaR7SpXrWNCBx6t0OEcZMQIvnUxr0kzgM0PIS3XQ4M4bNpChht5juT2Pu6U2Rt Sg6WP236YFYZGbMB3YIwIFEV8hJqisX1KP7jroyYRoG6+QZks+PtAlmyvGOeiZBF6eKqw=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iT5Mh-0007R9-1Y; Fri, 08 Nov 2019 14:35:55 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 4550A2741450; Fri, 8 Nov 2019 14:35:54 +0000 (GMT) Date: Fri, 8 Nov 2019 14:35:54 +0000 From: Mark Brown To: Mark Rutland Subject: Re: [PATCH] arm64: kaslr: Print warning if KASLR is disabled due to lack of seed Message-ID: <20191108143554.GF5532@sirena.co.uk> References: <20191107121241.8458-1-broonie@kernel.org> <20191108133830.GB22834@arrakis.emea.arm.com> <20191108141426.GC11465@lakrids.cambridge.arm.com> MIME-Version: 1.0 In-Reply-To: <20191108141426.GC11465@lakrids.cambridge.arm.com> X-Cookie: Life is like a simile. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191108_063557_269525_8FF3E10D X-CRM114-Status: GOOD ( 12.19 ) 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: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============1560936337955648363==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1560936337955648363== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eDB11BtaWSyaBkpc" Content-Disposition: inline --eDB11BtaWSyaBkpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 08, 2019 at 02:14:27PM +0000, Mark Rutland wrote: > To avoid surprises, I think it'd be best to log that state later, in I was just going to add an initcall in kaslr.c to keep things together. > setup.c. We can also do that consistently, so that the user has a > positive message when KASLR is in use. So long as people are happy announcing it, I didn't add anything since I wasn't clear if this was a deliberate decision to not provide information but I see now it was more likely just the fact that it's running too early to reliably print. > enum kaslr_status { > KASLR_ENABLED, > KASLR_DISABLED, > KASLR_NO_SEED, > }; > enum kaslr_status __ro_after_init kaslr_status; > ... and switch on that in setup.c. Having the enum seems like it spreads the code out for unclear advantage, apart from the logging nothing particularly cares about anything other than the enabled/disabled decision. --eDB11BtaWSyaBkpc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3FfUkACgkQJNaLcl1U h9D9jggAgD4YzTOU/0yTHZcWbyPcmy8G2Ec3JuGP2KV8TG3KJ61QxROtM0f1Z1hE eR/pSfqFfAxgM5uPsJBfMaWO/XHGJzePtk46t63b9E6db7vG1tOrKwXa6ZX3jBQG LhUEq1mkiifMzyLxKAGhOUf6w+9g55pW9ddX8fIBizfca5FK5mmXNE7V6IfX5D7t 3iGrNJ9VlA8+w2Jzse+76lox0zWTdpKcmnlKcmRLy+XYhJrKEtx93JmznntEw5cz cTbJL30Mya7qKi08ct4fZmBRwpniGVoZqk6ObKD9zjgElD0wIfb3TQiSNbolKOv4 tD7xYlZYPxygIIcNzUhtWayV7W8kxQ== =kSgj -----END PGP SIGNATURE----- --eDB11BtaWSyaBkpc-- --===============1560936337955648363== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1560936337955648363==--