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=-4.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 CDA12C433DB for ; Mon, 25 Jan 2021 14:30:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 87C9B2312C for ; Mon, 25 Jan 2021 14:30:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87C9B2312C 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+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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KgM/To5ZJvQlvlU5EfM3glHYwTQhU34DJTsiZg4iT80=; b=xMY4bPD4OFeKF3ZQYyL4BpB4r 7HmphasCrNPUq08mluNF+3I3v1PhWOlfaIDFLYld0od5RqhhgawmvGLRNRulvg3zluhyeicmQR9v1 iH0bgJ4ohFt8MGA4GTRRhL7VrXnUEXrBwUx5U0GKk2CI8VQr3qwdnMIpgmwu74yMBjtL0YxfWrFAL bRiYESkBTMfTsvpLvHqqVSlq7s0GMi6edIsj9sj2SCQgV9DOnAOzm3l5sGTaNcRelqtFcgjv4LZkz aKqK42fMrNxrK7P9g4coxKAQ8jGsLcbJshSIbfAEIsvsXtWXiZaq9prRLk9gcAQRBVkMRCrnci93t AiiHEIbyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l42rN-00054Y-UJ; Mon, 25 Jan 2021 14:28:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l42rL-000544-B3 for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2021 14:28:52 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC6BE23121; Mon, 25 Jan 2021 14:28:49 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l42rH-009tNN-FP; Mon, 25 Jan 2021 14:28:47 +0000 MIME-Version: 1.0 Date: Mon, 25 Jan 2021 14:28:47 +0000 From: Marc Zyngier To: Ard Biesheuvel Subject: Re: [PATCH v5 18/21] arm64: Move "nokaslr" over to the early cpufeature infrastructure In-Reply-To: References: <20210125105019.2946057-1-maz@kernel.org> <20210125105019.2946057-19-maz@kernel.org> <3a98ff1db79c90c96038b924eb534643@kernel.org> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <32b49beb87b25303d71fd2f7053c7959@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: ardb@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, alexandru.elisei@arm.com, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_092851_493329_FE933832 X-CRM114-Status: GOOD ( 22.28 ) 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 , Jing Zhang , Prasad Sodagudi , Srinivas Ramana , Suzuki K Poulose , Catalin Marinas , Alexandru Elisei , Linux Kernel Mailing List , James Morse , Julien Thierry , Ajay Patil , Android Kernel Team , David Brazdil , Will Deacon , kvmarm , Linux ARM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-01-25 14:19, Ard Biesheuvel wrote: > On Mon, 25 Jan 2021 at 14:54, Marc Zyngier wrote: >> >> On 2021-01-25 12:54, Ard Biesheuvel wrote: [...] >> > This struct now takes up >> > - ~100 bytes for the characters themselves (which btw are not emitted >> > into __initdata or __initconst) >> > - 6x8 bytes for the char pointers >> > - 6x24 bytes for the RELA relocations that annotate these pointers as >> > quantities that need to be relocated at boot (on a kernel built with >> > KASLR) >> > >> > I know it's only a drop in the ocean, but in this case, where the >> > struct is statically declared and defined only once, and in the same >> > place, we could easily turn this into >> > >> > static const struct { >> > char alias[24]; >> > char param[20]; >> > }; >> > >> > and get rid of all the overhead. The only slightly annoying thing is >> > that the array sizes need to be kept in sync with the largest instance >> > appearing in the array, but this is easy when the struct type is >> > declared in the same place where its only instance is defined. >> >> Fair enough. I personally find the result butt-ugly, but I agree >> that it certainly saves some memory. Does the following work for >> you? I can even give symbolic names to the various constants (how >> generous of me! ;-). >> > > To be honest, I was anticipating more of a discussion, but this looks > reasonable to me. It looked like a reasonable ask: all the strings are completely useless once the kernel has booted, and I'm the first to moan that I can't boot an arm64 kernel with less than 60MB of RAM (OK, it's a pretty bloated kernel...). > Does 'char feature[80];' really need 80 bytes though? It really needs 75 bytes, because of this: { "arm64.nopauth", "id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 " "id_aa64isar1.api=0 id_aa64isar1.apa=0" }, 80 is a round enough number. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel