[{"id":1762740,"web_url":"http://patchwork.ozlabs.org/comment/1762740/","msgid":"<nycvar.YSQ.7.76.1709041158560.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T15:59:18","subject":"Re: [PATCH v2 02/29] asm-generic: add .data.rel.ro sections to\n\t__ro_after_init","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> When running in PIC mode, the compiler will emit const structures\n> containing runtime relocatable quantities into .data.rel.ro.* sections,\n> so that the linker can be smart about placing them together in a segment\n> that is read-write initially, and is remapped read-only afterwards. This\n> is exactly what __ro_after_init aims to provide, so move these sections\n> together.\n> \n> Acked-by: Arnd Bergmann <arnd@arndb.de>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  include/asm-generic/vmlinux.lds.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h\n> index da0be9a8d1de..d16537b0b102 100644\n> --- a/include/asm-generic/vmlinux.lds.h\n> +++ b/include/asm-generic/vmlinux.lds.h\n> @@ -261,7 +261,7 @@\n>  #ifndef RO_AFTER_INIT_DATA\n>  #define RO_AFTER_INIT_DATA\t\t\t\t\t\t\\\n>  \tVMLINUX_SYMBOL(__start_ro_after_init) = .;\t\t\t\\\n> -\t*(.data..ro_after_init)\t\t\t\t\t\t\\\n> +\t*(.data..ro_after_init .data.rel.ro.*)\t\t\t\t\\\n>  \tVMLINUX_SYMBOL(__end_ro_after_init) = .;\n>  #endif\n>  \n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"BQFoZfWM\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"VGc5hfy2\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmF1W66j1z9sNq\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:00:31 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotnW-0003eS-QL; Mon, 04 Sep 2017 16:00:26 +0000","from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotnS-0002Qh-NR for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:00:25 +0000","by mail-io0-x233.google.com with SMTP id y123so2505141iod.0\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:00:01 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tn19sm2132300ioe.34.2017.09.04.08.59.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:00:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Nz8J6vW2GIYkP4gQtmLaB3VHfzZ1wfTmDPYHI7mwev8=;\n\tb=BQFoZfWMkY387i\n\tzi6PietkJbouGYsDi7e0XD3fPDZfb+ohfuELFRkNqw0fp7rx3QOaqDHpNO6eUJtosfCzOvbLsyrIa\n\t9jYXR/KZtCvvD2dsM3IfihoyPcRgberXTPUtdkbicMo7mo3I8+2PEOcCeyxoYIxPmLzWaoUUtyOdR\n\t4+XSB0ZMzeOIRVHxVOSdH2YGsa4oB7+L3EIavCY0nUdarizBo3HgPmxj5OHf1RRScm3ycRdG2qUKm\n\tFkQ4pVcHF9dIm69U8wSM7NTRXWMlEM3eNhBIJr96VYAMiCshh9qd+0o41BQcSmQnRYDcj5Cw67mOw\n\tiZy2ktm/+DNbHGpiemdQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=3QvDRxtDCx5BG8sKNepqmlc8Wo/hAKZ0uEojxJTBnps=;\n\tb=VGc5hfy2OGI/+fx93ScguAZnSbdV3f56fmwpnSUJkWwSl9bzRnk19WLJsscrxL1kxg\n\tUsWo1+zARsuertdo44SQxiy1g+UzHsr3B2XfEJTgw2dCBUcVIVnz4drcaT8jtGgXTD2C\n\tBPlmjMpsBVfBS/feOMrL72Y73VeunnFwwfyxQ="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=3QvDRxtDCx5BG8sKNepqmlc8Wo/hAKZ0uEojxJTBnps=;\n\tb=Iy1q11GATfeI/yHcWVZRf0fagQTluXd3zjE+VDD100Ev2tnExYsj5rkSyPOjU6O48i\n\tsxlbZ5huotytsxuS0E+TCzfUZxutMAKpgovvVHMvZDJ5t0q+L1ptAFlhC5G/Q6G21jVc\n\tbCB2H9vb9YEuSpuVeqUSwjsoTiOftGx0s8+705DJgwEULE58db4UeRgMO4UEZUp8CQuh\n\tWFi/ZhoTKW4pkU7D95tqDB5INdaeclrsQovnAwzGDtHplqcH+47MgTRE2OSRKqhpuEW4\n\t9RsliCY8RIuq9Uw6dLcXNbX3FV1NHuipBDdm73g88Rl9847Mry+s4zjUeLg/r6WeO1j8\n\tOwng==","X-Gm-Message-State":"AHPjjUj9sqXjqnS8eg/WRsDEcQ65XQ+jd9S+SOb+ZPapDzoQEroqjfO0\n\tlA2skYWFkD9HMwiCKSqVZg==","X-Google-Smtp-Source":"ADKCNb7RMk88iWTwXmMZNn+ychuFTRMDrMbgKfMdV3FCEVLPz7tEQ9j1zclu4Ch3yPyBEBfjuEae0A==","X-Received":"by 10.107.19.30 with SMTP id b30mr1013565ioj.19.1504540801086;\n\tMon, 04 Sep 2017 09:00:01 -0700 (PDT)","Date":"Mon, 4 Sep 2017 11:59:18 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 02/29] asm-generic: add .data.rel.ro sections to\n\t__ro_after_init","In-Reply-To":"<20170903120757.14968-3-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041158560.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-3-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_090023_015285_90E6D469 ","X-CRM114-Status":"GOOD (  14.77  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:233 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762742,"web_url":"http://patchwork.ozlabs.org/comment/1762742/","msgid":"<nycvar.YSQ.7.76.1709041205090.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:05:40","subject":"Re: [PATCH v2 03/29] ARM: assembler: introduce adr_l, ldr_l and\n\tstr_l macros","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Like arm64, ARM supports position independent code sequences that\n> produce symbol references with a greater reach than the ordinary\n> adr/ldr instructions.\n> \n> Currently, we use open coded instruction sequences involving literals\n> and arithmetic operations. Instead, we can use movw/movt pairs on v7\n> CPUs, circumventing the D-cache entirely. For older CPUs, we can emit\n> the literal into a subsection, allowing it to be emitted out of line\n> while retaining the ability to perform arithmetic on label offsets.\n> \n> E.g., on pre-v7 CPUs, we can emit a PC-relative reference as follows:\n> \n>        ldr          <reg>, 222f\n>   111: add          <reg>, <reg>, pc\n>        .subsection  1\n>   222: .long        <sym> - (111b + 8)\n>        .previous\n> \n> This is allowed by the assembler because, unlike ordinary sections,\n> subsections are combined into a single section into the object file,\n> and so the label references are not true cross-section references that\n> are visible as relocations. Note that we could even do something like\n> \n>        add          <reg>, pc, #(222f - 111f) & ~0xfff\n>        ldr          <reg>, [<reg>, #(222f - 111f) & 0xfff]\n>   111: add          <reg>, <reg>, pc\n>        .subsection  1\n>   222: .long        <sym> - (111b + 8)\n>        .previous\n> \n> if it turns out that the 4 KB range of the ldr instruction is insufficient\n> to reach the literal in the subsection, although this is currently not a\n> problem (of the 98 objects built from .S files in a multi_v7_defconfig\n> build, only 11 have .text sections that are over 1 KB, and the largest one\n> [entry-armv.o] is 3308 bytes)\n> \n> Subsections have been available in binutils since 2004 at least, so\n> they should not cause any issues with older toolchains.\n> \n> So use the above to implement the macros mov_l, adr_l, ldr_l and str_l,\n> all of which will use movw/movt pairs on v7 and later CPUs, and use\n> PC-relative literals otherwise.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nREviewed-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/include/asm/assembler.h | 76 ++++++++++++++++++++\n>  1 file changed, 76 insertions(+)\n> \n> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h\n> index ad301f107dd2..341e4ed1ef84 100644\n> --- a/arch/arm/include/asm/assembler.h\n> +++ b/arch/arm/include/asm/assembler.h\n> @@ -518,4 +518,80 @@ THUMB(\torr\t\\reg , \\reg , #PSR_T_BIT\t)\n>  #endif\n>  \t.endm\n>  \n> +\t.macro\t\t__adldst_l, op, reg, sym, tmp\n> +\t.if\t\t__LINUX_ARM_ARCH__ < 7\n> +\tldr\t\t\\tmp, 111f\n> +\t.subsection\t1\n> +\t.align\t\t2\n> +111:\t.long\t\t\\sym - (222f + 8)\n> +\t.previous\n> +\t.else\n> +\t/*\n> +\t * In Thumb-2 builds, the PC bias depends on whether we are currently\n> +\t * emitting into a .arm or a .thumb section. So emit a nop and take\n> +\t * its size, so we can infer the execution mode and PC bias from it.\n> +\t */\n> +   ARM(\t.set\t\t.Lnopsize, 4\t\t\t)\n> + THUMB(\t.pushsection\t\".discard.nop\", \"x\", %note\t)\n> + THUMB(\t111:\t\tnop\t\t\t\t)\n> + THUMB(\t.set\t\t.Lnopsize, . - 111b\t\t)\n> + THUMB(\t.popsection\t\t\t\t\t)\n> +\n> +\tmovw\t\t\\tmp, #:lower16:\\sym - (222f + 2 * .Lnopsize)\n> +\tmovt\t\t\\tmp, #:upper16:\\sym - (222f + 2 * .Lnopsize)\n> +\t.endif\n> +222:\n> +\t.ifc\t\t\\op, add\n> +\tadd\t\t\\reg, \\tmp, pc\n> +\t.elseif\t\t.Lnopsize == 2\t\t@ Thumb-2 mode\n> +\tadd\t\t\\tmp, \\tmp, pc\n> +\t\\op\t\t\\reg, [\\tmp]\n> +\t.else\n> +\t\\op\t\t\\reg, [pc, \\tmp]\n> +\t.endif\n> +\t.endm\n> +\n> +\t/*\n> +\t * mov_l - move a constant value or [relocated] address into a register\n> +\t */\n> +\t.macro\t\tmov_l, dst:req, imm:req\n> +\t.if\t\t__LINUX_ARM_ARCH__ < 7\n> +\tldr\t\t\\dst, =\\imm\n> +\t.else\n> +\tmovw\t\t\\dst, #:lower16:\\imm\n> +\tmovt\t\t\\dst, #:upper16:\\imm\n> +\t.endif\n> +\t.endm\n> +\n> +\t/*\n> +\t * adr_l - adr pseudo-op with unlimited range\n> +\t *\n> +\t * @dst: destination register\n> +\t * @sym: name of the symbol\n> +\t */\n> +\t.macro\t\tadr_l, dst:req, sym:req\n> +\t__adldst_l\tadd, \\dst, \\sym, \\dst\n> +\t.endm\n> +\n> +\t/*\n> +\t * ldr_l - ldr <literal> pseudo-op with unlimited range\n> +\t *\n> +\t * @dst: destination register\n> +\t * @sym: name of the symbol\n> +\t */\n> +\t.macro\t\tldr_l, dst:req, sym:req\n> +\t__adldst_l\tldr, \\dst, \\sym, \\dst\n> +\t.endm\n> +\n> +\t/*\n> +\t * str_l - str <literal> pseudo-op with unlimited range\n> +\t *\n> +\t * @src: source register\n> +\t * @sym: name of the symbol\n> +\t * @tmp: mandatory scratch register\n> +\t */\n> +\t.macro\t\tstr_l, src:req, sym:req, tmp:req\n> +\t__adldst_l\tstr, \\src, \\sym, \\tmp\n> +\t.endm\n> +\n>  #endif /* __ASM_ASSEMBLER_H__ */\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"dg7L7VeV\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"bRNJFGdQ\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmF862bsJz9sNq\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:06:14 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dott5-0005bB-6B; Mon, 04 Sep 2017 16:06:11 +0000","from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dott0-0005a7-0k for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:06:08 +0000","by mail-io0-x234.google.com with SMTP id y123so2544373iod.0\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:05:43 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\t72sm457610itz.43.2017.09.04.09.05.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:05:42 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=3nvJ7KVvrjCZRQLMPCohne5TbeB4xcf398lSfhIIzyk=;\n\tb=dg7L7VeVsCWLcC\n\tqU5DzYJnVc8dU16GgTfUXfhYKKVdOe0hiYLGs+FsbnSaoaSZvbmdgNdK9nexkWOn6ZzVwDUrL5tMn\n\tJVbA9vVkjmfdNEJ6AoI59sEo0VfieumDI4iQ02MW8ELAVpmbRMn+UqEMi2RbC/5PWWiI9lIw5hY+i\n\tmqOZyz9OoEPLa0Z6s/xeIgtb4JcP9TKFk5Qjtig7SZzo4suQNFhxOKVe9kmVLt5HOVbAt5Gd+aewP\n\tiuI5iH0JsDE90plctNS01EI2DsPSlONQ0JhUr9YkrdNkJvhvXTJWHCIjGy1aUhgrIBOqeuRGcO6xg\n\tf6GEG779nKtg1eNx8waw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=lJtlziYvCP2uaK7z7xPPodftq3puuoBquJizvNTUR+s=;\n\tb=bRNJFGdQ7tmLl3H0zmjI2zzFxWpDkKAHRgFahLkEGplLaJJNP2pAuNblXH2Ux3CTwx\n\tMlBbImUqilQrBXYdzhGXjIvx+7zSMb1QbnV2G/aZ21z/a6e2nEGi7bRO1tKSBWa4AR4U\n\tKZv6vRDaOReYgphKPIVYvFqzWhvZayi7nWXMA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=lJtlziYvCP2uaK7z7xPPodftq3puuoBquJizvNTUR+s=;\n\tb=XaVthfA2zYSbjJTqs3oKvdZuBE6TzLFtVLdnY1qkPE1chXWh3M2d6qMylt8/c3V59U\n\t6r0yzjvdbfP9rz980Cy/GhkaSKTBGhzVjhZSiGyjtj/yjtr0YaUH6JdN1Ov2GfEK3RbP\n\t0pz/RRlpL2NgNI+4ci3soRWfuvam+Lsi48c+EBawSztEKS0FfTRNOTfsPysS6O9gpJgS\n\tkjTj//FGXUCrg0gXgLMi6Jn/H8tDgK3ShD9OxtjHEmyYHS+v8sLwfsKoACYI6wQm+T/D\n\t/YPkl4P16rL0iZi+rEB9JC0ITrgCRoG4FfhBo4+17fquB78smKwDIOn3549fwDTrDheD\n\tK5eA==","X-Gm-Message-State":"AHPjjUgrf7rz4VHy7fAJsYlC4jYTEeQTMM14JVbxfXbDld2E9uMlH7zx\n\tvsi/VkZy6XUOj4FA","X-Google-Smtp-Source":"ADKCNb4tUhBvcKh5mf8aByQLWJP47YledokxNrbJ5FK1BPY+nvbJ0nWu6MsjBYHLYfuiaKM+vCg1Ng==","X-Received":"by 10.107.137.232 with SMTP id\n\tt101mr1098233ioi.289.1504541143041; \n\tMon, 04 Sep 2017 09:05:43 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:05:40 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 03/29] ARM: assembler: introduce adr_l, ldr_l and\n\tstr_l macros","In-Reply-To":"<20170903120757.14968-4-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041205090.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-4-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_090606_243922_DC76B0DC ","X-CRM114-Status":"GOOD (  24.03  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:234 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762744,"web_url":"http://patchwork.ozlabs.org/comment/1762744/","msgid":"<nycvar.YSQ.7.76.1709041206300.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:06:50","subject":"Re: [PATCH v2 04/29] ARM: head-common.S: use PC-relative insn\n\tsequence for __proc_info","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations with a pair\n> of adr_l invocations. This ensures these quantities are invariant\n> under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n\n> ---\n>  arch/arm/kernel/head-common.S | 22 ++++++--------------\n>  1 file changed, 6 insertions(+), 16 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S\n> index 8733012d231f..06035488130c 100644\n> --- a/arch/arm/kernel/head-common.S\n> +++ b/arch/arm/kernel/head-common.S\n> @@ -150,11 +150,12 @@ ENDPROC(lookup_processor_type)\n>   *\tr9 = cpuid (preserved)\n>   */\n>  __lookup_processor_type:\n> -\tadr\tr3, __lookup_processor_type_data\n> -\tldmia\tr3, {r4 - r6}\n> -\tsub\tr3, r3, r4\t\t\t@ get offset between virt&phys\n> -\tadd\tr5, r5, r3\t\t\t@ convert virt addresses to\n> -\tadd\tr6, r6, r3\t\t\t@ physical address space\n> +\t/*\n> +\t * Look in <asm/procinfo.h> for information about the __proc_info\n> +\t * structure.\n> +\t */\n> +\tadr_l\tr5, __proc_info_begin\n> +\tadr_l\tr6, __proc_info_end\n>  1:\tldmia\tr5, {r3, r4}\t\t\t@ value, mask\n>  \tand\tr4, r4, r9\t\t\t@ mask wanted bits\n>  \tteq\tr3, r4\n> @@ -166,17 +167,6 @@ __lookup_processor_type:\n>  2:\tret\tlr\n>  ENDPROC(__lookup_processor_type)\n>  \n> -/*\n> - * Look in <asm/procinfo.h> for information about the __proc_info structure.\n> - */\n> -\t.align\t2\n> -\t.type\t__lookup_processor_type_data, %object\n> -__lookup_processor_type_data:\n> -\t.long\t.\n> -\t.long\t__proc_info_begin\n> -\t.long\t__proc_info_end\n> -\t.size\t__lookup_processor_type_data, . - __lookup_processor_type_data\n> -\n>  __error_lpae:\n>  #ifdef CONFIG_DEBUG_LL\n>  \tadr\tr0, str_lpae\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"TORoQbCf\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"AQr1B6h6\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmF9P6l92z9t2Z\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:07:21 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotu9-00069M-LK; Mon, 04 Sep 2017 16:07:17 +0000","from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotu5-0005yE-Ay for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:07:15 +0000","by mail-io0-x22a.google.com with SMTP id q64so2487917iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:06:53 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199])\n\tby smtp.gmail.com with ESMTPSA id y1sm472134itb.4.2017.09.04.09.06.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:06:51 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=TIc/XKhenLbuszL+3WM0tn1c/yHUygz6ROXcX/PRJyk=;\n\tb=TORoQbCfaq2Mch\n\ttlhIWQv0DJdrVPrVV6rE36EsQ8ITSTmn42ri0aw0LtS28QWDsa07ZDW84foK3Uq+MxYGD2Bcg8NcV\n\tEJMbpf7G2SMwwkVZJoXRKyt3kn/mEByrimRZRbZxIZb9PkPW95Hxja+uFV+emopRkpUH1p+WWoQXo\n\t8hSDWRXWY3cMvL/g9Wcsi5Jw1keT2MtpQwqn7fPSzg2p8JwgI/pFSGMuutIYKRwWEl4kKWdqfmfzD\n\trtiNHmy++q2RHXMQLX+g62b/hXEUH3oefahqwXfZXQtmBDPKLp/bXSLj7H0G6GghNGpV7HYvdQwvj\n\tnChB3Lr8W+Tel0tCNDwg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=KDWgCVfosrP7UFyDDTK7aDX4qEBr9Zc1eN9VTURBEj4=;\n\tb=AQr1B6h64yPd4P6vPLQhxvP9gsRHgcLISpjNj81ww2ghdkoIxN00AvtK5+dyzmL6Vd\n\tQma+W+0rEiJbTkvsC12bZbWQ3XeF3u7wFQyPuNYKNcy1xcER0W5UThjj3k67/lsEclDk\n\tQH8NtfLblaJM/hhgv47bpcKtVN598uYnTFxVU="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=KDWgCVfosrP7UFyDDTK7aDX4qEBr9Zc1eN9VTURBEj4=;\n\tb=evHm+ClwMA/u/zCKdI9nTYOfdZmtmgKg0cnQWZLQp7zNH7IFg/XL/FLS/Rwe9Czl1H\n\tvMlrvND70fJ7Bdp/bZhbXokVQr7VfAbgR7hFGkTT7v29umXBttlhc5mpFT0zb3SIum0y\n\to8Kxr5HMHPisvtlNpBZkkuyV/aa38bCnDpYpqM/mhkzKRJAjMcANDZAbwUg0icpV/rYE\n\ttyKuv8ll0Z+V3H9vwSIV3o33LAewVU/W6g/G750rQMLX3JsV3b/NZB8BO1lL6eccCOFb\n\tY4kPgesVBzYLbA16pU+pyBWjj7pSM2tMWslTGTEwjdtE8w9ji54N0EgwdsrXyITGNMK7\n\tLeoA==","X-Gm-Message-State":"AHPjjUidwkBNg18dpFYURH3erbZve6EVJduBiJWQKV/C75QdHqCd1H00\n\t1TkbawtmvYnPoq81","X-Google-Smtp-Source":"ADKCNb5rYvQWUB/gkeaWeynTfAoUNDNn89SLTX0rHyLACAqzIvAVtedbysekOfR0ruafDVk7HJhedA==","X-Received":"by 10.107.146.11 with SMTP id u11mr1205298iod.304.1504541212457; \n\tMon, 04 Sep 2017 09:06:52 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:06:50 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 04/29] ARM: head-common.S: use PC-relative insn\n\tsequence for __proc_info","In-Reply-To":"<20170903120757.14968-5-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041206300.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-5-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_090713_510172_9376AE9C ","X-CRM114-Status":"GOOD (  15.56  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22a listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762745,"web_url":"http://patchwork.ozlabs.org/comment/1762745/","msgid":"<nycvar.YSQ.7.76.1709041208020.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:08:25","subject":"Re: [PATCH v2 05/29] ARM: head-common.S: use PC-relative insn\n\tsequence for idmap creation","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations involving\n> __turn_mmu_on and __turn_mmu_on_end with a pair of adr_l invocations.\n> This ensures these quantities are invariant under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/kernel/head.S | 12 ++----------\n>  1 file changed, 2 insertions(+), 10 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index 04286fd9e09c..0a98aec0e39d 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -227,11 +227,8 @@ __create_page_tables:\n>  \t * Create identity mapping to cater for __enable_mmu.\n>  \t * This identity mapping will be removed by paging_init().\n>  \t */\n> -\tadr\tr0, __turn_mmu_on_loc\n> -\tldmia\tr0, {r3, r5, r6}\n> -\tsub\tr0, r0, r3\t\t\t@ virt->phys offset\n> -\tadd\tr5, r5, r0\t\t\t@ phys __turn_mmu_on\n> -\tadd\tr6, r6, r0\t\t\t@ phys __turn_mmu_on_end\n> +\tadr_l\tr5, __turn_mmu_on\t\t@ _pa(__turn_mmu_on)\n> +\tadr_l\tr6, __turn_mmu_on_end\t\t@ _pa(__turn_mmu_on_end)\n>  \tmov\tr5, r5, lsr #SECTION_SHIFT\n>  \tmov\tr6, r6, lsr #SECTION_SHIFT\n>  \n> @@ -354,11 +351,6 @@ __create_page_tables:\n>  \tret\tlr\n>  ENDPROC(__create_page_tables)\n>  \t.ltorg\n> -\t.align\n> -__turn_mmu_on_loc:\n> -\t.long\t.\n> -\t.long\t__turn_mmu_on\n> -\t.long\t__turn_mmu_on_end\n>  \n>  #if defined(CONFIG_SMP)\n>  \t.text\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"qdtsvqim\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"PjyBnbZZ\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFCC6N3zz9sNr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:08:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotvg-000744-PY; Mon, 04 Sep 2017 16:08:52 +0000","from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotvc-0006XX-57 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:08:50 +0000","by mail-it0-x22f.google.com with SMTP id f199so10098811ita.1\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:08:27 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tv81sm427733itc.18.2017.09.04.09.08.25\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:08:26 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Rdq0d8La/ORUL1tClyqQ+p+HGJ2h4n3GyCyNnEnuJm8=;\n\tb=qdtsvqimcgOfAa\n\tqI8/ZuoEteEyNs3LMMnaiTbChWUsxVtpGlGofjEqgYjN68Sb6Hc3EdKyBKwHiG1WygubIfisslLgT\n\tRHFsn6/u3a0Rc+nHi+6zgMS6rrcpXQfpIu84IBfyQZuySJ98Cd3s14VrL4ZSHdD8wXfd/rBwbwAED\n\taTE79T1U6cqfXDY/w+e0+0J+MxRtmAtT4IzCwZkDIi2d2gGE/9vnbZMg00lykjn6KQrE4QY8UR9fu\n\tGHEANIeNrTLpr1sRauIgthXWhZr32/9eKqt77fM4enYXvetUkM50VJcxMVg0E41vxgIiwJvE2TwKK\n\toWbzIcMTg3tVvB2ge2hw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=Nj5fMt/YR+cHjCDblxm82MM9Zm45XZW5E08SOWjMUp8=;\n\tb=PjyBnbZZBK+uL49jy1WCfk4V0rStxVocuxpFdSNcGpK6zsUUxOdxh3Mq9pFd4xLDGt\n\t9eOyNWq5ALjVWEGKbof0KRbkG7T03PF0yLxotPhoI4QPJKav5hW5CilzWeGEq01jlwqU\n\tD66p6rDHcCjBvV3wE6IE0Rv5P4liIeVZWVfZE="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=Nj5fMt/YR+cHjCDblxm82MM9Zm45XZW5E08SOWjMUp8=;\n\tb=dZvluQQmQJOiAfue6NvdpG8LO5o9phXbet9n2vTBhj6dTeCip+j4TrtIT1J7fOSCS8\n\tS/5p3gGuLw/G0YdXiiM3wUG5m8PNDpafX4aLJMlwIM86QLAZsj0QP5hI4vkouhBa3ExV\n\tBqf3mdny6tG2r1Ce6w6HiqbPYFUBe8g8R5FON3SVLgJ6xO6bIZy0j0lTZvTZkTpHvq3k\n\txTxMIALrQA4Gn/9neITXgJRRx8SqfYM+RFlzSxbeCdFtAHJITnQFySg3/EFk8fB8Ypwt\n\tEh71+KFnTZ8eh7CCf0pVTFJBLgJ+ZIq71O2wc0lLL6nnXoABgk//lyv/gMg6LNgM4bJl\n\tTs8A==","X-Gm-Message-State":"AHPjjUjEOXfw/oXgqQaYbPAmeADn3JR+9BlcMPMnBP959vPy2KNAZlBR\n\t+jIz/M0tH+qTa0af","X-Google-Smtp-Source":"ADKCNb5k57Bz7lbUi7DMNlEhS3ATbgNWxLwEUr5sSDQ10DdRnHvp6DgYyzjTZjbwgTTdL/UEjRzvMQ==","X-Received":"by 10.36.64.23 with SMTP id n23mr941021ita.31.1504541307188;\n\tMon, 04 Sep 2017 09:08:27 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:08:25 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 05/29] ARM: head-common.S: use PC-relative insn\n\tsequence for idmap creation","In-Reply-To":"<20170903120757.14968-6-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041208020.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-6-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_090848_354048_9D87EC31 ","X-CRM114-Status":"GOOD (  14.68  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c0b:0:0:0:22f listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762748,"web_url":"http://patchwork.ozlabs.org/comment/1762748/","msgid":"<nycvar.YSQ.7.76.1709041209470.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:09:55","subject":"Re: [PATCH v2 06/29] ARM: head.S: use PC-relative insn sequence for\n\tsecondary_data","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations with adr_l\n> and ldr_l invocations. This ensures these quantities are invariant\n> under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/kernel/head.S | 19 ++++---------------\n>  1 file changed, 4 insertions(+), 15 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index 0a98aec0e39d..6e9df3663a57 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -386,10 +386,8 @@ ENTRY(secondary_startup)\n>  \t/*\n>  \t * Use the page tables supplied from  __cpu_up.\n>  \t */\n> -\tadr\tr4, __secondary_data\n> -\tldmia\tr4, {r5, r7, r12}\t\t@ address to jump to after\n> -\tsub\tlr, r4, r5\t\t\t@ mmu has been enabled\n> -\tadd\tr3, r7, lr\n> +\tadr_l\tr3, secondary_data\n> +\tmov_l\tr12, __secondary_switched\n>  \tldrd\tr4, [r3, #0]\t\t\t@ get secondary_data.pgdir\n>  ARM_BE8(eor\tr4, r4, r5)\t\t\t@ Swap r5 and r4 in BE:\n>  ARM_BE8(eor\tr5, r4, r5)\t\t\t@ it can be done in 3 steps\n> @@ -404,22 +402,13 @@ ARM_BE8(eor\tr4, r4, r5)\t\t\t@ without using a temp reg.\n>  ENDPROC(secondary_startup)\n>  ENDPROC(secondary_startup_arm)\n>  \n> -\t/*\n> -\t * r6  = &secondary_data\n> -\t */\n>  ENTRY(__secondary_switched)\n> -\tldr\tsp, [r7, #12]\t\t\t@ get secondary_data.stack\n> +\tldr_l\tr7, secondary_data + 12\t\t@ get secondary_data.stack\n> +\tmov\tsp, r7\n>  \tmov\tfp, #0\n>  \tb\tsecondary_start_kernel\n>  ENDPROC(__secondary_switched)\n>  \n> -\t.align\n> -\n> -\t.type\t__secondary_data, %object\n> -__secondary_data:\n> -\t.long\t.\n> -\t.long\tsecondary_data\n> -\t.long\t__secondary_switched\n>  #endif /* defined(CONFIG_SMP) */\n>  \n>  \n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"S64Wh1pM\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"FrPJ0/9i\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFDy5SJcz9sNr\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:10:26 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotx7-0000ZT-Ir; Mon, 04 Sep 2017 16:10:21 +0000","from mail-io0-x22c.google.com ([2607:f8b0:4001:c06::22c])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dotx4-0007ie-O3 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:10:20 +0000","by mail-io0-x22c.google.com with SMTP id i200so2559835ioa.2\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:09:58 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tx87sm465769ita.38.2017.09.04.09.09.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:09:56 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=AEJ4RGZs9JXNOgzDXVrA4AQnAjmOUF6D0gX4YUXRZJE=;\n\tb=S64Wh1pMb7g2cm\n\trakm51lMdnZTj4mn2vBdgPc3mqt83nsaRSvU4aJhJs8fUHJgO3EKeODq9sBog2VExzGgUzi9bhFW2\n\tEyiAvSjAQB742g+yqEiY6pWthvuWb1wTflnoXFzsfnqCUeTzrftWR0c8/2u6M242gcJXVTTRExN0h\n\tQMU/9H0/jzAQnW8L5vEGqyFEpXHbrZrAxopBN6o/zxfxphbyMP0OKbDKhy+lm1ESmLJtPvegMr+08\n\tE6mSyViHgaMsdvapKbhx87rALzfsAIQ7SriDo0FDLZpzXtd42AEq6Hig+Px44DIID6KFBh40PL+K2\n\tQpZv1YthsZPorIdwkEjg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=dUGbIWG9aE3o9rCvM2614xlkdXAc0UE5LLBgg7lhrO0=;\n\tb=FrPJ0/9igezUSNMeJPGopfPwsUWl7r6rVCuRAs3cjh3r9oO/O4e3ni/hBOhiPtwx28\n\tsmrP26apzeeiSNbVbVV3QZ/TDWenSkcvmBpe83B3aPEtFf9y1CxoevKoK5sdHLSHjDG0\n\tuvHGQpBXMVMr14H2YUrh2K+GVh/3m4zRbAd3c="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=dUGbIWG9aE3o9rCvM2614xlkdXAc0UE5LLBgg7lhrO0=;\n\tb=Ll1bRDlqodTUCjJYjMpcGrhHpwXEYUvH1WWR9B1cn/jrfXKdb2vSTbNVEqMlZ9wQ8c\n\t0gjknzl1WlSwDp2GnFd/SH2q7fP+JFE7O4k3txB19pE6QTwXkQo8gVndrZMu379MCSnl\n\tA/AbSQQYFism358Mi2zDgmz8SBAaFfsrkvsN80/w6J69vMPS/lWvkbdEjUh9IXuywAjH\n\tzFGZqIV8f8dA6WX2KvnmJIewIwk55zZFHvybdHDuYKk9gWjtn4O65d5OM0GGMQ3LwDQL\n\tt9/y5dq8PedYIZZfRjgPae6dNKpE5UxG+/NcLvoCeAbYcM1wz3PIA7ca1ah678d+yEn6\n\tx0qA==","X-Gm-Message-State":"AHPjjUj0Ypbts14lDf1/H4Xb8xPnkeZ57mKe3a/opdiTi6nIUOW33iKe\n\tTyRyxKUyNiPDnL/v","X-Google-Smtp-Source":"ADKCNb78JK4HOKFv6UlokM7XSeuSKFiLpDoThZPzuX+WTK/m4HeQ5IhF81zlhOgSxV7OeOLATb5SDg==","X-Received":"by 10.107.173.18 with SMTP id w18mr1287147ioe.245.1504541397484; \n\tMon, 04 Sep 2017 09:09:57 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:09:55 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 06/29] ARM: head.S: use PC-relative insn sequence for\n\tsecondary_data","In-Reply-To":"<20170903120757.14968-7-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041209470.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-7-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_091018_911650_76CB72CD ","X-CRM114-Status":"GOOD (  16.12  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22c listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762751,"web_url":"http://patchwork.ozlabs.org/comment/1762751/","msgid":"<nycvar.YSQ.7.76.1709041215010.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:15:32","subject":"Re: [PATCH v2 07/29] ARM: kernel: use relative references for UP/SMP\n\talternatives","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> To avoid absolute references that are subject to runtime relocation\n> when running a kernel built with CONFIG_RELOCATABLE=y, use relative\n> references in the smp.alt entries.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/include/asm/assembler.h |  4 ++--\n>  arch/arm/include/asm/processor.h |  2 +-\n>  arch/arm/kernel/head.S           | 10 +++++-----\n>  3 files changed, 8 insertions(+), 8 deletions(-)\n> \n> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h\n> index 341e4ed1ef84..a0906c1fc65d 100644\n> --- a/arch/arm/include/asm/assembler.h\n> +++ b/arch/arm/include/asm/assembler.h\n> @@ -260,7 +260,7 @@\n>   */\n>  #define ALT_UP(instr...)\t\t\t\t\t\\\n>  \t.pushsection \".alt.smp.init\", \"a\"\t\t\t;\\\n> -\t.long\t9998b\t\t\t\t\t\t;\\\n> +\t.long\t9998b - .\t\t\t\t\t;\\\n>  9997:\tinstr\t\t\t\t\t\t\t;\\\n>  \t.if . - 9997b == 2\t\t\t\t\t;\\\n>  \t\tnop\t\t\t\t\t\t;\\\n> @@ -272,7 +272,7 @@\n>  #define ALT_UP_B(label)\t\t\t\t\t\\\n>  \t.equ\tup_b_offset, label - 9998b\t\t\t;\\\n>  \t.pushsection \".alt.smp.init\", \"a\"\t\t\t;\\\n> -\t.long\t9998b\t\t\t\t\t\t;\\\n> +\t.long\t9998b - .\t\t\t\t\t;\\\n>  \tW(b)\t. + up_b_offset\t\t\t\t\t;\\\n>  \t.popsection\n>  #else\n> diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h\n> index c3d5fc124a05..3667b395bb17 100644\n> --- a/arch/arm/include/asm/processor.h\n> +++ b/arch/arm/include/asm/processor.h\n> @@ -92,7 +92,7 @@ unsigned long get_wchan(struct task_struct *p);\n>  #define __ALT_SMP_ASM(smp, up)\t\t\t\t\t\t\\\n>  \t\"9998:\t\" smp \"\\n\"\t\t\t\t\t\t\\\n>  \t\"\t.pushsection \\\".alt.smp.init\\\", \\\"a\\\"\\n\"\t\t\\\n> -\t\"\t.long\t9998b\\n\"\t\t\t\t\t\\\n> +\t\"\t.long\t9998b - .\\n\"\t\t\t\t\t\\\n>  \t\"\t\" up \"\\n\"\t\t\t\t\t\t\\\n>  \t\"\t.popsection\\n\"\n>  #else\n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index 6e9df3663a57..ec22f42fd8bb 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -548,14 +548,15 @@ smp_on_up:\n>  __do_fixup_smp_on_up:\n>  \tcmp\tr4, r5\n>  \treths\tlr\n> -\tldmia\tr4!, {r0, r6}\n> - ARM(\tstr\tr6, [r0, r3]\t)\n> - THUMB(\tadd\tr0, r0, r3\t)\n> +\tldmia\tr4, {r0, r6}\n> + ARM(\tstr\tr6, [r0, r4]\t)\n> + THUMB(\tadd\tr0, r0, r4\t)\n> +\tadd\tr4, r4, #8\n>  #ifdef __ARMEB__\n>   THUMB(\tmov\tr6, r6, ror #16\t)\t@ Convert word order for big-endian.\n>  #endif\n>   THUMB(\tstrh\tr6, [r0], #2\t)\t@ For Thumb-2, store as two halfwords\n> - THUMB(\tmov\tr6, r6, lsr #16\t)\t@ to be robust against misaligned r3.\n> + THUMB(\tmov\tr6, r6, lsr #16\t)\t@ to be robust against misaligned r0.\n>   THUMB(\tstrh\tr6, [r0]\t)\n>  \tb\t__do_fixup_smp_on_up\n>  ENDPROC(__do_fixup_smp_on_up)\n> @@ -564,7 +565,6 @@ ENTRY(fixup_smp)\n>  \tstmfd\tsp!, {r4 - r6, lr}\n>  \tmov\tr4, r0\n>  \tadd\tr5, r0, r1\n> -\tmov\tr3, #0\n>  \tbl\t__do_fixup_smp_on_up\n>  \tldmfd\tsp!, {r4 - r6, pc}\n>  ENDPROC(fixup_smp)\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"YuB8tI+T\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"LdB5Jqog\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFMR2V73z9t2W\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:16:03 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou2a-0003iF-Fd; Mon, 04 Sep 2017 16:16:00 +0000","from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou2V-0003f2-Bc for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:15:57 +0000","by mail-io0-x232.google.com with SMTP id 62so2559028iok.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:15:34 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tb126sm3597897ioe.68.2017.09.04.09.15.32\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:15:33 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=iN7LZQk3AOxkRVqM8CG1XhX2K+yN8Mdb9KodFPjfaZQ=;\n\tb=YuB8tI+TgZeUsp\n\tc4hbBCUKfebrVcFIisp7MndqrqC4/fW0sRD7g0ujVmOqiUUAvRI15CzYZtpheIPM66/DIYGMo7A7i\n\th5EKbwqmpvAgMpxxHkP3Jt8/Hqq0LQccwt2AixJlfm1vEYX/jRA2eA5Ah8hxb7faS/gxxboiGKOfL\n\tF5VImWQFeAF7vcsc0CaFk/e8tIh6H4RyYiY+5clbuweihaW6MButlwG7OhR+VJD5x/RmgQFNKMWM0\n\t7EFt21WojYhRm8UxzF+wX80NtZSpaUzfAWUCeYRN00JHi0XIucrqa9KIdSD9Ug3q/25+8l/8CI02B\n\t2MVWa/Q3ho1vJsbJ6C9A==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=i0X3xDkPl46fvR2LEXB/2n4nBbswcVsWi36hlKsuhgg=;\n\tb=LdB5Jqog5dVJ25M5HSMHgHSDUCa4eO59C4BM+9GkbvammNbFoNt7zP00G1Nz26Ccc/\n\tLyu03xNDUF6f4fPwOdvfF9WTiYINtdLjn1uxegkXBcnyZNjhoGVAulDzkZLqubHWlsaz\n\tYAasATynnYdBQ1lDSTJnggxGlhtUpL+1fT2OY="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=i0X3xDkPl46fvR2LEXB/2n4nBbswcVsWi36hlKsuhgg=;\n\tb=fsCthlo+ENtCcgLVQSJ+dHBpUdKtP+pf4vaecwhYKHiVRTsIiX/cmYNU5Xm4IhJdG5\n\tIrfQIpwBU//K5vgB0W1ZDtE+xs6sTg+rv+zbaYxtGgPIfN8tA3l0cVoCVhSo6wDiyi7K\n\tyTBeCCZlwIFaw1cqPiwcot3M/krhC1215CCGXgGY4+gfvhR+YguRT/vf7bQsrLJ0AukD\n\t8BlY7rv8ebDqwm8DRLj1q2yw8g9gmowB+hjezDVNcC8cnhZm+818KwLIm+mJ5IqRU2f5\n\ts3dqRryeCKOomkWTxip5Y6HbTJQ4jjoX7OhF2Jk2OZy1IKIefiyzzh1P94mEb8gWPigo\n\tC/XQ==","X-Gm-Message-State":"AHPjjUhg43nGt1/yiYapu2OQcJq+Ly4uXgsWNPicBBn4R74J/bPRjjI+\n\tKJvZ4wWSvGBuYIk2T/3diw==","X-Google-Smtp-Source":"ADKCNb4eRb4gldDdrH3rRoL7VQ6O/TjGyb5ovkpPq7gm2GX4Lwi/OwMXWT3HDhK0gruJKh3ppTRqbg==","X-Received":"by 10.107.140.7 with SMTP id o7mr1106590iod.288.1504541734149;\n\tMon, 04 Sep 2017 09:15:34 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:15:32 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 07/29] ARM: kernel: use relative references for UP/SMP\n\talternatives","In-Reply-To":"<20170903120757.14968-8-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041215010.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-8-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_091555_455329_DD350121 ","X-CRM114-Status":"GOOD (  14.45  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:232 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762755,"web_url":"http://patchwork.ozlabs.org/comment/1762755/","msgid":"<nycvar.YSQ.7.76.1709041215450.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:19:10","subject":"Re: [PATCH v2 08/29] ARM: head: use PC-relative insn sequence for\n\t__smp_alt","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations with a pair\n> of adr_l invocations. This ensures these quantities are invariant\n> under runtime relocation.\n\nYou probably should add that this patch must be applied on top of \"ARM: \nkernel: use relative references for UP/SMP alternatives\" because of the \nexpected r3 value prior to that patch.\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/kernel/head.S | 12 ++----------\n>  1 file changed, 2 insertions(+), 10 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index ec22f42fd8bb..db6b823f20a4 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -523,19 +523,11 @@ ARM_BE8(rev\tr0, r0)\t\t\t@ byteswap if big endian\n>  \tretne\tlr\n>  \n>  __fixup_smp_on_up:\n> -\tadr\tr0, 1f\n> -\tldmia\tr0, {r3 - r5}\n> -\tsub\tr3, r0, r3\n> -\tadd\tr4, r4, r3\n> -\tadd\tr5, r5, r3\n> +\tadr_l\tr4, __smpalt_begin\n> +\tadr_l\tr5, __smpalt_end\n>  \tb\t__do_fixup_smp_on_up\n>  ENDPROC(__fixup_smp)\n>  \n> -\t.align\n> -1:\t.word\t.\n> -\t.word\t__smpalt_begin\n> -\t.word\t__smpalt_end\n> -\n>  \t.pushsection .data\n>  \t.globl\tsmp_on_up\n>  smp_on_up:\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"ZFth6yV3\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"jjG6jCXI\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFRb5429z9t2W\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:19:39 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou64-0004Vm-El; Mon, 04 Sep 2017 16:19:36 +0000","from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou61-0004TA-4h for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:19:34 +0000","by mail-io0-x231.google.com with SMTP id q64so2603849iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:19:12 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tn19sm2151527ioe.34.2017.09.04.09.19.10\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:19:11 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=M5kqAcwNO0zzGDo3zie6wfobMqkGclsjGKiYruZJmbM=;\n\tb=ZFth6yV3s3Y+Lq\n\tR3WA/4YBrX2Gtr75m9WfkcK3UUSfMR333xCoXhV8e9WR5NWPNs/8o/r3zrvtE434KsL3cd5BoubtP\n\tiY8TcUPb2KoG2QlNGemuoMtu9whmaaLkwEi3jFDnoIUDDKwNX+nROX+eSlaRv4b3CgyeByt/LJFUz\n\t6BR+iCNWEWYVChPEYfHQvQB292y0HgU+UdyfXprKTgUGqjHDt2v78gwm7zt7wwohQd9tOe4+SF+gY\n\tq7pHFizDSeUYasFnSXfRaS/jhEFa+A3ZvaW44I83aASHxpA/hDkLFt38xPQc5q1F9rYgYPeSUpco4\n\ta9VDzGj0iV9YGPmosDbw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=1Yy0bKnMvAIb4AIOKAAkrn8vhfP0rJGxuA1+eRcMvqU=;\n\tb=jjG6jCXImimSjBE6Mr4hp4d2OO6+64E5HyUf9txoEm+unYsp36v83kr8JdDkR3XBPE\n\tS34qUBca5PlaaGQdD+vl+EV+bh/XHG4jkhGHpL4oLEIJu5WJPyv04ekR9JezxRBGnXrK\n\tJYmN30STuthPX5NwvVaOjBgDPCE7OV1qJ9S2o="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=1Yy0bKnMvAIb4AIOKAAkrn8vhfP0rJGxuA1+eRcMvqU=;\n\tb=Vb1EYenVGNWLr1hLlTItNGt54teV7PnKD0FXgSnEKEwVyNv/uVhqXDgKeboJprFOsR\n\tkQhxb2dr8zjrSTnhgmoPgeNTGFARALI4uIjDnPpg54Qmk/e3asN1ae2XPtKff6WjNXQy\n\tfNs9mmIjQX5RoFiy9r73bieH+5Q75MvvlghlEzs43EqlPVlnxDmsl88Kl6kxRpgjh7rs\n\tWqFT4dbwTLQVxxVcDsDIixw2/dEIrTacMHI2HXRNnt5hEManPobPX9Rdb0RIyQgdU5Jd\n\tfpyRPEQkon1VM09y3qMb0F8vslcm1ZI144X7vhrXfVMNH48Du+gb38hParxSa8nSOpbI\n\ts0PQ==","X-Gm-Message-State":"AHPjjUiMpf3ulUZDSOihCve0V027F4EVF4zw09OOvl0H0Oa4eIpsEzku\n\t/N3JWN7t8P7HHbFe","X-Google-Smtp-Source":"ADKCNb7lDJyQZem/vJiJ9fbbFhGjahi1SsALCmClsle+LJQTK7b6R8qjN8vC+AzEMSqaqeFEBi+nIg==","X-Received":"by 10.36.106.136 with SMTP id l130mr1382238itc.170.1504541952293;\n\tMon, 04 Sep 2017 09:19:12 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:19:10 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 08/29] ARM: head: use PC-relative insn sequence for\n\t__smp_alt","In-Reply-To":"<20170903120757.14968-9-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041215450.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-9-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_091933_272156_3BF7F7F5 ","X-CRM114-Status":"GOOD (  14.60  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762758,"web_url":"http://patchwork.ozlabs.org/comment/1762758/","msgid":"<CAKv+Gu9=kZr9xf7x3wj3XArrVESMT5jz3CixG-3_1+JYGqmqmQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T16:20:21","subject":"Re: [PATCH v2 08/29] ARM: head: use PC-relative insn sequence for\n\t__smp_alt","submitter":{"id":26857,"url":"http://patchwork.ozlabs.org/api/people/26857/","name":"Ard Biesheuvel","email":"ard.biesheuvel@linaro.org"},"content":"On 4 September 2017 at 17:19, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:\n> On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n>\n>> Replace the open coded PC relative offset calculations with a pair\n>> of adr_l invocations. This ensures these quantities are invariant\n>> under runtime relocation.\n>\n> You probably should add that this patch must be applied on top of \"ARM:\n> kernel: use relative references for UP/SMP alternatives\" because of the\n> expected r3 value prior to that patch.\n>\n> Acked-by: Nicolas Pitre <nico@linaro.org>\n>\n\nYes, that is why I needed to reorder them. I will add a mention to the\ncommit log.\n\nThanks,","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"jEKnk6Mf\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Maf/XU65\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFT42Llyz9t2W\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:20:56 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou7I-0006LY-Im; Mon, 04 Sep 2017 16:20:52 +0000","from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou7D-00066D-2H for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:20:49 +0000","by mail-io0-x22b.google.com with SMTP id q64so2618538iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:20:23 -0700 (PDT)","by 10.107.162.1 with HTTP; Mon, 4 Sep 2017 09:20:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=cS53Anp85MM/eakZmWB7EvUG9d6UZrpYJNvB8CtVx7E=;\n\tb=jEKnk6MfJ0uy9D\n\tkdjJUScjMnI1TRVs6UUMT77kyDNYB8+ZXNCwlTD744bEs+poFQRcnAqIodv9soEDdKNgJQGldQ6eq\n\tiq2CqkvJVqYzZm563EEbZqfZBnC7hvpFm+FO/DPO1aS5UyMdJT48gyi2QCntnpFuKqLApyWTlyMLB\n\tXIZ9669Jylfn52hfx3unnWuQb56qOW/ft0egEP08I+sQk2bfHVl2hw+0zmfHSoiHwZ77XxOtqmIqP\n\tprc8dozw3sUXI38XHiLX5nztCVIpXHSe9dLlnMakvYreXldALI9pMArgqGRfqFEYdjHhxsOm7Q8YU\n\t7iCOG4fFNmd3LjCiidQw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=L8qG3uakkJShUNkF2zJ7xX/WfYXYereZBMiu9BCZ02I=;\n\tb=Maf/XU65RW6yi/uwQGJxsOGACX3QrzdLtl7teFM+ftxoqeahhUk6O+/FOzmr1QRwvN\n\tcYC/ySAax7gRYf1VQnjjJE5v5TEtAlbRsf+KDJbowzKwtKETB2dwhcFrqFLPV58BmtPA\n\tw7fb7ciduF5zb/3lLEeHUz59vySDZ1x5PF/pA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=L8qG3uakkJShUNkF2zJ7xX/WfYXYereZBMiu9BCZ02I=;\n\tb=S4+zERcamfSxmPaDUC4lx5bWzeHzuUvrzBLXKiVVDRVANpVmzjCk0Ym1o2naimqbXh\n\tWzyXFQqSutlFnHCJCixee5MQ/qEDOmoGlKw0lY3zwryJ7OhpHK14wB2kBPykjUUCXKet\n\tHOMT9+7x/BTGxFZrNff5VWp3TWPyJP/Jk/Sa/E6hc0mqD0c618zNYFS0sRwy0Ra9tQGN\n\tLfTYBUBkvoDFdtc2W7gtXwl+Kmo+WlPx8nJ82yVSnoGdzzZt+8CxUdGYNOpXHNRHnVYd\n\tp488xc0oaVoxTNwLcf/XMIbS8BXyypvLMzxwsteFZw0/NcawkpW4KSpmxsnWsub+bPom\n\tVyyQ==","X-Gm-Message-State":"AHPjjUjWPICi7DUMW3YlCSRb5WG9LKfET+En8rMGbcNchBCu2/c8dbso\n\tZ5xlUUiaSkcG2lEt2u/uAqwz3oPKjx+v","X-Google-Smtp-Source":"ADKCNb4f7AfE1N+6dljKYykb/W7tmUhMU0Bzu22yvntFoJUiGClhePWXNOHGZaHu3+3gbMampt22lPAIPVq6YjKchYY=","X-Received":"by 10.36.8.138 with SMTP id 132mr1319232itc.162.1504542022715;\n\tMon, 04 Sep 2017 09:20:22 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<nycvar.YSQ.7.76.1709041215450.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-9-ard.biesheuvel@linaro.org>\n\t<nycvar.YSQ.7.76.1709041215450.8603@knanqh.ubzr>","From":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Date":"Mon, 4 Sep 2017 17:20:21 +0100","Message-ID":"<CAKv+Gu9=kZr9xf7x3wj3XArrVESMT5jz3CixG-3_1+JYGqmqmQ@mail.gmail.com>","Subject":"Re: [PATCH v2 08/29] ARM: head: use PC-relative insn sequence for\n\t__smp_alt","To":"Nicolas Pitre <nicolas.pitre@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_092047_262825_6402474D ","X-CRM114-Status":"GOOD (  10.69  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22b listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>,\n\tKernel Hardening <kernel-hardening@lists.openwall.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762759,"web_url":"http://patchwork.ozlabs.org/comment/1762759/","msgid":"<nycvar.YSQ.7.76.1709041219510.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:20:47","subject":"Re: [PATCH v2 09/29] ARM: sleep.S: use PC-relative insn sequence\n\tfor sleep_save_sp/mpidr_hash","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations with adr_l and\n> ldr_l invocations. Note that ALT_SMP() expects a single instruction\n> so move the macro invocation after it.\n> \n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/kernel/sleep.S | 19 +++++--------------\n>  1 file changed, 5 insertions(+), 14 deletions(-)\n> \n> diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S\n> index 0f6c1000582c..f4920b5d0fc4 100644\n> --- a/arch/arm/kernel/sleep.S\n> +++ b/arch/arm/kernel/sleep.S\n> @@ -71,8 +71,9 @@ ENTRY(__cpu_suspend)\n>  \tldr\tr3, =sleep_save_sp\n>  \tstmfd\tsp!, {r0, r1}\t\t@ save suspend func arg and pointer\n>  \tldr\tr3, [r3, #SLEEP_SAVE_SP_VIRT]\n> -\tALT_SMP(ldr r0, =mpidr_hash)\n> +\tALT_SMP(W(nop))\t\t\t@ don't use adr_l inside ALT_SMP()\n>  \tALT_UP_B(1f)\n> +\tadr_l\tr0, mpidr_hash\n>  \t/* This ldmia relies on the memory layout of the mpidr_hash struct */\n>  \tldmia\tr0, {r1, r6-r8}\t@ r1 = mpidr mask (r6,r7,r8) = l[0,1,2] shifts\n>  \tcompute_mpidr_hash\tr0, r6, r7, r8, r2, r1\n> @@ -137,9 +138,8 @@ ARM_BE8(setend be)\t\t\t@ ensure we are in BE mode\n>  \tmov\tr1, #0\n>  \tALT_SMP(mrc p15, 0, r0, c0, c0, 5)\n>  \tALT_UP_B(1f)\n> -\tadr\tr2, mpidr_hash_ptr\n> -\tldr\tr3, [r2]\n> -\tadd\tr2, r2, r3\t\t@ r2 = struct mpidr_hash phys address\n> +\tadr_l\tr2, mpidr_hash\t\t@ r2 = struct mpidr_hash phys address\n> +\n>  \t/*\n>  \t * This ldmia relies on the memory layout of the mpidr_hash\n>  \t * struct mpidr_hash.\n> @@ -147,10 +147,7 @@ ARM_BE8(setend be)\t\t\t@ ensure we are in BE mode\n>  \tldmia\tr2, { r3-r6 }\t@ r3 = mpidr mask (r4,r5,r6) = l[0,1,2] shifts\n>  \tcompute_mpidr_hash\tr1, r4, r5, r6, r0, r3\n>  1:\n> -\tadr\tr0, _sleep_save_sp\n> -\tldr\tr2, [r0]\n> -\tadd\tr0, r0, r2\n> -\tldr\tr0, [r0, #SLEEP_SAVE_SP_PHYS]\n> +\tldr_l\tr0, sleep_save_sp + SLEEP_SAVE_SP_PHYS\n>  \tldr\tr0, [r0, r1, lsl #2]\n>  \n>  \t@ load phys pgd, stack, resume fn\n> @@ -164,12 +161,6 @@ ENDPROC(cpu_resume)\n>  ENDPROC(cpu_resume_arm)\n>  #endif\n>  \n> -\t.align 2\n> -_sleep_save_sp:\n> -\t.long\tsleep_save_sp - .\n> -mpidr_hash_ptr:\n> -\t.long\tmpidr_hash - .\t\t\t@ mpidr_hash struct offset\n> -\n>  \t.data\n>  \t.type\tsleep_save_sp, #object\n>  ENTRY(sleep_save_sp)\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"LtIYaUKz\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"GGa8v+dF\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmFTb6QnJz9s4s\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:21:23 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou7j-0006dl-IL; Mon, 04 Sep 2017 16:21:19 +0000","from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dou7a-0006Ky-3J for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:21:15 +0000","by mail-io0-x22e.google.com with SMTP id q64so2623982iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:20:49 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\ty39sm1961002ioi.82.2017.09.04.09.20.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:20:48 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=eiE45ZhSePa5Epzf93LoNzCZOMRmXhTRUDebEWDlSdM=;\n\tb=LtIYaUKzNkBt9N\n\tBoNw5hO4KtyiYMWWEVtFkKTzK8VvkWi7wJpp2w5DTkgji5pdPqqTXEA7IPtAvYjKSp6P9j+oLhx1Y\n\tn7Lz68TfMSXOfZPwqCUH7LsKbUzrBq34kV2c4cO/CZCKQnqjvCex4i/FtM8IqIVc0zpozb8oE/Taf\n\tWw7cddODCciUcgXo5ukFwyIFFz2fUxSOEo1apMTuLNeJu5/Vn0TiWzXhDw/4JfSoom6IDTxU2ZaYa\n\tNHrNg5SlaAPoAPCZkNqzS1+o6HF7GLgpjeM5aw0N7Q6HToffOdUmMXig0atjgogZPgSyGXcZf0N5R\n\tR3FCmFMvO373iHWfSI2g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=oeYl1s2r40sBT0XYhaHC8VmrUKpoGOoD5SKdiyx/QkY=;\n\tb=GGa8v+dFXCD17SmWy8QUGOOFB73IgkWb/Jon3tBAMJuNVhZZk8bVgvYKnypY1RHPtW\n\tp6cgmuXQ0Vfi9Ujp0JEvN8dMlC2hWKBo3e5puGV2N7DnkQXNTgClaMg7B0hFA2IjkrhS\n\tacB8Ca9DxOLx4VzutNpBc6rlZgADVr9Sox5vI="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=oeYl1s2r40sBT0XYhaHC8VmrUKpoGOoD5SKdiyx/QkY=;\n\tb=CRDTBIoROFN3gphOUR6jO9yX+GfSLWVrMryrILdeHTgy0PygWPJ0IqV4nNesEBB7Q6\n\tqIAMrhkyJ8/yRUgqvqq86TXChjgQpReuZeyImap2YGIXrbh9xhwncI7M8kLmbLh/C0aa\n\tGWrp8lsoirTTB1d4X8rMKke/sGac+ScfnxMcNhnes/RuYtF02gqUy3ZrKF/Nt80Q5toW\n\t9kp2AyYt7s6944C539B4C6oUafZUGh/V4hRsPlQsa8eihnOZ/iFjblWAsTytUbOxBBTo\n\t0IC8eCzwxtfQyn0j9yR9eplSuRPtKy2XGym/BTpQRtafPGRrSykl8fMdo0blwjQ2eTiC\n\t3hvw==","X-Gm-Message-State":"AHPjjUg1N3hj43fgj+VoXPnxYQ2kYXaNbi9c0/Mj5DN2Cg6IeocwEUNS\n\tM9At/tVL7JajfMJ6","X-Google-Smtp-Source":"ADKCNb7Zr5YSmKOxpCwDWR5fhTEAzwG9Df7Le3uJXzjQgsRviOeTzrZ0AugxRDSkR1naPpp5tx38sg==","X-Received":"by 10.107.166.2 with SMTP id p2mr1189627ioe.63.1504542049101;\n\tMon, 04 Sep 2017 09:20:49 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:20:47 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 09/29] ARM: sleep.S: use PC-relative insn sequence\n\tfor sleep_save_sp/mpidr_hash","In-Reply-To":"<20170903120757.14968-10-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041219510.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-10-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_092110_584313_2F23D181 ","X-CRM114-Status":"GOOD (  16.46  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762780,"web_url":"http://patchwork.ozlabs.org/comment/1762780/","msgid":"<nycvar.YSQ.7.76.1709041246410.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:47:16","subject":"Re: [PATCH v2 10/29] ARM: head.S: use PC-relative insn sequences\n\tfor __fixup_pv_table","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded PC relative offset calculations with adr_l\n> and mov_l invocations. This ensures these quantities are invariant\n> under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n\n> ---\n>  arch/arm/kernel/head.S | 27 ++++++--------------\n>  1 file changed, 8 insertions(+), 19 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index db6b823f20a4..f607e290ef4b 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -578,14 +578,11 @@ ENDPROC(fixup_smp)\n>   */\n>  \t__HEAD\n>  __fixup_pv_table:\n> -\tadr\tr0, 1f\n> -\tldmia\tr0, {r3-r7}\n> +\tadr_l\tr6, __pv_phys_pfn_offset\n> +\tadr_l\tr7, __pv_offset\t\t\t@ __pa(__pv_offset)\n> +\tmov_l\tr3, __pv_offset\t\t\t@ __va(__pv_offset)\n>  \tmvn\tip, #0\n> -\tsubs\tr3, r0, r3\t@ PHYS_OFFSET - PAGE_OFFSET\n> -\tadd\tr4, r4, r3\t@ adjust table start address\n> -\tadd\tr5, r5, r3\t@ adjust table end address\n> -\tadd\tr6, r6, r3\t@ adjust __pv_phys_pfn_offset address\n> -\tadd\tr7, r7, r3\t@ adjust __pv_offset address\n> +\tsubs\tr3, r7, r3\t@ PHYS_OFFSET - PAGE_OFFSET\n>  \tmov\tr0, r8, lsr #PAGE_SHIFT\t@ convert to PFN\n>  \tstr\tr0, [r6]\t@ save computed PHYS_OFFSET to __pv_phys_pfn_offset\n>  \tstrcc\tip, [r7, #HIGH_OFFSET]\t@ save to __pv_offset high bits\n> @@ -594,20 +591,15 @@ __fixup_pv_table:\n>  THUMB(\tit\tne\t\t@ cross section branch )\n>  \tbne\t__error\n>  \tstr\tr3, [r7, #LOW_OFFSET]\t@ save to __pv_offset low bits\n> +\tadr_l\tr4, __pv_table_begin\n> +\tadr_l\tr5, __pv_table_end\n>  \tb\t__fixup_a_pv_table\n>  ENDPROC(__fixup_pv_table)\n> -\n> -\t.align\n> -1:\t.long\t.\n> -\t.long\t__pv_table_begin\n> -\t.long\t__pv_table_end\n> -2:\t.long\t__pv_phys_pfn_offset\n> -\t.long\t__pv_offset\n> +\t.ltorg\n>  \n>  \t.text\n>  __fixup_a_pv_table:\n> -\tadr\tr0, 3f\n> -\tldr\tr6, [r0]\n> +\tmov_l\tr6, __pv_offset\n>  \tadd\tr6, r6, r3\n>  \tldr\tr0, [r6, #HIGH_OFFSET]\t@ pv_offset high word\n>  \tldr\tr6, [r6, #LOW_OFFSET]\t@ pv_offset low word\n> @@ -676,9 +668,6 @@ ARM_BE8(rev16\tip, ip)\n>  #endif\n>  ENDPROC(__fixup_a_pv_table)\n>  \n> -\t.align\n> -3:\t.long __pv_offset\n> -\n>  ENTRY(fixup_pv_table)\n>  \tstmfd\tsp!, {r4 - r7, lr}\n>  \tmov\tr3, #0\t\t\t@ no offset\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"iy8bXkC3\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"JcJpgMYr\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmG415Fb8z9sR9\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:47:45 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douXG-0002RO-9A; Mon, 04 Sep 2017 16:47:42 +0000","from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douXC-0002Pg-Th for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:47:40 +0000","by mail-io0-x22a.google.com with SMTP id y123so3007222iod.0\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:47:18 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tg75sm3104074ita.4.2017.09.04.09.47.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:47:17 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=8+JrYxJfF5NbFNe9CrSuie27CMRxhUNdwICTkc7NTkQ=;\n\tb=iy8bXkC3iVFGrU\n\tFoFEIdQuA6ZOKJSaSVNYl0J1Zf7i9w/CD8+nCNFFk0VVFgvtDZTJQm3xZUhdH0LnbOiNiJnlFe+Wz\n\taExeavj2kzKMeuVvDRtyatt1rPS7fAk5aiA6x+p4/Gid31r7SnHfX+pHk4S8XZvVnhi3OY4LO+qHV\n\tuBQH8wvk6sYn2Ry51ERD9o4jO4STJVuVcThS0/cr4HemdAX+r2NzBHWmEhnXnO/wHNWR5nx3LOwFY\n\tg/73/oLUarkjJR/dC6wW00rsnz1q524XiGxG9S69JorDHc/VJlgiTSdp5Wsv9Cu94gE3tzAHgsg6Z\n\tTByJIxhGHdPMXUmJs3NQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=JLtBYMgphS7Voa6xDYjjrpEfx0zGuYuIwtHHMgD1aao=;\n\tb=JcJpgMYrTCl946egoZb1XThb7JX/JaaJw71MVzWAlG++B2VKGdpzjRZUT7Wkyd0vXT\n\tSt5OLDmVuafxmmPg2URxNFQxab480TX6YJOJrhx3FFaWFNoGLhEjWMI/xvKXfJp7C4zh\n\twE2JuRJg/5IMptkZoTJDqutKNGqWu1DnBTL7I="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=JLtBYMgphS7Voa6xDYjjrpEfx0zGuYuIwtHHMgD1aao=;\n\tb=sSQvq4G+L77MRF25gJOpet/5DT/QvJiSNGU7U3dsnBUgY28BfjA5SuIeWaPo9zPqcI\n\tA3N2nOYWpPLwOH8WST9xicNGWQhnkjajk9xsQLSR1IIidZNmliZgezynGhQTNhSubk0E\n\t9v18ldVxDRu+tznCm+ZZepF3Fw75ut08SVEAYdbHpGT1+RvTraKtPyl54N1SkLcW31F2\n\tVjnx9f6aGVkXt0Gdh0I2N2nnVjm8bU66r/v7LP7b/3jdN1NBg5UShC5CGxgfxr8VKxsb\n\tQHT4ZfX+c1fbECXjpWq4eizqkrqaGZeXgEdma7DtWa+njc5cUQIRjDUQfqDxBTOGpuUM\n\tgknw==","X-Gm-Message-State":"AHPjjUhKO1ZICxGbG1RstBS+U3NWqcS4Ko985pXmlOQznPeEOGGdlyV6\n\tYuVaX4RcpDS/nQFF","X-Google-Smtp-Source":"ADKCNb4VhMmshn8mgShgZm1row3rObPP1yD3NGfVCEHaprPWLL/Hv+L98iRrz4MBrXR+4GdCvUNxeQ==","X-Received":"by 10.107.155.211 with SMTP id d202mr1274414ioe.57.1504543638232;\n\tMon, 04 Sep 2017 09:47:18 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:47:16 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 10/29] ARM: head.S: use PC-relative insn sequences\n\tfor __fixup_pv_table","In-Reply-To":"<20170903120757.14968-11-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041246410.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-11-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_094739_124117_08A01D23 ","X-CRM114-Status":"GOOD (  13.88  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22a listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762782,"web_url":"http://patchwork.ozlabs.org/comment/1762782/","msgid":"<nycvar.YSQ.7.76.1709041248400.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:50:32","subject":"Re: [PATCH v2 11/29] ARM: head.S: use PC relative insn sequence to\n\tcalculate PHYS_OFFSET","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded arithmetic with a simple adr_l/sub pair. This\n> ensures these quantities are invariant under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nOf course there won't be anything to relocate in a XIP kernel. But \nconsistency is good and this looks nicer.\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/kernel/head.S | 10 ++--------\n>  1 file changed, 2 insertions(+), 8 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index f607e290ef4b..62c961849035 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -106,10 +106,8 @@ ENTRY(stext)\n>  #endif\n>  \n>  #ifndef CONFIG_XIP_KERNEL\n> -\tadr\tr3, 2f\n> -\tldmia\tr3, {r4, r8}\n> -\tsub\tr4, r3, r4\t\t\t@ (PHYS_OFFSET - PAGE_OFFSET)\n> -\tadd\tr8, r8, r4\t\t\t@ PHYS_OFFSET\n> +\tadr_l\tr8, _text\t\t\t@ __pa(_text)\n> +\tsub\tr8, r8, #TEXT_OFFSET\t\t@ PHYS_OFFSET\n>  #else\n>  \tldr\tr8, =PLAT_PHYS_OFFSET\t\t@ always constant in this case\n>  #endif\n> @@ -161,10 +159,6 @@ ENTRY(stext)\n>  1:\tb\t__enable_mmu\n>  ENDPROC(stext)\n>  \t.ltorg\n> -#ifndef CONFIG_XIP_KERNEL\n> -2:\t.long\t.\n> -\t.long\tPAGE_OFFSET\n> -#endif\n>  \n>  /*\n>   * Setup the initial page tables.  We only setup the barest\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"C7dk0LFa\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"TTW9uHXc\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmG7n5g1mz9sR9\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:51:01 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douaQ-0004Qy-Rv; Mon, 04 Sep 2017 16:50:58 +0000","from mail-io0-x22a.google.com ([2607:f8b0:4001:c06::22a])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douaN-0004PG-Ei for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:50:57 +0000","by mail-io0-x22a.google.com with SMTP id z67so3014918iof.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:50:35 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\th193sm498606ita.39.2017.09.04.09.50.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:50:34 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=nuqSLp+x2XoMXFpcma6/ZLO9pz45nZoUvvmvQuwBsNM=;\n\tb=C7dk0LFaNFTmOw\n\tKJM2Y6Xqaqz1oFKK6mfvTjW/qHVDNrW1Jv6xVMlXh409MzMfDwbl+L6n4VrAFfaYMY+HlrzNESAU7\n\tIUcuoh29k7zol8yzR/o4tRH6DUC7ZntoynVnfYc7nJjBTmrzdU7wvsjmsosw8cnKUS7osbplMRHlJ\n\tg1aNX8rjrqZFJO74EXpZoRlovy2qpkBHTFpHNYn03SfeOD8zIu9nKmIe/HgBd99ramEIyCb9z/gmR\n\t2AQpBH0L7NA5FajeH1W5wZlSOwj3e7wkm66vr/1307YD7Drrj/PcKS+t00rcgOj4jB0jZFrb7QOJF\n\tQw+gw5QIRJYT6Sdb8PJw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=9UH63fhZu5X0A0uOVrhuXpjEw/mPBKtW3MoRttzZkSo=;\n\tb=TTW9uHXcGfJDLHAIHy9TJwJUg6am9pQUKDnl+ytaq3qOpxz7Np8/wzr6pnlV/QaFoq\n\t7RKaiohG11EHdlb77RSfoRW9dmKlUOhoicO9bRndPIWlyOu2T+nuplrH2HBHRZBjKU//\n\tpjZz5GzrLhXeuu5Ey1G7BbaFHJXRKM9DGimnk="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=9UH63fhZu5X0A0uOVrhuXpjEw/mPBKtW3MoRttzZkSo=;\n\tb=BW1gk0pS+J5drdy53AuZXlQy817phUwq2S5GRo/Z6De6s/8eriBne4b9vMKf5joheC\n\t+/PWWIk+a8P2Nv6s9MkR7kh8WcLv7KTuC9bpbdahTc04NdvuJVXUQOmGD3Bn4VJrwxN4\n\tv+SLzZOsuCMeYFv5SuV+D08dmSOujFJC0Bj5wGQhpWtAikfQZ9dnj8agST9f6g6Vrs3B\n\t/aQzkiwhnhfm6EDovixzM3Zffid6sBrtfEzVie5sEbNoykJfdSpQRKR/tMl4WvlkPtae\n\tU9e7ikXfhIO9bd3aJgG8Jq2C/1wTOyOVhnLtyyXV1Vgq7gkcvTr7AjaB9pIzFt0dEb4D\n\ta1MQ==","X-Gm-Message-State":"AHPjjUgdFfkVcpU9JIeqsuy9lIkMEUjTPF8gKnP77VjbntoIdMUGBwcx\n\tolo5DLbJqCOLWP3x","X-Google-Smtp-Source":"ADKCNb59dWsDlLoH+LAp+KaA6ES43xgT5p9JqCNDwNMgIFPnbNkjSdEKmQfE2I2MM9WzImNGhiHheQ==","X-Received":"by 10.107.128.198 with SMTP id k67mr1226330ioi.184.1504543834853;\n\tMon, 04 Sep 2017 09:50:34 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:50:32 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 11/29] ARM: head.S: use PC relative insn sequence to\n\tcalculate PHYS_OFFSET","In-Reply-To":"<20170903120757.14968-12-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041248400.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-12-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_095055_541087_0A54A169 ","X-CRM114-Status":"GOOD (  15.34  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22a listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762785,"web_url":"http://patchwork.ozlabs.org/comment/1762785/","msgid":"<nycvar.YSQ.7.76.1709041257010.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:57:23","subject":"Re: [PATCH v2 12/29] ARM: kvm: replace open coded VA->PA\n\tcalculations with adr_l call","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the open coded calculations of the actual physical address\n> of the KVM stub vector table with a single adr_l invocation.\n> \n> Cc: Marc Zyngier <marc.zyngier@arm.com>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/boot/compressed/head.S | 15 ++-------\n>  arch/arm/kernel/hyp-stub.S      | 33 +++++++-------------\n>  arch/arm/kvm/init.S             |  8 +----\n>  3 files changed, 15 insertions(+), 41 deletions(-)\n> \n> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S\n> index 8a756870c238..5884e8151376 100644\n> --- a/arch/arm/boot/compressed/head.S\n> +++ b/arch/arm/boot/compressed/head.S\n> @@ -427,15 +427,10 @@ dtb_check_done:\n>  \n>  \t\t/*\n>  \t\t * Compute the address of the hyp vectors after relocation.\n> -\t\t * This requires some arithmetic since we cannot directly\n> -\t\t * reference __hyp_stub_vectors in a PC-relative way.\n>  \t\t * Call __hyp_set_vectors with the new address so that we\n>  \t\t * can HVC again after the copy.\n>  \t\t */\n> -0:\t\tadr\tr0, 0b\n> -\t\tmovw\tr1, #:lower16:__hyp_stub_vectors - 0b\n> -\t\tmovt\tr1, #:upper16:__hyp_stub_vectors - 0b\n> -\t\tadd\tr0, r0, r1\n> +\t\tadr_l\tr0, __hyp_stub_vectors\n>  \t\tsub\tr0, r0, r5\n>  \t\tadd\tr0, r0, r10\n>  \t\tbl\t__hyp_set_vectors\n> @@ -568,17 +563,11 @@ not_relocated:\tmov\tr0, #0\n>  \t\tcmp\tr0, #HYP_MODE\t\t@ if not booted in HYP mode...\n>  \t\tbne\t__enter_kernel\t\t@ boot kernel directly\n>  \n> -\t\tadr\tr12, .L__hyp_reentry_vectors_offset\n> -\t\tldr\tr0, [r12]\n> -\t\tadd\tr0, r0, r12\n> -\n> +\t\tadr_l\tr0, __hyp_reentry_vectors\n>  \t\tbl\t__hyp_set_vectors\n>  \t\t__HVC(0)\t\t\t@ otherwise bounce to hyp mode\n>  \n>  \t\tb\t.\t\t\t@ should never be reached\n> -\n> -\t\t.align\t2\n> -.L__hyp_reentry_vectors_offset:\t.long\t__hyp_reentry_vectors - .\n>  #else\n>  \t\tb\t__enter_kernel\n>  #endif\n> diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S\n> index ec7e7377d423..3c2d1738d3f4 100644\n> --- a/arch/arm/kernel/hyp-stub.S\n> +++ b/arch/arm/kernel/hyp-stub.S\n> @@ -36,41 +36,38 @@ ENTRY(__boot_cpu_mode)\n>  .text\n>  \n>  \t/*\n> -\t * Save the primary CPU boot mode. Requires 3 scratch registers.\n> +\t * Save the primary CPU boot mode. Requires 2 scratch registers.\n>  \t */\n> -\t.macro\tstore_primary_cpu_mode\treg1, reg2, reg3\n> +\t.macro\tstore_primary_cpu_mode\treg1, reg2\n>  \tmrs\t\\reg1, cpsr\n>  \tand\t\\reg1, \\reg1, #MODE_MASK\n> -\tadr\t\\reg2, .L__boot_cpu_mode_offset\n> -\tldr\t\\reg3, [\\reg2]\n> -\tstr\t\\reg1, [\\reg2, \\reg3]\n> +\tstr_l\t\\reg1, __boot_cpu_mode, \\reg2\n>  \t.endm\n>  \n>  \t/*\n>  \t * Compare the current mode with the one saved on the primary CPU.\n>  \t * If they don't match, record that fact. The Z bit indicates\n>  \t * if there's a match or not.\n> -\t * Requires 3 additionnal scratch registers.\n> +\t * Requires 2 additional scratch registers.\n>  \t */\n> -\t.macro\tcompare_cpu_mode_with_primary mode, reg1, reg2, reg3\n> -\tadr\t\\reg2, .L__boot_cpu_mode_offset\n> -\tldr\t\\reg3, [\\reg2]\n> -\tldr\t\\reg1, [\\reg2, \\reg3]\n> +\t.macro\tcompare_cpu_mode_with_primary mode, reg1, reg2\n> +\tadr_l\t\\reg2, __boot_cpu_mode\n> +\tldr\t\\reg1, [\\reg2]\n>  \tcmp\t\\mode, \\reg1\t\t@ matches primary CPU boot mode?\n>  \torrne\t\\reg1, \\reg1, #BOOT_CPU_MODE_MISMATCH\n> -\tstrne\t\\reg1, [\\reg2, \\reg3]\t@ record what happened and give up\n> +\tstrne\t\\reg1, [\\reg2]\t\t@ record what happened and give up\n>  \t.endm\n>  \n>  #else\t/* ZIMAGE */\n>  \n> -\t.macro\tstore_primary_cpu_mode\treg1:req, reg2:req, reg3:req\n> +\t.macro\tstore_primary_cpu_mode\treg1:req, reg2:req\n>  \t.endm\n>  \n>  /*\n>   * The zImage loader only runs on one CPU, so we don't bother with mult-CPU\n>   * consistency checking:\n>   */\n> -\t.macro\tcompare_cpu_mode_with_primary mode, reg1, reg2, reg3\n> +\t.macro\tcompare_cpu_mode_with_primary mode, reg1, reg2\n>  \tcmp\t\\mode, \\mode\n>  \t.endm\n>  \n> @@ -85,7 +82,7 @@ ENTRY(__boot_cpu_mode)\n>   */\n>  @ Call this from the primary CPU\n>  ENTRY(__hyp_stub_install)\n> -\tstore_primary_cpu_mode\tr4, r5, r6\n> +\tstore_primary_cpu_mode\tr4, r5\n>  ENDPROC(__hyp_stub_install)\n>  \n>  \t@ fall through...\n> @@ -99,7 +96,7 @@ ENTRY(__hyp_stub_install_secondary)\n>  \t * If the secondary has booted with a different mode, give up\n>  \t * immediately.\n>  \t */\n> -\tcompare_cpu_mode_with_primary\tr4, r5, r6, r7\n> +\tcompare_cpu_mode_with_primary\tr4, r5, r6\n>  \tretne\tlr\n>  \n>  \t/*\n> @@ -264,12 +261,6 @@ ENTRY(__hyp_reset_vectors)\n>  \tret\tlr\n>  ENDPROC(__hyp_reset_vectors)\n>  \n> -#ifndef ZIMAGE\n> -.align 2\n> -.L__boot_cpu_mode_offset:\n> -\t.long\t__boot_cpu_mode - .\n> -#endif\n> -\n>  .align 5\n>  ENTRY(__hyp_stub_vectors)\n>  __hyp_stub_reset:\tW(b)\t.\n> diff --git a/arch/arm/kvm/init.S b/arch/arm/kvm/init.S\n> index 5386528665b5..d777c6fbd869 100644\n> --- a/arch/arm/kvm/init.S\n> +++ b/arch/arm/kvm/init.S\n> @@ -143,13 +143,7 @@ reset:\n>  \tbic\tr1, r1, r0\n>  \tmcr\tp15, 4, r1, c1, c0, 0\t@ HSCTLR\n>  \n> -\t/*\n> -\t * Install stub vectors, using ardb's VA->PA trick.\n> -\t */\n> -0:\tadr\tr0, 0b\t\t\t\t\t@ PA(0)\n> -\tmovw\tr1, #:lower16:__hyp_stub_vectors - 0b   @ VA(stub) - VA(0)\n> -\tmovt\tr1, #:upper16:__hyp_stub_vectors - 0b\n> -\tadd\tr1, r1, r0\t\t\t\t@ PA(stub)\n> +\tadr_l\tr1, __hyp_stub_vectors\t\t\t@ PA(stub)\n>  \tmcr\tp15, 4, r1, c12, c0, 0\t@ HVBAR\n>  \tb\texit\n>  \n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"nVddHV6S\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"GW4we6/q\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGHk2Zg4z9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:57:54 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douh5-0007kr-2t; Mon, 04 Sep 2017 16:57:51 +0000","from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douh0-0007cf-QO for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:57:49 +0000","by mail-qt0-x235.google.com with SMTP id k2so3963031qte.2\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:57:25 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\t25sm5309517qtv.0.2017.09.04.09.57.23\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:57:24 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=ONrcnLb10nB5cO6FCN2Wg0BGdvDGaa5fMCrZ63nbSHw=;\n\tb=nVddHV6SGiJ1n/\n\tIn001WgirFxCsTPKIIO4mKctJfjr1U+ZwnHRrrKdS6/QSo4TMCA/UMBbklbRdZB+UqdZylNoRT4AX\n\tlLMq94+Yh2LCkXFpnZD6c6fP8mAmPrVsrszbKmo+OhzzeTnDqplFbVBJ0Kfk9N/IZsigXF+43JYCN\n\tPlR7shE28TONOiU+klc1GIVvJ0R4YHHmkdfbh+vdLKjKQ5xblZngmqVifR2UqIP5r9B7rauWh9pHD\n\t5knU82JJqZ7unQJlP8RiUWBDoi7vWZ+EHabo+gWS5la3MCEjNNCj9kVnCi0iUgVlhaS3n7vM/3A75\n\tzvV+Pm0mRXvMrt9Ou+IA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=JC5XNuv4hUS5DRpnIsn3irhpiJF5mhLHmSLtb/l9aho=;\n\tb=GW4we6/q0lxFO1mKv53nptuoo430Oa4ayPjskIBv+/EHUGFbCIjRiRYjCb0oxe4AKF\n\tGXxI5LF+5Op/a50jLmf9ihhgeofVrKB2kCZUWicZrg0hIeckhgli+8ryY9kGW38toC5D\n\tFtDksX2ldJbHs4jjTcYeXb6xk8XgAl+IAVXxo="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=JC5XNuv4hUS5DRpnIsn3irhpiJF5mhLHmSLtb/l9aho=;\n\tb=Ag1PcA2MC6nudGXR0xGxchf2uJmPZt+HmMbRRWevUFgCf7A9YvHzNm589vGQY5JU0p\n\trtYgAwb1bUytx1SdaVwaoZpNXi9mKQwbggoNAlV1Lc7zNO9g2JPhro/yjwpLBhVMHQrg\n\tKmGh8/1yjrRiGOLROHRrafM4KGNG1M86FEH+E4Bs1UEzYcXVUO/WmqZB3zZ+jbcRLY15\n\t064up4Tu1v+b2dlk6E4dcLhmyfZMYPbd9d4bGy7Czf1PI2zHZhpYqEvmhR8YcccEsOPw\n\tlo5O8+44iIv880bSlNTcpqDQzGsQL9WQR015zfDG3rp0m0OMZpp0RqIuzwnGgESoFwtv\n\t2Reg==","X-Gm-Message-State":"AHPjjUgl6+V6ubgNl/gfFYyDkzBiQQvMx0o4t+r9DouaeWkFv1NM/Ghq\n\tmptkGleJk+3BpOFX","X-Google-Smtp-Source":"ADKCNb688h0KLbsn431YYkl/PO+GVkQda2r3NqHYzYUZqgKgkqmW17JBCQcOW1aZUdYGs0Sty9NIgQ==","X-Received":"by 10.237.36.13 with SMTP id r13mr1642945qtc.208.1504544244935; \n\tMon, 04 Sep 2017 09:57:24 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:57:23 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 12/29] ARM: kvm: replace open coded VA->PA\n\tcalculations with adr_l call","In-Reply-To":"<20170903120757.14968-13-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041257010.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-13-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_095746_957295_EB6114F3 ","X-CRM114-Status":"GOOD (  19.72  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno\n\ttrust [2607:f8b0:400d:c0d:0:0:0:235 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762786,"web_url":"http://patchwork.ozlabs.org/comment/1762786/","msgid":"<nycvar.YSQ.7.76.1709041258430.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T16:59:24","subject":"Re: [PATCH v2 13/29] arm-soc: exynos: replace open coded VA->PA\n\tconversions","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> This replaces a couple of open coded calculations to obtain the\n> physical address of a far symbol with calls to the new adr_l etc\n> macros.\n> \n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n\n> ---\n>  arch/arm/mach-exynos/headsmp.S |  9 +------\n>  arch/arm/mach-exynos/sleep.S   | 26 ++++----------------\n>  2 files changed, 6 insertions(+), 29 deletions(-)\n> \n> diff --git a/arch/arm/mach-exynos/headsmp.S b/arch/arm/mach-exynos/headsmp.S\n> index d3d24ab351ae..25de5aff1c41 100644\n> --- a/arch/arm/mach-exynos/headsmp.S\n> +++ b/arch/arm/mach-exynos/headsmp.S\n> @@ -23,10 +23,7 @@ ENTRY(exynos4_secondary_startup)\n>  ARM_BE8(setend\tbe)\n>  \tmrc\tp15, 0, r0, c0, c0, 5\n>  \tand\tr0, r0, #15\n> -\tadr\tr4, 1f\n> -\tldmia\tr4, {r5, r6}\n> -\tsub\tr4, r4, r5\n> -\tadd\tr6, r6, r4\n> +\tadr_l\tr6, pen_release\n>  pen:\tldr\tr7, [r6]\n>  \tcmp\tr7, r0\n>  \tbne\tpen\n> @@ -37,7 +34,3 @@ pen:\tldr\tr7, [r6]\n>  \t */\n>  \tb\tsecondary_startup\n>  ENDPROC(exynos4_secondary_startup)\n> -\n> -\t.align 2\n> -1:\t.long\t.\n> -\t.long\tpen_release\n> diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S\n> index cf950790fbdc..003465699263 100644\n> --- a/arch/arm/mach-exynos/sleep.S\n> +++ b/arch/arm/mach-exynos/sleep.S\n> @@ -17,6 +17,7 @@\n>  \n>  #include <linux/linkage.h>\n>  #include <asm/asm-offsets.h>\n> +#include <asm/assembler.h>\n>  #include <asm/hardware/cache-l2x0.h>\n>  #include \"smc.h\"\n>  \n> @@ -62,19 +63,13 @@ ENTRY(exynos_cpu_resume_ns)\n>  \tcmp\tr0, r1\n>  \tbne\tskip_cp15\n>  \n> -\tadr\tr0, _cp15_save_power\n> -\tldr\tr1, [r0]\n> -\tldr\tr1, [r0, r1]\n> -\tadr\tr0, _cp15_save_diag\n> -\tldr\tr2, [r0]\n> -\tldr\tr2, [r0, r2]\n> +\tldr_l\tr1, cp15_save_power\n> +\tldr_l\tr2, cp15_save_diag\n>  \tmov\tr0, #SMC_CMD_C15RESUME\n>  \tdsb\n>  \tsmc\t#0\n>  #ifdef CONFIG_CACHE_L2X0\n> -\tadr\tr0, 1f\n> -\tldr\tr2, [r0]\n> -\tadd\tr0, r2, r0\n> +\tadr_l\tr0, l2x0_saved_regs\n>  \n>  \t/* Check that the address has been initialised. */\n>  \tldr\tr1, [r0, #L2X0_R_PHY_BASE]\n> @@ -93,9 +88,7 @@ ENTRY(exynos_cpu_resume_ns)\n>  \tsmc\t#0\n>  \n>  \t/* Reload saved regs pointer because smc corrupts registers. */\n> -\tadr\tr0, 1f\n> -\tldr\tr2, [r0]\n> -\tadd\tr0, r2, r0\n> +\tadr_l\tr0, l2x0_saved_regs\n>  \n>  \tldr\tr1, [r0, #L2X0_R_PWR_CTRL]\n>  \tldr\tr2, [r0, #L2X0_R_AUX_CTRL]\n> @@ -114,15 +107,6 @@ skip_cp15:\n>  \tb\tcpu_resume\n>  ENDPROC(exynos_cpu_resume_ns)\n>  \n> -\t.align\n> -_cp15_save_power:\n> -\t.long\tcp15_save_power - .\n> -_cp15_save_diag:\n> -\t.long\tcp15_save_diag - .\n> -#ifdef CONFIG_CACHE_L2X0\n> -1:\t.long\tl2x0_saved_regs - .\n> -#endif /* CONFIG_CACHE_L2X0 */\n> -\n>  \t.data\n>  \t.globl cp15_save_diag\n>  cp15_save_diag:\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"Z+0O6PCp\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"RTSVCxyp\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGL322npz9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 02:59:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douj1-0008HR-Nb; Mon, 04 Sep 2017 16:59:51 +0000","from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douiy-0008Bu-9w for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 16:59:50 +0000","by mail-qk0-x22d.google.com with SMTP id b23so3702951qkg.1\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 09:59:27 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\td23sm3901851qkb.95.2017.09.04.09.59.25\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 09:59:26 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=t3kcmi8X3Naw6CS3eSYZCrwDfmGk/4rT327dF0xD7TE=;\n\tb=Z+0O6PCpE4gMEQ\n\tROWbETOb3NEqqrcwKSYvhoQKJz0saOVBzOtxkb5xSYelx8+NOxZ1h/LaOsT1WHi7IEAQfaS0QVNZe\n\tq/0sSHM14G5gHEdV1gJK3rOIo4YS6Dy6opYnRNrV4w5bwMAQyk/W18TwZWCDiXQ0BryMydzYjw5qh\n\tlzn/hKgfJ+TLicM4uoAGq/bCKL6X6bn4JSoxq8XXrh3RkjHcpAhGDlO0e8vFvqHjhNhOiAHYKwIlT\n\tF4GcwmcEsRv11LEfx+7ZAP9ZReKzGe/sURghudKQzqeqS+Cq1oY0pqZ1ObacHD2Tf41QPr6C+DOh6\n\tLCW5GqvwainqQ9TqGS+g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=ENZ+H3Y5EuqGq7NTzEoj1lSL6m8+3RZuylV+gz81i6M=;\n\tb=RTSVCxypoeTxzdk49Sfo1Oa9bIZ5saLKFaD0XNBdA5egzA+cXja+86PGBQztUom/T7\n\thma7ofbGh41JJ73GfPvdG4oohHi6fu68xm8B/Xumra1C6+ESe2n9uGekXopGMYHivGRZ\n\tCbQnh5YMNyLnybGfOzDdlTmCQY/c8h1eDTa/E="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=ENZ+H3Y5EuqGq7NTzEoj1lSL6m8+3RZuylV+gz81i6M=;\n\tb=LKU7ggshS7+MqjParU88AafcB2Wlc//D+bf+xpOM8tF97Hj7GIQBc7mH2VSNeaLKI5\n\t9vTqnC3/kxgrsGESjHyV37568T0YpxR07mlEbRUQH1vynbuO32smp7XSBhcfXzQ1Gltk\n\t2FV5wMIIwSfOEzPEyGGD7qUFFs+8UcebEVgQkTfiyAtOGRgGqVk1y+f/1BNisAxm6p/U\n\tvojyUaeBQ0hx4HC9X/DSYxT/Cg8yk3M3NBObj2JKs8d1AFgciwvLC2QEIQAJPdb/SQu4\n\tUM0cNtn3EWPZ5uaiUf3af6AnKsgXgYwiHMv8EFh7BUi2IUMht6ZostfsINI0X56qCmzQ\n\tzvFQ==","X-Gm-Message-State":"AHPjjUi+13LvWx2kot+Y4dPGzZHsnmRhu3YfnjGR3iplDNjZ1JcOPL4o\n\t8wEOQXbmnTQwJ36c","X-Google-Smtp-Source":"ADKCNb7JUvra+x3E694WprsdSzfKbCOz7s3OXytWuWmOPLT5LVCaZKXePHBgPLU+8ou7dPMnn+neFQ==","X-Received":"by 10.55.0.213 with SMTP id t82mr1731511qkg.286.1504544366588;\n\tMon, 04 Sep 2017 09:59:26 -0700 (PDT)","Date":"Mon, 4 Sep 2017 12:59:24 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 13/29] arm-soc: exynos: replace open coded VA->PA\n\tconversions","In-Reply-To":"<20170903120757.14968-14-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041258430.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-14-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_095948_441031_EAF480D8 ","X-CRM114-Status":"GOOD (  14.93  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:400d:c09:0:0:0:22d listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762788,"web_url":"http://patchwork.ozlabs.org/comment/1762788/","msgid":"<nycvar.YSQ.7.76.1709041300120.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T17:00:37","subject":"Re: [PATCH v2 14/29] arm-soc: mvebu: replace open coded VA->PA\n\tconversion","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> This replaces an open coded calculation to obtain the physical\n> address of a far symbol with a call to the new ldr_l etc macro.\n> \n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/mach-mvebu/coherency_ll.S | 8 +-------\n>  1 file changed, 1 insertion(+), 7 deletions(-)\n> \n> diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S\n> index 8b2fbc8b6bc6..df0ccb5cef1d 100644\n> --- a/arch/arm/mach-mvebu/coherency_ll.S\n> +++ b/arch/arm/mach-mvebu/coherency_ll.S\n> @@ -42,9 +42,7 @@ ENTRY(ll_get_coherency_base)\n>  \tldr\tr1, =coherency_base\n>  \tcmp\tr1, #0\n>  \tbeq\t2f\n> -\tadr\tr1, 3f\n> -\tldr\tr3, [r1]\n> -\tldr\tr1, [r1, r3]\n> +\tldr_l\tr1, coherency_phys_base\n>  \tb\t2f\n>  1:\n>  \t/*\n> @@ -160,7 +158,3 @@ ENTRY(ll_disable_coherency)\n>  \tdsb\n>  \tret\tlr\n>  ENDPROC(ll_disable_coherency)\n> -\n> -\t.align 2\n> -3:\n> -\t.long\tcoherency_phys_base - .\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"ay6XplIB\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"DkfX6ISl\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGMR29zYz9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:01:07 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1doukC-0001UT-21; Mon, 04 Sep 2017 17:01:04 +0000","from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1douk8-0001Rk-Sv for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 17:01:02 +0000","by mail-io0-x233.google.com with SMTP id q64so3100918iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 10:00:40 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\te85sm474098ita.25.2017.09.04.10.00.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 10:00:38 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Rjz8R5Dz+8O2WnjONBklB+BQMrH+sHdgbyJ9ZnU+39w=;\n\tb=ay6XplIBrhgasU\n\txXy8zEzfXxm2Rl1ihS82NuaIeTFLaxwUTvS8rMXEfgC7hB3yECoMHxVT/V2n4DybAxjejoBPZCGV/\n\twKMfSvBdmyqQxHeshVjQZsJSSAf3HYyzKjrDHmUnA+/MXElk86l1CgmWq5gaTfHv27+3jf4xkWn+S\n\tSWyuPVcj/bEbFanQu2Lx6WP8LbrbUPkkizuZHTscyM4dLYxuSY5SzogQbchcjKDAmZQnkJ5NodFuv\n\tx+x9Yhoyo/7ZNwBzVEJQ5FoHqSHanh5O2arnuwnsJt58RdqFpLSZW/dYsIdGDW5/uVOVmV6hCPuV9\n\t3Il8Iw+oSbn79h/naFag==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=2+ezSxOo6rmmzWqFtioQ4NjL2WNCzgu5bElSiaxXG7g=;\n\tb=DkfX6ISlSRTsoiflqLi8Ejur5MRLgtfnhy1p+3U0X7+NkJONtEfMxCpFHnDVoytJnf\n\t0zURoia5//fVYvXDz3W9pCOuHLz9GE4HxgUWcYIIEcidkabLM7xkP94I+NV/fRIOan5q\n\td+1XDvRLAvGhhKqglHxxYVq6OqT6HkbfW4WQI="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=2+ezSxOo6rmmzWqFtioQ4NjL2WNCzgu5bElSiaxXG7g=;\n\tb=JazIbLWUPNBT0ZB/+dMjFLF52cydNT2Ey3fVAb4hsq4KQyv5WrY8aB1jr2MqWNHsyg\n\tgukbXQcsD9cogtkd7yKxUw0VkVju2iPxQww0ReAEzoERSnpwzkaonF4itjL65vt78iwH\n\teDzD0oEcJ+tApUtYP3HF/JGQ8tiyGd4BNj/eYQPXeoGoXCal7iC6XWpqWFcDWM/1oqgS\n\tqi5y25aPfPk4ZyCgrL47hUf2DxSMGwwhesfb7p135Zsi4XuiOrAaasBB9rsvgjPYZeFI\n\tBKD5F5Bn0FbXhUfb9Vb0uahM3/MLpE64qcf8ARnHDUDMS27Qnjt84TAog9jqMjVmNxIc\n\tB4mA==","X-Gm-Message-State":"AHPjjUgdXhE9+IucoV7sOzQPnlvh7SbF1OGWaTJM0axPykooh5fuGHUh\n\tWgKwmF+dZwJz2kL/","X-Google-Smtp-Source":"ADKCNb4DesdLZMfFN/NTf9W26mPRTS1bU7NQn84tD1twM4YaavOPb4AJhqCIDIICV21+yXu6jw94MA==","X-Received":"by 10.107.152.140 with SMTP id\n\ta134mr1237523ioe.242.1504544439936; \n\tMon, 04 Sep 2017 10:00:39 -0700 (PDT)","Date":"Mon, 4 Sep 2017 13:00:37 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 14/29] arm-soc: mvebu: replace open coded VA->PA\n\tconversion","In-Reply-To":"<20170903120757.14968-15-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041300120.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-15-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_100100_978292_9C709BAF ","X-CRM114-Status":"GOOD (  13.63  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:233 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762794,"web_url":"http://patchwork.ozlabs.org/comment/1762794/","msgid":"<CAGXu5jLZXhiEt1uJR=HV37_4xR9HyB_kNQqx04v22jaEURvgcA@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T17:09:04","subject":"Re: [PATCH v2 02/29] asm-generic: add .data.rel.ro sections to\n\t__ro_after_init","submitter":{"id":10641,"url":"http://patchwork.ozlabs.org/api/people/10641/","name":"Kees Cook","email":"keescook@chromium.org"},"content":"On Sun, Sep 3, 2017 at 5:07 AM, Ard Biesheuvel\n<ard.biesheuvel@linaro.org> wrote:\n> When running in PIC mode, the compiler will emit const structures\n> containing runtime relocatable quantities into .data.rel.ro.* sections,\n> so that the linker can be smart about placing them together in a segment\n> that is read-write initially, and is remapped read-only afterwards. This\n> is exactly what __ro_after_init aims to provide, so move these sections\n> together.\n>\n> Acked-by: Arnd Bergmann <arnd@arndb.de>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Kees Cook <keescook@chromium.org>\n\n-Kees\n\n> ---\n>  include/asm-generic/vmlinux.lds.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h\n> index da0be9a8d1de..d16537b0b102 100644\n> --- a/include/asm-generic/vmlinux.lds.h\n> +++ b/include/asm-generic/vmlinux.lds.h\n> @@ -261,7 +261,7 @@\n>  #ifndef RO_AFTER_INIT_DATA\n>  #define RO_AFTER_INIT_DATA                                             \\\n>         VMLINUX_SYMBOL(__start_ro_after_init) = .;                      \\\n> -       *(.data..ro_after_init)                                         \\\n> +       *(.data..ro_after_init .data.rel.ro.*)                          \\\n>         VMLINUX_SYMBOL(__end_ro_after_init) = .;\n>  #endif\n>\n> --\n> 2.11.0\n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"FDzrvFMk\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"v2vJhf9F\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"SKepijnB\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGY947Ncz9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:09:33 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dousM-0004q5-Ak; Mon, 04 Sep 2017 17:09:30 +0000","from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dousI-0004WP-Lx for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 17:09:28 +0000","by mail-io0-x22e.google.com with SMTP id q64so3210004iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 10:09:06 -0700 (PDT)","by 10.107.7.101 with HTTP; Mon, 4 Sep 2017 10:09:04 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=gTZpNK0GZDH+uk1eeMuEsugmQuKd58nyiFAV1pIcM2Y=;\n\tb=FDzrvFMkutL6kz\n\t05uVeRMZk7l67qfUT0BbAAby41Ok8pKOnGh2WnNG8hexo9epwjVIvqLDRW1RgfNDrhK8WmAlV1Wdu\n\tt8fv5b8jItoZ5yU+pN+X8dsaR9bFJYK+8/UZmdOx64qJPEW0pwOz6qjW7zQu+amUUPvrEA9RY3xSn\n\tWTNiZe/3bMhtN3E+boV0IzLKY7vmW/0gIRhtjLsERldEiaebN1brGv6zJ2xFbL7i1lL0PwLWxRK4z\n\t4G4ClWYDhAIkHiWTyea4935GdUmrvdn0oCHOiu+l8WxAdhhjEvNN7tzful2K6JO2LyX3TIaJzNAKC\n\tvPQOpolK3YQYrVDnCNrQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=/eRyn2k0g3Txc1FvPS9n0PZHH9XJjUZLP8i7dNIfiLQ=;\n\tb=v2vJhf9FW4RxwtwTx0iU8zFcYaAup6wtn8b0zpMlzIQJazVzc83gNqZMvdk70YG7sL\n\t+0Zchbay0CTTU2Zk7viKAvrTzWAmRoo4FavdJ15YtsBvPdQgIAfGCOpQbPOKiLqt5F1J\n\tKmCLJOafIFfPVRQKEDqk+bIlpSnBl+SvTuSkWx1XU4GZgSLEpC3zbllE+S7kd2RScdwN\n\tv4McpEfXbWvh6aAJdlpfLggx3GhkwhiZ5gk5APnNY4F+53OECN6Ro2jHQwDPZ+mhwTef\n\ttBV5VEj0/37mDvisptYCEuiZ9GANac6JjtatyJplbVWGaDsCo5w071T7O1pTkdI57WXk\n\tBopQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=/eRyn2k0g3Txc1FvPS9n0PZHH9XJjUZLP8i7dNIfiLQ=;\n\tb=SKepijnBGH/UBqLcVjT6vKYiqkHHl4nHKd+Gx9EFMY4YAT9I2vBhBXSTQeuDR+B//v\n\tyRdIOkKbNWM/JiQc94z7w3LB8i/k7OAyrP6oA5ocOupBRUm1LkeWVNRJ5jLT/5JmsTP4\n\tX7iyJ6UzJ3xCbygUrLdGlp1p9+tSwUnscqz0k="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=/eRyn2k0g3Txc1FvPS9n0PZHH9XJjUZLP8i7dNIfiLQ=;\n\tb=spUM910s2K1puAjXkob/Cblz6ae/a0DI14g0iaESnBaxmqx34klhCwI4JlagI8E+7Y\n\tkFIPM8dmxCeGbBCFFAaN9RfbltLELvrn1vuk8ykaWjp8jfZIcIafIzCGh5eIHdybIxqj\n\t9r22Jfg0HtxeUpLZUYADj1BjYBtRL/5N2e8E4PuGLKEA++a/Y8LoOZrWi2gGOA6j9qPf\n\tOPGfh4VjasevCOoVqRPfKUbsbyuUkBi88TjMA9HXojfPZum5vHD1uj+6RuF0gi4CpXSl\n\tubvcpWX7GTqnO9m8KcdKVF7pMhSYHBUGgfjI8ac9U51D1Dqm0tVrnHuxOIy1IbeDAmWP\n\tK/+g==","X-Gm-Message-State":"AHPjjUjt9xBtyL7BAosugFDlEz+/sSwFrL5rLpSMMIGF1fEA/iYDr8sz\n\tVBcF8UiwN08sDu/SbhGmdqD23Hx1mlcE","X-Google-Smtp-Source":"ADKCNb67S3ndbCa0OLbGLVyOv+5RoNyZvyEkivgkXam0hKZxFRidw7lTrhIHiDdpZPIOSM9gv/FWaZCnTqmMzaB9J3w=","X-Received":"by 10.107.165.212 with SMTP id\n\to203mr1250834ioe.271.1504544945412; \n\tMon, 04 Sep 2017 10:09:05 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170903120757.14968-3-ard.biesheuvel@linaro.org>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-3-ard.biesheuvel@linaro.org>","From":"Kees Cook <keescook@chromium.org>","Date":"Mon, 4 Sep 2017 10:09:04 -0700","X-Google-Sender-Auth":"qaMwpa4W4W5AlF7sNevuzsXYc1I","Message-ID":"<CAGXu5jLZXhiEt1uJR=HV37_4xR9HyB_kNQqx04v22jaEURvgcA@mail.gmail.com>","Subject":"Re: [PATCH v2 02/29] asm-generic: add .data.rel.ro sections to\n\t__ro_after_init","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_100926_823669_DA5F8304 ","X-CRM114-Status":"GOOD (  14.51  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level\n\tmail domains are different\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Arnd Bergmann <arnd@arndb.de>,\n\tNicolas Pitre <nico@linaro.org>, Marc Zyngier <marc.zyngier@arm.com>, \n\t\"kernel-hardening@lists.openwall.com\"\n\t<kernel-hardening@lists.openwall.com>, \n\tRussell King <linux@armlinux.org.uk>, Dave Martin <dave.martin@arm.com>, \n\tTony Lindgren <tony@atomide.com>,\n\tMatt Fleming <matt@codeblueprint.co.uk>, \n\tThomas Garnier <thgarnie@google.com>,\n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762798,"web_url":"http://patchwork.ozlabs.org/comment/1762798/","msgid":"<nycvar.YSQ.7.76.1709041311230.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T17:17:40","subject":"Re: [PATCH v2 16/29] ARM: kernel: switch to relative exception\n\ttables","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> To avoid having to relocate the contents of extable entries at\n> runtime when running with KASLR enabled, wire up the existing\n> support for emitting them as relative references. This ensures\n> these quantities are invariant under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nCould it be better to have a macro that encapsulates exception entries \ne.g.:\n\n\t.macro ex_entry insn fixup\n\t.long\t\\insn - ., \\fixup - .\n\t.endif\n\nso that if ever this changes again or for whatever reason someone needs \nabsolute entries then this won't have to be done everywhere. The section \nswitch could be included in such a macro too. And it is so easy to \nforget to do the \"- .\" when adding new entries.\n\n\n\n\n\n> ---\n>  arch/arm/include/asm/Kbuild           |  1 -\n>  arch/arm/include/asm/assembler.h      |  6 +++---\n>  arch/arm/include/asm/extable.h        | 19 +++++++++++++++++\n>  arch/arm/include/asm/futex.h          |  2 +-\n>  arch/arm/include/asm/uaccess.h        |  8 +++----\n>  arch/arm/include/asm/word-at-a-time.h |  2 +-\n>  arch/arm/kernel/entry-armv.S          |  6 +++---\n>  arch/arm/kernel/swp_emulate.c         |  4 ++--\n>  arch/arm/lib/backtrace.S              |  8 +++----\n>  arch/arm/lib/getuser.S                | 22 ++++++++++----------\n>  arch/arm/lib/putuser.S                | 12 +++++------\n>  arch/arm/mm/alignment.c               | 14 ++++++-------\n>  arch/arm/mm/extable.c                 |  2 +-\n>  arch/arm/nwfpe/entry.S                |  2 +-\n>  scripts/sortextable.c                 |  2 +-\n>  15 files changed, 64 insertions(+), 46 deletions(-)\n> \n> diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild\n> index 721ab5ecfb9b..f2d67fa34eb3 100644\n> --- a/arch/arm/include/asm/Kbuild\n> +++ b/arch/arm/include/asm/Kbuild\n> @@ -3,7 +3,6 @@ generic-y += current.h\n>  generic-y += early_ioremap.h\n>  generic-y += emergency-restart.h\n>  generic-y += exec.h\n> -generic-y += extable.h\n>  generic-y += irq_regs.h\n>  generic-y += kdebug.h\n>  generic-y += local.h\n> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h\n> index a0906c1fc65d..ae43859a9000 100644\n> --- a/arch/arm/include/asm/assembler.h\n> +++ b/arch/arm/include/asm/assembler.h\n> @@ -247,7 +247,7 @@\n>  9999:\tx;\t\t\t\t\t\\\n>  \t.pushsection __ex_table,\"a\";\t\t\\\n>  \t.align\t3;\t\t\t\t\\\n> -\t.long\t9999b,9001f;\t\t\t\\\n> +\t.long\t9999b - ., 9001f - .;\t\t\\\n>  \t.popsection\n>  \n>  #ifdef CONFIG_SMP\n> @@ -383,7 +383,7 @@ THUMB(\torr\t\\reg , \\reg , #PSR_T_BIT\t)\n>  \n>  \t.pushsection __ex_table,\"a\"\n>  \t.align\t3\n> -\t.long\t9999b, \\abort\n> +\t.long\t9999b - ., \\abort - .\n>  \t.popsection\n>  \t.endm\n>  \n> @@ -424,7 +424,7 @@ THUMB(\torr\t\\reg , \\reg , #PSR_T_BIT\t)\n>  \n>  \t.pushsection __ex_table,\"a\"\n>  \t.align\t3\n> -\t.long\t9999b, \\abort\n> +\t.long\t9999b - ., \\abort - .\n>  \t.popsection\n>  \t.endr\n>  \t.endm\n> diff --git a/arch/arm/include/asm/extable.h b/arch/arm/include/asm/extable.h\n> new file mode 100644\n> index 000000000000..c85d1f4404b7\n> --- /dev/null\n> +++ b/arch/arm/include/asm/extable.h\n> @@ -0,0 +1,19 @@\n> +#ifndef __ASM_EXTABLE_H\n> +#define __ASM_EXTABLE_H\n> +\n> +/*\n> + * The exception table consists of pairs of relative offsets: the first\n> + * is the relative offset to an instruction that is allowed to fault,\n> + * and the second is the relative offset at which the program should\n> + * continue. No registers are modified, so it is entirely up to the\n> + * continuation code to figure out what to do.\n> + */\n> +\n> +struct exception_table_entry {\n> +\tint insn, fixup;\n> +};\n> +\n> +#define ARCH_HAS_RELATIVE_EXTABLE\n> +\n> +extern int fixup_exception(struct pt_regs *regs);\n> +#endif\n> diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h\n> index 6795368ad023..31760d0ab76b 100644\n> --- a/arch/arm/include/asm/futex.h\n> +++ b/arch/arm/include/asm/futex.h\n> @@ -11,7 +11,7 @@\n>  \t\"3:\\n\"\t\t\t\t\t\t\t\\\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\t\\\n>  \t\"\t.align\t3\\n\"\t\t\t\t\t\\\n> -\t\"\t.long\t1b, 4f, 2b, 4f\\n\"\t\t\t\\\n> +\t\"\t.long\t1b - ., 4f - ., 2b - ., 4f - .\\n\"\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\t\\\n>  \t\"\t.pushsection .text.fixup,\\\"ax\\\"\\n\"\t\t\\\n>  \t\"\t.align\t2\\n\"\t\t\t\t\t\\\n> diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h\n> index 0bf2347495f1..62b9bb7d991a 100644\n> --- a/arch/arm/include/asm/uaccess.h\n> +++ b/arch/arm/include/asm/uaccess.h\n> @@ -295,7 +295,7 @@ do {\t\t\t\t\t\t\t\t\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\t\\\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\t\\\n>  \t\"\t.align\t3\\n\"\t\t\t\t\t\\\n> -\t\"\t.long\t1b, 3b\\n\"\t\t\t\t\\\n> +\t\"\t.long\t1b - ., 3b - .\\n\"\t\t\t\\\n>  \t\"\t.popsection\"\t\t\t\t\t\\\n>  \t: \"+r\" (err), \"=&r\" (x)\t\t\t\t\t\\\n>  \t: \"r\" (addr), \"i\" (-EFAULT)\t\t\t\t\\\n> @@ -385,7 +385,7 @@ do {\t\t\t\t\t\t\t\t\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\t\\\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\t\\\n>  \t\"\t.align\t3\\n\"\t\t\t\t\t\\\n> -\t\"\t.long\t1b, 3b\\n\"\t\t\t\t\\\n> +\t\"\t.long\t1b - ., 3b - .\\n\"\t\t\t\\\n>  \t\"\t.popsection\"\t\t\t\t\t\\\n>  \t: \"+r\" (err)\t\t\t\t\t\t\\\n>  \t: \"r\" (x), \"r\" (__pu_addr), \"i\" (-EFAULT)\t\t\\\n> @@ -435,8 +435,8 @@ do {\t\t\t\t\t\t\t\t\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\t\\\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\t\\\n>  \t\"\t.align\t3\\n\"\t\t\t\t\t\\\n> -\t\"\t.long\t1b, 4b\\n\"\t\t\t\t\\\n> -\t\"\t.long\t2b, 4b\\n\"\t\t\t\t\\\n> +\t\"\t.long\t1b - ., 4b - .\\n\"\t\t\t\\\n> +\t\"\t.long\t2b - ., 4b - .\\n\"\t\t\t\\\n>  \t\"\t.popsection\"\t\t\t\t\t\\\n>  \t: \"+r\" (err), \"+r\" (__pu_addr)\t\t\t\t\\\n>  \t: \"r\" (x), \"i\" (-EFAULT)\t\t\t\t\\\n> diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/word-at-a-time.h\n> index 5831dce4b51c..d433c686d9ca 100644\n> --- a/arch/arm/include/asm/word-at-a-time.h\n> +++ b/arch/arm/include/asm/word-at-a-time.h\n> @@ -86,7 +86,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)\n>  \t\"\t.popsection\\n\"\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\n>  \t\"\t.align\t3\\n\"\n> -\t\"\t.long\t1b, 3b\\n\"\n> +\t\"\t.long\t1b - ., 3b - .\\n\"\n>  \t\"\t.popsection\"\n>  \t: \"=&r\" (ret), \"=&r\" (offset)\n>  \t: \"r\" (addr), \"Qo\" (*(unsigned long *)addr));\n> diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S\n> index c731f0d2b2af..1c7c12123b18 100644\n> --- a/arch/arm/kernel/entry-armv.S\n> +++ b/arch/arm/kernel/entry-armv.S\n> @@ -570,10 +570,10 @@ ENDPROC(__und_usr)\n>  \tret\tr9\n>  \t.popsection\n>  \t.pushsection __ex_table,\"a\"\n> -\t.long\t1b, 4b\n> +\t.long\t1b - ., 4b - .\n>  #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7\n> -\t.long\t2b, 4b\n> -\t.long\t3b, 4b\n> +\t.long\t2b - ., 4b - .\n> +\t.long\t3b - ., 4b - .\n>  #endif\n>  \t.popsection\n>  \n> diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c\n> index 3bda08bee674..a783e9c0b266 100644\n> --- a/arch/arm/kernel/swp_emulate.c\n> +++ b/arch/arm/kernel/swp_emulate.c\n> @@ -50,8 +50,8 @@\n>  \t\"\t.previous\\n\"\t\t\t\t\t\\\n>  \t\"\t.section\t __ex_table,\\\"a\\\"\\n\"\t\t\\\n>  \t\"\t.align\t\t3\\n\"\t\t\t\t\\\n> -\t\"\t.long\t\t0b, 3b\\n\"\t\t\t\\\n> -\t\"\t.long\t\t1b, 3b\\n\"\t\t\t\\\n> +\t\"\t.long\t\t0b - ., 3b - .\\n\"\t\t\\\n> +\t\"\t.long\t\t1b - ., 3b - .\\n\"\t\t\\\n>  \t\"\t.previous\"\t\t\t\t\t\\\n>  \t: \"=&r\" (res), \"+r\" (data), \"=&r\" (temp)\t\t\\\n>  \t: \"r\" (addr), \"i\" (-EAGAIN), \"i\" (-EFAULT)\t\t\\\n> diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S\n> index 7d7952e5a3b1..84a8df7aa63c 100644\n> --- a/arch/arm/lib/backtrace.S\n> +++ b/arch/arm/lib/backtrace.S\n> @@ -107,10 +107,10 @@ ENDPROC(c_backtrace)\n>  \t\t\n>  \t\t.pushsection __ex_table,\"a\"\n>  \t\t.align\t3\n> -\t\t.long\t1001b, 1006b\n> -\t\t.long\t1002b, 1006b\n> -\t\t.long\t1003b, 1006b\n> -\t\t.long\t1004b, 1006b\n> +\t\t.long\t1001b - ., 1006b - .\n> +\t\t.long\t1002b - ., 1006b - .\n> +\t\t.long\t1003b - ., 1006b - .\n> +\t\t.long\t1004b - ., 1006b - .\n>  \t\t.popsection\n>  \n>  .Lbad:\t\t.asciz\t\"Backtrace aborted due to bad frame pointer <%p>\\n\"\n> diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S\n> index df73914e81c8..d47b4776d308 100644\n> --- a/arch/arm/lib/getuser.S\n> +++ b/arch/arm/lib/getuser.S\n> @@ -133,17 +133,17 @@ ENDPROC(__get_user_bad)\n>  ENDPROC(__get_user_bad8)\n>  \n>  .pushsection __ex_table, \"a\"\n> -\t.long\t1b, __get_user_bad\n> -\t.long\t2b, __get_user_bad\n> -\t.long\t3b, __get_user_bad\n> -\t.long\t4b, __get_user_bad\n> -\t.long\t5b, __get_user_bad8\n> -\t.long\t6b, __get_user_bad8\n> +\t.long\t1b - ., __get_user_bad - .\n> +\t.long\t2b - ., __get_user_bad - .\n> +\t.long\t3b - ., __get_user_bad - .\n> +\t.long\t4b - ., __get_user_bad - .\n> +\t.long\t5b - ., __get_user_bad8 - .\n> +\t.long\t6b - ., __get_user_bad8 - .\n>  #ifdef __ARMEB__\n> -\t.long   7b, __get_user_bad\n> -\t.long\t8b, __get_user_bad8\n> -\t.long\t9b, __get_user_bad8\n> -\t.long\t10b, __get_user_bad8\n> -\t.long\t11b, __get_user_bad8\n> +\t.long   7b - ., __get_user_bad - .\n> +\t.long\t8b - ., __get_user_bad8 - .\n> +\t.long\t9b - ., __get_user_bad8 - .\n> +\t.long\t10b - ., __get_user_bad8 - .\n> +\t.long\t11b - ., __get_user_bad8 - .\n>  #endif\n>  .popsection\n> diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S\n> index 38d660d3705f..6b854197ff48 100644\n> --- a/arch/arm/lib/putuser.S\n> +++ b/arch/arm/lib/putuser.S\n> @@ -89,10 +89,10 @@ __put_user_bad:\n>  ENDPROC(__put_user_bad)\n>  \n>  .pushsection __ex_table, \"a\"\n> -\t.long\t1b, __put_user_bad\n> -\t.long\t2b, __put_user_bad\n> -\t.long\t3b, __put_user_bad\n> -\t.long\t4b, __put_user_bad\n> -\t.long\t5b, __put_user_bad\n> -\t.long\t6b, __put_user_bad\n> +\t.long\t1b - ., __put_user_bad - .\n> +\t.long\t2b - ., __put_user_bad - .\n> +\t.long\t3b - ., __put_user_bad - .\n> +\t.long\t4b - ., __put_user_bad - .\n> +\t.long\t5b - ., __put_user_bad - .\n> +\t.long\t6b - ., __put_user_bad - .\n>  .popsection\n> diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c\n> index 2c96190e018b..2c74cb826b6a 100644\n> --- a/arch/arm/mm/alignment.c\n> +++ b/arch/arm/mm/alignment.c\n> @@ -209,7 +209,7 @@ union offset_union {\n>  \t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\\\n>  \t\"\t.align\t3\\n\"\t\t\t\t\\\n> -\t\"\t.long\t1b, 3b\\n\"\t\t\t\\\n> +\t\"\t.long\t1b - ., 3b - .\\n\"\t\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t: \"=r\" (err), \"=&r\" (val), \"=r\" (addr)\t\t\\\n>  \t: \"0\" (err), \"2\" (addr))\n> @@ -269,8 +269,8 @@ union offset_union {\n>  \t\t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t\t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\\\n>  \t\t\"\t.align\t3\\n\"\t\t\t\t\\\n> -\t\t\"\t.long\t1b, 4b\\n\"\t\t\t\\\n> -\t\t\"\t.long\t2b, 4b\\n\"\t\t\t\\\n> +\t\t\"\t.long\t1b - ., 4b - .\\n\"\t\t\\\n> +\t\t\"\t.long\t2b - ., 4b - .\\n\"\t\t\\\n>  \t\t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t\t: \"=r\" (err), \"=&r\" (v), \"=&r\" (a)\t\t\\\n>  \t\t: \"0\" (err), \"1\" (v), \"2\" (a));\t\t\t\\\n> @@ -309,10 +309,10 @@ union offset_union {\n>  \t\t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t\t\"\t.pushsection __ex_table,\\\"a\\\"\\n\"\t\\\n>  \t\t\"\t.align\t3\\n\"\t\t\t\t\\\n> -\t\t\"\t.long\t1b, 6b\\n\"\t\t\t\\\n> -\t\t\"\t.long\t2b, 6b\\n\"\t\t\t\\\n> -\t\t\"\t.long\t3b, 6b\\n\"\t\t\t\\\n> -\t\t\"\t.long\t4b, 6b\\n\"\t\t\t\\\n> +\t\t\"\t.long\t1b - ., 6b - .\\n\"\t\t\\\n> +\t\t\"\t.long\t2b - ., 6b - .\\n\"\t\t\\\n> +\t\t\"\t.long\t3b - ., 6b - .\\n\"\t\t\\\n> +\t\t\"\t.long\t4b - ., 6b - .\\n\"\t\t\\\n>  \t\t\"\t.popsection\\n\"\t\t\t\t\\\n>  \t\t: \"=r\" (err), \"=&r\" (v), \"=&r\" (a)\t\t\\\n>  \t\t: \"0\" (err), \"1\" (v), \"2\" (a));\t\t\t\\\n> diff --git a/arch/arm/mm/extable.c b/arch/arm/mm/extable.c\n> index f436f7439e46..6a8b85bf0cac 100644\n> --- a/arch/arm/mm/extable.c\n> +++ b/arch/arm/mm/extable.c\n> @@ -10,7 +10,7 @@ int fixup_exception(struct pt_regs *regs)\n>  \n>  \tfixup = search_exception_tables(instruction_pointer(regs));\n>  \tif (fixup) {\n> -\t\tregs->ARM_pc = fixup->fixup;\n> +\t\tregs->ARM_pc = (unsigned long)&fixup->fixup + fixup->fixup;\n>  #ifdef CONFIG_THUMB2_KERNEL\n>  \t\t/* Clear the IT state to avoid nasty surprises in the fixup */\n>  \t\tregs->ARM_cpsr &= ~PSR_IT_MASK;\n> diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S\n> index 39c20afad7ed..c4fe13b31705 100644\n> --- a/arch/arm/nwfpe/entry.S\n> +++ b/arch/arm/nwfpe/entry.S\n> @@ -121,5 +121,5 @@ next:\n>  \n>  \t.pushsection __ex_table,\"a\"\n>  \t.align\t3\n> -\t.long\t.Lx1, .Lfix\n> +\t.long\t.Lx1 - ., .Lfix - .\n>  \t.popsection\n> diff --git a/scripts/sortextable.c b/scripts/sortextable.c\n> index 365a907f98b3..56a4c6714da7 100644\n> --- a/scripts/sortextable.c\n> +++ b/scripts/sortextable.c\n> @@ -314,6 +314,7 @@ do_file(char const *const fname)\n>  \t\tbreak;\n>  \n>  \tcase EM_S390:\n> +\tcase EM_ARM:\n>  \tcase EM_AARCH64:\n>  \tcase EM_PARISC:\n>  \tcase EM_PPC:\n> @@ -322,7 +323,6 @@ do_file(char const *const fname)\n>  \t\tbreak;\n>  \tcase EM_ARCOMPACT:\n>  \tcase EM_ARCV2:\n> -\tcase EM_ARM:\n>  \tcase EM_MICROBLAZE:\n>  \tcase EM_MIPS:\n>  \tcase EM_XTENSA:\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"Gl80618h\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"cS8nUn65\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGl96xxmz9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:18:13 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dov0i-0000vb-R7; Mon, 04 Sep 2017 17:18:08 +0000","from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dov0d-0000u8-9W for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 17:18:06 +0000","by mail-io0-x231.google.com with SMTP id z67so3344272iof.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 10:17:42 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\ts141sm3608976ita.1.2017.09.04.10.17.40\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 10:17:41 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=8RvMM+bbmJij0zhhnfu0r/lKUql/CoC3apX5mvr7tCw=;\n\tb=Gl80618hVOM+l2\n\tNBA1COlKMRhnTezM+2PA7cXkSYsEaEP6CIxqaiIb8+JzuwsQ5ALTzkFTW85pbjYALJpNqV7+5L2u+\n\tVWaibhqgrxOd7UMAZB2H8iiBtHZRCSg+E9tG41VwcGXc5Lv+a67GObuAtt8ALX8of4D+eWxp0SjbL\n\tUXeeVjwGhhaCRckK1mWsk8xEL3Hrvfao6e/8+dhMdl4CDzScL32XLQpvEXCqrHwJ0I9XmKv3D7vNi\n\t9TUyijhOYjATA8XRq0v3m2P7+y8PSfFDxCbtIDyLClhiZeM+sa+QM2zpYPg3HH7SaafcgoQ/lViSq\n\tDz6kM8FUsZEEoPlLYlYA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=U6EUp/fQ1egxt9Ja8jz8TQDq7LX5TiTl4eq7iGQ55SQ=;\n\tb=cS8nUn65dpIdWJHKu+BThoyUvUE+Lck+Jv52KXB/4OIc1BTxu3NimEB7zrkW/KtPkP\n\tmaQYIyluzN9rVUllboe3FqVIHnWOne6D1WRlH9oZESjMEIyTpit7atU7SE0vxbdBp+MC\n\tumLS4r54pHxKZTkDwMjuOw/1x9PTArBvRgcVI="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=U6EUp/fQ1egxt9Ja8jz8TQDq7LX5TiTl4eq7iGQ55SQ=;\n\tb=B2iIwvFJzJ/7WOWQcYI8nQB6g4WG0PnCzFfVbQ2v0r62QAF9DTQBHK0sxu3D4ngH0Z\n\t3ScQn4ve2FJltxqSRxGEH5BOk+y2iYFZ5Ol29obu6nXwcBl+UpvtYtnLSh7cHGuvuTUV\n\tzDi0T3arXnk/9YGa4PFrMfw0ROwFLSdBz59FYsIa2bCqTm7aa5Pya/FdDSpDS7pkg/H0\n\t8IMhQC5yeBeZW/WqM2Hwv5jvbF9TzzZMMRuqEaCz3+GCFscSseSDOOeZb0bKcd1LNfrl\n\tp9Kjf7skogXNafdv9g5gqaxHpR0vEQY3tAbQ8Igl8TBHdSkU5yk557r/Hdw95LYo8OE+\n\tD1CQ==","X-Gm-Message-State":"AHPjjUil/MWGiJkNnlY5WLc5AX8wvI8p8kPKRwAZSq8Xzl7cbZPk1pcH\n\tvwWVZny6AgQO1ir1mGzDNA==","X-Google-Smtp-Source":"ADKCNb7HjWbRf1LIr/8/ZNr2rNbbUc/P80Psm2b5yP11qzrQHIQdqLfGIGqizpY+O/sl/2IGuIwCDA==","X-Received":"by 10.36.146.196 with SMTP id l187mr1349909itd.85.1504545462294; \n\tMon, 04 Sep 2017 10:17:42 -0700 (PDT)","Date":"Mon, 4 Sep 2017 13:17:40 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 16/29] ARM: kernel: switch to relative exception\n\ttables","In-Reply-To":"<20170903120757.14968-17-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041311230.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-17-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_101803_422242_0E93D67A ","X-CRM114-Status":"GOOD (  20.77  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762803,"web_url":"http://patchwork.ozlabs.org/comment/1762803/","msgid":"<nycvar.YSQ.7.76.1709041301250.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T17:01:33","subject":"Re: [PATCH v2 15/29] arm-soc: various: replace open coded VA->PA\n\tcalculation of pen_release","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> This replaces a few copies of the open coded calculations of the\n> physical address of 'pen_release' in the secondary startup code\n> of a couple of platforms. This ensures these quantities are invariant\n> under runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n\n> ---\n>  arch/arm/mach-prima2/headsmp.S    | 11 +++--------\n>  arch/arm/mach-spear/headsmp.S     | 11 +++--------\n>  arch/arm/mach-sti/headsmp.S       | 10 +++-------\n>  arch/arm/plat-versatile/headsmp.S |  9 +--------\n>  4 files changed, 10 insertions(+), 31 deletions(-)\n> \n> diff --git a/arch/arm/mach-prima2/headsmp.S b/arch/arm/mach-prima2/headsmp.S\n> index 209d9fc5c16c..070df700bb38 100644\n> --- a/arch/arm/mach-prima2/headsmp.S\n> +++ b/arch/arm/mach-prima2/headsmp.S\n> @@ -9,6 +9,8 @@\n>  #include <linux/linkage.h>\n>  #include <linux/init.h>\n>  \n> +#include <asm/assembler.h>\n> +\n>  /*\n>   * SIRFSOC specific entry point for secondary CPUs.  This provides\n>   * a \"holding pen\" into which all secondary cores are held until we're\n> @@ -17,10 +19,7 @@\n>  ENTRY(sirfsoc_secondary_startup)\n>          mrc     p15, 0, r0, c0, c0, 5\n>          and     r0, r0, #15\n> -        adr     r4, 1f\n> -        ldmia   r4, {r5, r6}\n> -        sub     r4, r4, r5\n> -        add     r6, r6, r4\n> +        adr_l   r6, pen_release\n>  pen:    ldr     r7, [r6]\n>          cmp     r7, r0\n>          bne     pen\n> @@ -31,7 +30,3 @@ pen:    ldr     r7, [r6]\n>           */\n>          b       secondary_startup\n>  ENDPROC(sirfsoc_secondary_startup)\n> -\n> -        .align\n> -1:      .long   .\n> -        .long   pen_release\n> diff --git a/arch/arm/mach-spear/headsmp.S b/arch/arm/mach-spear/headsmp.S\n> index c52192dc3d9f..4da01b103f33 100644\n> --- a/arch/arm/mach-spear/headsmp.S\n> +++ b/arch/arm/mach-spear/headsmp.S\n> @@ -13,6 +13,8 @@\n>  #include <linux/linkage.h>\n>  #include <linux/init.h>\n>  \n> +#include <asm/assembler.h>\n> +\n>  \t__INIT\n>  \n>  /*\n> @@ -23,10 +25,7 @@\n>  ENTRY(spear13xx_secondary_startup)\n>  \tmrc\tp15, 0, r0, c0, c0, 5\n>  \tand\tr0, r0, #15\n> -\tadr\tr4, 1f\n> -\tldmia\tr4, {r5, r6}\n> -\tsub\tr4, r4, r5\n> -\tadd\tr6, r6, r4\n> +\tadr_l\tr6, pen_release\n>  pen:\tldr\tr7, [r6]\n>  \tcmp\tr7, r0\n>  \tbne\tpen\n> @@ -40,8 +39,4 @@ pen:\tldr\tr7, [r6]\n>  \t * should now contain the SVC stack for this core\n>  \t */\n>  \tb\tsecondary_startup\n> -\n> -\t.align\n> -1:\t.long\t.\n> -\t.long\tpen_release\n>  ENDPROC(spear13xx_secondary_startup)\n> diff --git a/arch/arm/mach-sti/headsmp.S b/arch/arm/mach-sti/headsmp.S\n> index e0ad451700d5..cdf3442f397b 100644\n> --- a/arch/arm/mach-sti/headsmp.S\n> +++ b/arch/arm/mach-sti/headsmp.S\n> @@ -16,6 +16,8 @@\n>  #include <linux/linkage.h>\n>  #include <linux/init.h>\n>  \n> +#include <asm/assembler.h>\n> +\n>  /*\n>   * ST specific entry point for secondary CPUs.  This provides\n>   * a \"holding pen\" into which all secondary cores are held until we're\n> @@ -24,10 +26,7 @@\n>  ENTRY(sti_secondary_startup)\n>  \tmrc\tp15, 0, r0, c0, c0, 5\n>  \tand\tr0, r0, #15\n> -\tadr\tr4, 1f\n> -\tldmia\tr4, {r5, r6}\n> -\tsub\tr4, r4, r5\n> -\tadd\tr6, r6, r4\n> +\tadr_l\tr6, pen_release\n>  pen:\tldr\tr7, [r6]\n>  \tcmp\tr7, r0\n>  \tbne\tpen\n> @@ -38,6 +37,3 @@ pen:\tldr\tr7, [r6]\n>  \t */\n>  \tb\tsecondary_startup\n>  ENDPROC(sti_secondary_startup)\n> -\n> -1:\t.long\t.\n> -\t.long\tpen_release\n> diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S\n> index 40f27e52de75..0f2a5eddac5a 100644\n> --- a/arch/arm/plat-versatile/headsmp.S\n> +++ b/arch/arm/plat-versatile/headsmp.S\n> @@ -21,10 +21,7 @@ ENTRY(versatile_secondary_startup)\n>   ARM_BE8(setend\tbe)\n>  \tmrc\tp15, 0, r0, c0, c0, 5\n>  \tbic\tr0, #0xff000000\n> -\tadr\tr4, 1f\n> -\tldmia\tr4, {r5, r6}\n> -\tsub\tr4, r4, r5\n> -\tadd\tr6, r6, r4\n> +\tadr_l\tr6, pen_release\n>  pen:\tldr\tr7, [r6]\n>  \tcmp\tr7, r0\n>  \tbne\tpen\n> @@ -34,8 +31,4 @@ pen:\tldr\tr7, [r6]\n>  \t * should now contain the SVC stack for this core\n>  \t */\n>  \tb\tsecondary_startup\n> -\n> -\t.align\n> -1:\t.long\t.\n> -\t.long\tpen_release\n>  ENDPROC(versatile_secondary_startup)\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"X0q+81kF\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"IsukCAPN\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"hQgvSmgN\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmGym2Ry4z9s7m\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:28:16 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovAR-0005uO-GR; Mon, 04 Sep 2017 17:28:11 +0000","from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dov9n-0005Hx-Ng for linux-arm-kernel@bombadil.infradead.org;\n\tMon, 04 Sep 2017 17:27:31 +0000","from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b])\n\tby merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1doulB-0005xj-R1 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 17:02:08 +0000","by mail-io0-x22b.google.com with SMTP id 62so3114716iok.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 10:01:42 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tb72sm484602iti.20.2017.09.04.10.01.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 10:01:40 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=i6In3hdwPRv5bqj9C1f1Mm5/JjckfYFYpK/T88weqzY=;\n\tb=X0q+81kFAHBh6c\n\tEVW9EoP6ooSJS0efCHpIlGP0J9fzSwVds7qOf2ifJO7ZBBl18TztQyywCqVtBBCkPrLfya0muV1MN\n\tv/EJMcPz4xHNgi3eNkDdX0DgfFdcClAp+FA3Ga1yHVginCvM8s/Ho5a896/vOsIORYC95HwcYQI5J\n\tE55wCT1arrF4+MhYfmUVD6shkNDDVmJOzaD/JydgyMeYNfNeRX1fRM/KFjDvuYUGytI2gSntVPuik\n\tUiC1M64vxy5iWR8FodgvlBvGYGBuNrpPCbxfIjkgTOtK2OZfyyvxdntUCFqpKgmm/UGDxQYbHPmsU\n\tn9D3iXrWoWmHZHycxTqg==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=Content-Type:MIME-Version:References:\n\tMessage-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=v8KCQ0pwrGc8F19MY9WOKPXBky4qNW5e2L48cbGc73s=;\n\tb=IsukCAPNrN4Nc2eBCVMb0GrcJ\n\tlffYzMBX9Qjyhhhb9q5y7Fi93YimgySZLzSC59zfJYf2ap0fC9Oqk2YdK1jvcSTQXi4tpc6qp/UhG\n\ta2AnBj+rb9tOPnsLUPjIYFdUAT1f1mbK8cgXPNp/c3+BCVmTe/UrNDqH7YPJT0GW3qaRm4ZM9cTv7\n\tUd18fnOwgSx+dcr/3Z1K50JmUIg1lJ9iSLsjF8m57CwYvV6fQiaNGd2VkgfQ9DeSZGCQvBUSRJOj5\n\tStLtWCOq20kRz1zqf4pH0ge+s0mFGc5N8wchY7/6WePS9I32e8Tb0YCGh7T4haYfkqaCN3yRIMefb\n\t6xh2qAY4g==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=v8KCQ0pwrGc8F19MY9WOKPXBky4qNW5e2L48cbGc73s=;\n\tb=hQgvSmgNkf007q7F3cSegk+l3+LcUfRgK6kGSHUc9E3QXSy/MWfVwnKQ9yiSpHQA7a\n\thTQDeKzvdMcT7hrw0D4JhLvpSdmGvG1w7ugQEyzgLhhAChserBjXLBH1E0lJwX3xMP6a\n\tj0ma/jm8NhYN0CB1rB3ypLF/pZ3LkvNoxoqG8="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=v8KCQ0pwrGc8F19MY9WOKPXBky4qNW5e2L48cbGc73s=;\n\tb=ZAslBM7U4Q2zICYJFhInO1cqtnD2RUYRNPDYlxx6gmRqwrnK8IX7vWtbMqnX7WzxO+\n\tIpEmob+0lNOYsx6jbi3U5WRKIsYwZ2yMplqNd5t17F6Y+r+aqOqzf1pDKdb5rvmo6fvf\n\tx98M9gtAHlO6h3G20Fp2Bf+pob7UdkD9ISwK3qtd47aUE7AfgTtKGeW7bkfcXSGBye5/\n\ttOCinbSUEtX36zgGcawg3QctIeN4EjqJvTsU0F7Qc2CacwnETNcY46PBYX8oRvtfSvIU\n\thgTUzpsPgD6ZZ4rft1pV0XzED5/dC4k+TS/sM/y1SGWaYIlmk1hN35u6wD6yn310t8+U\n\tYXIA==","X-Gm-Message-State":"AHPjjUjI/NEh1R7sjOgBGKqE9Dwf5kY2G6+lhyF2YVGOxqGs1pPrR9lJ\n\tRvd2p4WNk+0t3CUi4nT8Ag==","X-Google-Smtp-Source":"ADKCNb7Pn3hssVyx3c3ISawf9EJ1ukd1ezJkRbEvW7Odx9oKM17nErmAssgdh6sF+7b3jXyrNF/jMQ==","X-Received":"by 10.36.208.132 with SMTP id m126mr1340295itg.130.1504544500657;\n\tMon, 04 Sep 2017 10:01:40 -0700 (PDT)","Date":"Mon, 4 Sep 2017 13:01:33 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 15/29] arm-soc: various: replace open coded VA->PA\n\tcalculation of pen_release","In-Reply-To":"<20170903120757.14968-16-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041301250.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-16-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-Spam-Note":"CRM114 invocation failed","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22b listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762805,"web_url":"http://patchwork.ozlabs.org/comment/1762805/","msgid":"<CAKv+Gu_wgTk0GdPiR5qvTDXqiX+ZUJ_s7Zs68i2Z4VHW+CcXyQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T17:30:26","subject":"Re: [PATCH v2 16/29] ARM: kernel: switch to relative exception\n\ttables","submitter":{"id":26857,"url":"http://patchwork.ozlabs.org/api/people/26857/","name":"Ard Biesheuvel","email":"ard.biesheuvel@linaro.org"},"content":"On 4 September 2017 at 18:17, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:\n> On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n>\n>> To avoid having to relocate the contents of extable entries at\n>> runtime when running with KASLR enabled, wire up the existing\n>> support for emitting them as relative references. This ensures\n>> these quantities are invariant under runtime relocation.\n>>\n>> Cc: Russell King <linux@armlinux.org.uk>\n>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n>\n> Could it be better to have a macro that encapsulates exception entries\n> e.g.:\n>\n>         .macro ex_entry insn fixup\n>         .long   \\insn - ., \\fixup - .\n>         .endif\n>\n> so that if ever this changes again or for whatever reason someone needs\n> absolute entries then this won't have to be done everywhere. The section\n> switch could be included in such a macro too. And it is so easy to\n> forget to do the \"- .\" when adding new entries.\n>\n\nGood point. I will change that.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"kfIJH6yG\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"iAjY9r49\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmH1q4zvYz9t39\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 03:30:55 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovD1-0000Ai-OE; Mon, 04 Sep 2017 17:30:51 +0000","from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovCx-000084-Tj for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 17:30:49 +0000","by mail-io0-x234.google.com with SMTP id i200so3503566ioa.2\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 10:30:27 -0700 (PDT)","by 10.107.162.1 with HTTP; Mon, 4 Sep 2017 10:30:26 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=Z9h14NNUbF9K5ifYVLQBuDW3aNal2WGqSvaCItZijwk=;\n\tb=kfIJH6yGx8vnSh\n\tsx/DvVOCgnrx4cJc9FamkyEcdrMU9Z75g5o+aMg7Qu7pCBeZvpM3REl44DY/bYhPrnobeh/d8ViCp\n\tL3nSS0nfjfpBtkx61+eTiZlpAb4u4mNFPWyTmPVrkmX4udRtaa3vWyeLAeXXySwbAt3SjCYoNOFTi\n\tAm6MWO780r9rLZag8MqJ//m4cjSOvdD+P1ItBvgAx0JbU9HIoIxMls+akTnFT5BVQswQbu/eU4i40\n\twezB9KxqxQDZ+IU3SPf64ZhWMCXNaiWMRB/VYs9ekHlHzIM3xwCixO/eEPrRmeBfv5HJOMUi77NHV\n\tj7ZpAOXz/rJOcXutsGCA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=df0S4wsoU1byDrkZwMJI1/vvVDo+i/b9vKnzFX3HtTI=;\n\tb=iAjY9r49uApLOWGfx/8i0QD8//gsRc4dcpjEIZg4CQnyZxc3CHvTYWcONqr3gXz+Kn\n\tS0ienFz1msUW8WgFTW+FEHgx+eMJU8l7ryrOPmjEe2hcySw5PDLQ/yyt8MOx2QG3UZ3K\n\tOeXP3rd5DD9OrW3vv3bG6c3K/nGzELHEJYL48="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=df0S4wsoU1byDrkZwMJI1/vvVDo+i/b9vKnzFX3HtTI=;\n\tb=GBSLD3CyrmKElxLYv2huOxrvuyt9FWJN4pxjP8S/pwRukbO+w4wT35e1rY7xqBdis/\n\tzMy5EMb0pCBrAPLUG2ts0l1jqwJeVfrwYVUuLZAhyiZ2RYQZUXv7lQnzQvRn5AI3tMeA\n\tAY5SnsgIYC+QD78v+uyzxLNywU8X2NwhXJZHucWm0hJ97f3T2q5xsKKuJvy9L1XTN1wU\n\tJbPdUKqAbt66/Bd35iEc5ZIjLrsajH/Yslz4jzSphL4ZXhS4ukznKMrHejBRH3CrGX/M\n\t+bp43GaPnXoGsNtuOyYOP1gip00J8ER9+ZrGTJeQOgIO9V3nJfcfVNyL9qUpv5sxwEPo\n\tIV2Q==","X-Gm-Message-State":"AHPjjUhuwzCH68qWu8ffObryYlxZ96qglOihv+dCcazCPGE+yIC3ogqY\n\tc8gb6O/PvUcnwbyED1w+7sWpkUhqCHZ7fw8=","X-Google-Smtp-Source":"ADKCNb7skR+Hi46wZX+8l2zzjHyJUrG6hBxadkxO5SGUqMmss6UEH/lwJeCb/9gl/53cFmoFbjVRLdhobpMb1Jbn+Sg=","X-Received":"by 10.107.46.20 with SMTP id i20mr1390711ioo.192.1504546227107; \n\tMon, 04 Sep 2017 10:30:27 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<nycvar.YSQ.7.76.1709041311230.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-17-ard.biesheuvel@linaro.org>\n\t<nycvar.YSQ.7.76.1709041311230.8603@knanqh.ubzr>","From":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Date":"Mon, 4 Sep 2017 18:30:26 +0100","Message-ID":"<CAKv+Gu_wgTk0GdPiR5qvTDXqiX+ZUJ_s7Zs68i2Z4VHW+CcXyQ@mail.gmail.com>","Subject":"Re: [PATCH v2 16/29] ARM: kernel: switch to relative exception\n\ttables","To":"Nicolas Pitre <nicolas.pitre@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_103048_007699_E80DE8C7 ","X-CRM114-Status":"GOOD (  12.05  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:234 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>,\n\tKernel Hardening <kernel-hardening@lists.openwall.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762826,"web_url":"http://patchwork.ozlabs.org/comment/1762826/","msgid":"<nycvar.YSQ.7.76.1709041326130.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:03:00","subject":"Re: [PATCH v2 17/29] ARM: kernel: use relative phys-to-virt patch\n\ttables","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace the contents of the __pv_table entries with relative references\n> so that we don't have to relocate them at runtime when running the KASLR\n> kernel. This ensures these quantities are invariant under runtime\n> relocation, which makes any cache maintenance after runtime relocation\n> unnecessary.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/include/asm/memory.h |  6 +++---\n>  arch/arm/kernel/head.S        | 21 ++++++++++----------\n>  2 files changed, 13 insertions(+), 14 deletions(-)\n> \n> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h\n> index 1f54e4e98c1e..47a984e3a244 100644\n> --- a/arch/arm/include/asm/memory.h\n> +++ b/arch/arm/include/asm/memory.h\n> @@ -195,7 +195,7 @@ extern const void *__pv_table_begin, *__pv_table_end;\n>  \t__asm__(\"@ __pv_stub\\n\"\t\t\t\t\\\n>  \t\"1:\t\" instr \"\t%0, %1, %2\\n\"\t\t\\\n>  \t\"\t.pushsection .pv_table,\\\"a\\\"\\n\"\t\t\\\n> -\t\"\t.long\t1b\\n\"\t\t\t\t\\\n> +\t\"\t.long\t1b - .\\n\"\t\t\t\\\n>  \t\"\t.popsection\\n\"\t\t\t\t\\\n\n[...]\n\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -612,22 +611,22 @@ __fixup_a_pv_table:\n>  \torr\tr6, r6, r7, lsl #12\n>  \torr\tr6, #0x4000\n>  \tb\t2f\n> -1:\tadd     r7, r3\n> -\tldrh\tip, [r7, #2]\n> +1:\tadd\tr7, r4\n> +\tldrh\tip, [r7, #-2]\n\nPlease use \"ldrh ip, [r7, #(-4 + 2)]\" so the -4 offset is clearly \nspelled out. The #-2 gave me a pause of confusion.\n\n>  ARM_BE8(rev16\tip, ip)\n>  \ttst\tip, #0x4000\n>  \tand\tip, #0x8f00\n>  \torrne\tip, r6\t@ mask in offset bits 31-24\n>  \torreq\tip, r0\t@ mask in offset bits 7-0\n>  ARM_BE8(rev16\tip, ip)\n> -\tstrh\tip, [r7, #2]\n> +\tstrh\tip, [r7, #-2]\n\nDitto here.\n\n>  \tbne\t2f\n> -\tldrh\tip, [r7]\n> +\tldrh\tip, [r7, #-4]\n\nAnd to be clear, here I'd use \"#(-4 + 0)\" to be explicit.\n\n>  ARM_BE8(rev16\tip, ip)\n>  \tbic\tip, #0x20\n>  \torr\tip, ip, r0, lsr #16\n>  ARM_BE8(rev16\tip, ip)\n> -\tstrh\tip, [r7]\n> +\tstrh\tip, [r7, #-4]\n\nAnd so here.\n\n\nWith that:\n\nReviewed-by: Nicolas Pitre <nico@linaro.org>\n\n\n>  2:\tcmp\tr4, r5\n>  \tldrcc\tr7, [r4], #4\t@ use branch for delay slot\n>  \tbcc\t1b\n> @@ -639,7 +638,8 @@ ARM_BE8(rev16\tip, ip)\n>  \tmoveq\tr0, #0x400000\t@ set bit 22, mov to mvn instruction\n>  #endif\n>  \tb\t2f\n> -1:\tldr\tip, [r7, r3]\n> +1:\tldr\tip, [r7, r4]!\n> +\tadd\tr4, r4, #4\n>  #ifdef CONFIG_CPU_ENDIAN_BE8\n>  \t@ in BE8, we load data in BE, but instructions still in LE\n>  \tbic\tip, ip, #0xff000000\n> @@ -654,9 +654,9 @@ ARM_BE8(rev16\tip, ip)\n>  \tbiceq\tip, ip, #0x400000\t@ clear bit 22\n>  \torreq\tip, ip, r0\t@ mask in offset bits 7-0\n>  #endif\n> -\tstr\tip, [r7, r3]\n> +\tstr\tip, [r7]\n>  2:\tcmp\tr4, r5\n> -\tldrcc\tr7, [r4], #4\t@ use branch for delay slot\n> +\tldrcc\tr7, [r4]\t@ use branch for delay slot\n>  \tbcc\t1b\n>  \tret\tlr\n>  #endif\n> @@ -664,7 +664,6 @@ ENDPROC(__fixup_a_pv_table)\n>  \n>  ENTRY(fixup_pv_table)\n>  \tstmfd\tsp!, {r4 - r7, lr}\n> -\tmov\tr3, #0\t\t\t@ no offset\n>  \tmov\tr4, r0\t\t\t@ r0 = table start\n>  \tadd\tr5, r0, r1\t\t@ r1 = table size\n>  \tbl\t__fixup_a_pv_table\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"bR+J5mFY\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"DhbOIVln\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmHlR5HClz9s7h\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:03:31 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovia-0006Ye-FR; Mon, 04 Sep 2017 18:03:28 +0000","from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1doviW-0006V5-Jm for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:03:26 +0000","by mail-io0-x235.google.com with SMTP id i200so3866186ioa.2\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:03:03 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tv81sm538118itc.18.2017.09.04.11.03.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:03:01 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=jy4/Z/fIhAb9c+tb/HoIiNTgAOP1yhyXYEcdJ5kOBvw=;\n\tb=bR+J5mFYoiGLyh\n\thcCXJ/wyiStAwQRmGn4496krlkZ4S2A13m7GV4suJ+ejlFNH5bVtBBkSjV2+3Z03rygQYzQFDGwni\n\tWQMnORea99YJorlp/XYcfysEKBUqCnbUdpC1wd05b33Q79XsgACHkL7XaZVQIH+8pDAC5SaBE1Nuk\n\tv6rbeGhnZuPFpfWyegmCFIjexPuk+INeiAbT7Fn7d9jNNW2gkRkBurDvwBnUU9ku6UPnVhQbfSAmn\n\tD66gA6SQ2vQ8Y5BGxSJrnCDSaexsANKEI49HVBDfvgbGepCJ0hxw/ozwFiOmUGcLM8yCNEJL+d/bN\n\tWfUsC1UnFAivABJDeUDw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=7vIKwRDmgYs9WxkwOnnjzqP4YghcGcFplZ/sgYa26AE=;\n\tb=DhbOIVlniGgi4ImRECKn4dScfTCT+dxGBiFBdxIfS1t//L+U6fOM1ClYWRaazj68li\n\t/t2yY/ah/owC2BL68B4lzi+KWoX3y5ajPgCJQyP+HNI5TKc3yMtlmo9EBAaPh0QpkJZP\n\tZo1nkj3NEldcsnD/P5E5DLVoCbw/5XtHLXyPo="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=7vIKwRDmgYs9WxkwOnnjzqP4YghcGcFplZ/sgYa26AE=;\n\tb=bqtJ2wAPvUYemFZs7NIx7if6LOvEPCS/3Mn0ZTO0wYj9QorHVuB5HgjhlIba5i7kUI\n\t9fhuYUNLpG+SYhz0/Jd2kG37tqkDLTtEnSQrQXU3bhbGrj3+qaEI2qZCcDAfBX8qEDjZ\n\tiNbqzBcS2loKbhSqr3iOiVD8SDRl10u/M3zsK3iW56VRWt2UluHwMrFes/76k985n30s\n\tRE27E8tnECiyhdq6fvPPYSJUTFRhNkFHWPt1B+u+713b/wV1mK5yI4qMZZt0wTavwI+l\n\tcTHqdyYb+aGSP/YZ/76W6lWOc8xaDLAKoVQAq5H+WMUD8MFtyNbGkx0f/jflDHwXmXDt\n\to5Uw==","X-Gm-Message-State":"AHPjjUjzqyJdHHu4WQfSr5AHRQYuLhgpANKrlsa2IZmxrPQK8O85S96j\n\tGuickDGIHoNsrhkh","X-Google-Smtp-Source":"ADKCNb6s0/IptDcqTROz9TK0/oFFrN6A5EpNo3TAkCHE/7DFSo3Dm5miGn+zAU59O2T7F5CzWQIX0A==","X-Received":"by 10.107.78.7 with SMTP id c7mr1666453iob.298.1504548182788;\n\tMon, 04 Sep 2017 11:03:02 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:03:00 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 17/29] ARM: kernel: use relative phys-to-virt patch\n\ttables","In-Reply-To":"<20170903120757.14968-18-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041326130.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-18-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_110324_882616_45A7BFF9 ","X-CRM114-Status":"GOOD (  16.01  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:235 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762828,"web_url":"http://patchwork.ozlabs.org/comment/1762828/","msgid":"<nycvar.YSQ.7.76.1709041409530.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:11:30","subject":"Re: [PATCH v2 19/29] ARM: kernel: make vmlinux buildable as a PIE\n\texecutable","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Update the build flags and linker script to allow vmlinux to be built\n> as a PIE  binary, which retains relocation information about absolute\n> symbol references so that they can be fixed up at runtime. This will\n> be used for implementing KASLR,\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/Kconfig                 |  4 ++++\n>  arch/arm/Makefile                |  5 +++++\n>  arch/arm/include/asm/assembler.h |  2 +-\n>  arch/arm/kernel/vmlinux.lds.S    |  9 +++++++++\n>  include/linux/hidden.h           | 20 ++++++++++++++++++++\n>  scripts/module-common.lds        |  1 +\n>  6 files changed, 40 insertions(+), 1 deletion(-)\n> \n> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig\n> index 61a0cb15067e..300add3b8023 100644\n> --- a/arch/arm/Kconfig\n> +++ b/arch/arm/Kconfig\n> @@ -2085,6 +2085,10 @@ config DMI\n>  \t  firmware need to be enabled. This would require the DMI subsystem\n>  \t  to be enabled much earlier than we do on ARM, which is non-trivial.\n>  \n> +config RELOCATABLE\n> +\tbool\n> +\tselect HAVE_ARCH_PREL32_RELOCATIONS\n> +\n\nYou should probably make it depend on !XIP_KERNEL.\n\nOther than that\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n\n>  \n>  menu \"CPU Power Management\"\n> diff --git a/arch/arm/Makefile b/arch/arm/Makefile\n> index 47d3a1ab08d2..8544c8148b9f 100644\n> --- a/arch/arm/Makefile\n> +++ b/arch/arm/Makefile\n> @@ -52,6 +52,11 @@ AS\t\t+= -EL\n>  LD\t\t+= -EL\n>  endif\n>  \n> +ifeq ($(CONFIG_RELOCATABLE),y)\n> +KBUILD_CFLAGS\t\t+= -fpic -include $(srctree)/include/linux/hidden.h\n> +LDFLAGS_vmlinux\t\t+= -pie -shared -Bsymbolic\n> +endif\n> +\n>  #\n>  # The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and\n>  # later may result in code being generated that handles signed short and signed\n> diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h\n> index ae43859a9000..0586e1c77a80 100644\n> --- a/arch/arm/include/asm/assembler.h\n> +++ b/arch/arm/include/asm/assembler.h\n> @@ -555,7 +555,7 @@ THUMB(\torr\t\\reg , \\reg , #PSR_T_BIT\t)\n>  \t * mov_l - move a constant value or [relocated] address into a register\n>  \t */\n>  \t.macro\t\tmov_l, dst:req, imm:req\n> -\t.if\t\t__LINUX_ARM_ARCH__ < 7\n> +\t.if\t\tCONFIG_RELOCATABLE == 1 || __LINUX_ARM_ARCH__ < 7\n>  \tldr\t\t\\dst, =\\imm\n>  \t.else\n>  \tmovw\t\t\\dst, #:lower16:\\imm\n> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S\n> index c83a7ba737d6..5853d4be2067 100644\n> --- a/arch/arm/kernel/vmlinux.lds.S\n> +++ b/arch/arm/kernel/vmlinux.lds.S\n> @@ -89,6 +89,9 @@ SECTIONS\n>  #endif\n>  \t\t*(.discard)\n>  \t\t*(.discard.*)\n> +\t\t*(.ARM.exidx.discard.text)\n> +\t\t*(.interp .dynamic)\n> +\t\t*(.dynsym .dynstr .hash)\n>  \t}\n>  \n>  \t. = PAGE_OFFSET + TEXT_OFFSET;\n> @@ -209,6 +212,12 @@ SECTIONS\n>  \t\t__smpalt_end = .;\n>  \t}\n>  #endif\n> +\t.rel.dyn : ALIGN(8) {\n> +\t\t__rel_begin = .;\n> +\t\t*(.rel .rel.* .rel.dyn)\n> +\t}\n> +\t__rel_end = ADDR(.rel.dyn) + SIZEOF(.rel.dyn);\n> +\n>  \t.init.pv_table : {\n>  \t\t__pv_table_begin = .;\n>  \t\t*(.pv_table)\n> diff --git a/include/linux/hidden.h b/include/linux/hidden.h\n> new file mode 100644\n> index 000000000000..781fb6f0c742\n> --- /dev/null\n> +++ b/include/linux/hidden.h\n> @@ -0,0 +1,20 @@\n> +/*\n> + * GCC assumes that we are building shared libraries or hosted binaries\n> + * when the -fpic or -fpie switches are used. This results in all references\n> + * to symbols with external linkage to be redirected via entries in the global\n> + * offset table (GOT), which keeps .text pages clean and reduces the footprint\n> + * of CoWed dirty pages to the GOT itself. It also allows symbol preemption,\n> + * which is mandatory under ELF rules for shared libraries.\n> + *\n> + * For the kernel, we use PIC so that we can relocate the executable image at\n> + * runtime. This does not involve CoW or symbol preemption, and we'd rather\n> + * have relative references instead of absolute ones whenever possible.\n> + * So set the default visibility to hidden: this informs the compiler that\n> + * none of our symbols will ever be exported from a shared library, allowing\n> + * it to use relative references where possible.\n> + *\n> + * Note that simply passing -fvisibility=hidden is not sufficient to achieve\n> + * this: In that case, definitions will be marked hidden, but declarations\n> + * will not, and we still end up with GOT entries unnecessarily.\n> + */\n> +#pragma GCC visibility push(hidden)\n> diff --git a/scripts/module-common.lds b/scripts/module-common.lds\n> index d61b9e8678e8..55bb41f32c8a 100644\n> --- a/scripts/module-common.lds\n> +++ b/scripts/module-common.lds\n> @@ -7,6 +7,7 @@ SECTIONS {\n>  \t/DISCARD/ : {\n>  \t\t*(.discard)\n>  \t\t*(.discard.*)\n> +\t\t*(*.discard.*)\n>  \t}\n>  \n>  \t__ksymtab\t\t0 : { *(SORT(___ksymtab+*)) }\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"oXOxZj9C\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"kpXbJGm7\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmHxM6P79z9sR9\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:12:04 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovqp-0002Tc-0J; Mon, 04 Sep 2017 18:11:59 +0000","from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovqk-0002Rk-Ei for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:11:56 +0000","by mail-io0-x232.google.com with SMTP id 8so776927ioz.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:11:32 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\to76sm518222ith.26.2017.09.04.11.11.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:11:31 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=MYknN4n+P7eHqU+fVFfdNcETLuYANdV6eYs9CyMZVrQ=;\n\tb=oXOxZj9CvIshfA\n\tBv2c0fRuFcQ29fEOFgplF7WXh3gDj63AHLt3DkYRwH3tRhjvOxBdmm3YibAfC55pXmjqRWYxHdD0E\n\tDkv4N2lI8b6M24DU993AtLwnIIEjKzwVcLZUDC7rZWhhVM+gMBSgBB0hpvQMmMp3w0oDdCfdSV8BR\n\tOHaQE0FZ/71GbOqpWMTtzuEc/8ceSdW9+c3mhvb4oFxZ9OewzMGjh+wp+lz+eUlGnvoFeTKl0R5h+\n\tYQiaige4UmCAw80gPPsbt/k7H3dlWW3dcoUduLirxro/m7eN9D7BM6SaZa3mjPPA8ySRj0SQqf2PH\n\t6DPENgx9VRsFmTokyD8w==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=gj7WRvzFmX2um8FgPSXXUEfAd+rPmj7e8Xws9wfDk5U=;\n\tb=kpXbJGm7m6myYGnEQe/dPixkp2OQ81SFNCu4kiJ5K7SSVA4eHLeyx9gp9ojHSSmqTX\n\tbqEx8stnt3UKJ0LXxfIouBclN6hMldS5PsiGhnLHeRK6yDrqn+ho+tL+n3Ecu9HUOnf1\n\tZrG1O4FtsloWSpMoCZ2DZnyVX26F0Y1qPwg7k="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=gj7WRvzFmX2um8FgPSXXUEfAd+rPmj7e8Xws9wfDk5U=;\n\tb=KdMGE+y8zVAPKJuVBrIl+337phrwe6NpYPKOIhG8UTznCVm/z9kbEHlGr+y0aMMcg4\n\t/r7vHcUDmSpDqhURkrXvB9Ml2naSGjbEIaDnRPaHGfnKHaXycuo/v4FMMTQZElJHfSRc\n\tADrGvI53YPGwzVSuUsWsc/5/sALs/rXYT6ey/Vbl1skId8RwScTcl7MAt1qanZ30yNu6\n\twhp4UBx3WYhqzos6tRksRwRgmEziPnsHcN0R9caL8ZCZNCCiEAl34Am+V5rz/eRZR+2c\n\tSLf8bRIEVcC+XceI7MDOlUojloG+oXPSqypRQNWsKZJX6ICqly5qZJp9e1jXYklsKWOa\n\t37Uw==","X-Gm-Message-State":"AHPjjUjK9u/WStahYNLjOlHbOzf6fqforb2Q3TLZXqGzqodwZh+Ir3Uh\n\tvd2Sj7zTOLduXFq/","X-Google-Smtp-Source":"ADKCNb7WwDb9x/A3+Zdk9pkQvlKohsyPESe37TgUfF8sL1A/ByuqhAU+GsZaULtB/JlTtw6CnTzVnw==","X-Received":"by 10.107.53.17 with SMTP id c17mr1406944ioa.117.1504548692228; \n\tMon, 04 Sep 2017 11:11:32 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:11:30 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 19/29] ARM: kernel: make vmlinux buildable as a PIE\n\texecutable","In-Reply-To":"<20170903120757.14968-20-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041409530.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-20-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_111154_755914_D12E841C ","X-CRM114-Status":"GOOD (  26.09  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:232 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762829,"web_url":"http://patchwork.ozlabs.org/comment/1762829/","msgid":"<nycvar.YSQ.7.76.1709041412160.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:15:02","subject":"Re: [PATCH v2 20/29] ARM: kernel: use PC-relative symbol references\n\tin MMU switch code","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> To prepare for adding support for KASLR, which relocates all absolute\n> symbol references at runtime after the caches have been enabled,\n> update the MMU switch code to avoid using absolute symbol references\n> where possible. This ensures these quantities are invariant under\n> runtime relocation.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/kernel/head-common.S | 39 ++++++++------------\n>  1 file changed, 15 insertions(+), 24 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S\n> index 06035488130c..b74477507a12 100644\n> --- a/arch/arm/kernel/head-common.S\n> +++ b/arch/arm/kernel/head-common.S\n> @@ -79,9 +79,10 @@ ENDPROC(__vet_atags)\n>   */\n>  \t__INIT\n>  __mmap_switched:\n> -\tadr\tr3, __mmap_switched_data\n> -\n> -\tldmia\tr3!, {r4, r5, r6, r7}\n> +\tadr_l\tr4, __data_loc\n> +\tadr_l\tr5, _sdata\n> +\tadr_l\tr6, __bss_start\n> +\tadr_l\tr7, _end\n>  \tcmp\tr4, r5\t\t\t\t@ Copy data segment if needed\n>  1:\tcmpne\tr5, r6\n>  \tldrne\tfp, [r4], #4\n> @@ -93,9 +94,17 @@ __mmap_switched:\n>  \tstrcc\tfp, [r6],#4\n>  \tbcc\t1b\n>  \n> - ARM(\tldmia\tr3, {r4, r5, r6, r7, sp})\n> - THUMB(\tldmia\tr3, {r4, r5, r6, r7}\t)\n> - THUMB(\tldr\tsp, [r3, #16]\t\t)\n> +\tadr_l\tr3, init_thread_union + THREAD_START_SP\n> +\tmov\tsp, r3\n> +\tadr_l\tr4, processor_id\n> +\tadr_l\tr5, __machine_arch_type\n> +\tadr_l\tr6, __atags_pointer\n> +#ifdef CONFIG_CPU_CP15\n> +\tadr_l\tr7, cr_alignment\n> +#else\n> +\tmov\tr7, #0\n> +#endif\n\nThe code that follows is testing for a non-zero r7 value to store r0 so \nyou could make that code conditional rather than loading 0 here.\n\n> +\n>  \tstr\tr9, [r4]\t\t\t@ Save processor ID\n>  \tstr\tr1, [r5]\t\t\t@ Save machine type\n>  \tstr\tr2, [r6]\t\t\t@ Save atags pointer\n> @@ -104,24 +113,6 @@ __mmap_switched:\n>  \tb\tstart_kernel\n>  ENDPROC(__mmap_switched)\n>  \n> -\t.align\t2\n> -\t.type\t__mmap_switched_data, %object\n> -__mmap_switched_data:\n> -\t.long\t__data_loc\t\t\t@ r4\n> -\t.long\t_sdata\t\t\t\t@ r5\n> -\t.long\t__bss_start\t\t\t@ r6\n> -\t.long\t_end\t\t\t\t@ r7\n> -\t.long\tprocessor_id\t\t\t@ r4\n> -\t.long\t__machine_arch_type\t\t@ r5\n> -\t.long\t__atags_pointer\t\t\t@ r6\n> -#ifdef CONFIG_CPU_CP15\n> -\t.long\tcr_alignment\t\t\t@ r7\n> -#else\n> -\t.long\t0\t\t\t\t@ r7\n> -#endif\n> -\t.long\tinit_thread_union + THREAD_START_SP @ sp\n> -\t.size\t__mmap_switched_data, . - __mmap_switched_data\n> -\n>  /*\n>   * This provides a C-API version of __lookup_processor_type\n>   */\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"ENX63ynk\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"IrU3b9vi\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJ1J0BDVz9sR9\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:15:32 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovuC-0004Ft-Vq; Mon, 04 Sep 2017 18:15:28 +0000","from mail-io0-x229.google.com ([2607:f8b0:4001:c06::229])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dovu9-0003TB-Bt for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:15:26 +0000","by mail-io0-x229.google.com with SMTP id 8so815100ioz.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:15:05 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tu128sm566219itd.41.2017.09.04.11.15.03\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:15:03 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=AipUxPGunDM/IyKxWEKJ9j0+ZSS9ixivuW0+2RHcRg8=;\n\tb=ENX63ynknrnNut\n\t6bLQn7L5TjTnUbJf7l3UKBh5ivdty7jET4JLyS126V3xgsNH+zIvSiVApq05JYNgP/Zc/KbEoiDLA\n\tSNAiAp2bIos4Ua2VVQwO2PZn1tvqjOmevdGvxjloNwRI9VI4PIsAbKqY0BLvgaSIdkIm22U/ORh1U\n\tUoi2oksMUcw2p2s7w8rat9Hwu0x4wsuUYXXiR9sdwT23LxmqPXNqeK+qRwYiRwQjIIlxLLYLsp03x\n\t48007vMP/CTWmHa7Di2zuY5ti3r/6E6NVXzElOWUVRwHN5jz6bVRzXz7OZLFf3GX5OZqCIEWjBWqv\n\t87OUEF4XgGztQXcA/amg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=wCKuTvzLRH5BWpAACbndYjRdxIeBXhRorOw3++lyrqE=;\n\tb=IrU3b9viws+02T9EGkmlrZon6ntFGMtLUdHVi8O1rfXK97iwCJYsnLR3NqkE4IuQ8r\n\t5svCZVjQzjIBR4Y+PZQ52qCqebJQY+ojoEpmfO09yIsj3E/+Nl8UyOQkYO0JYbLBXl/1\n\tcKDxJ5dZ6PUJT9FLcjCX2OoB65/aiw6S7x1No="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=wCKuTvzLRH5BWpAACbndYjRdxIeBXhRorOw3++lyrqE=;\n\tb=Luhpb/pFv4i+7ONORm86UwiTnfMwof/8fW/+dorm4bzYm+lPnu8HGZlH4MG+0NDTQZ\n\t0RsdDJMxpR2SOb+XQdvcc89DDkObzAze/fJa+p7nOFd7f5C1gPp7Sz1l1KrIGItgOm6s\n\t8O7bU2j4+ERJrBxk/QHFaKZvEQCJcXAGV508Lzcx3dzLP9/b3HlARsTlMUneTEzsut6X\n\tTlfIAIBvvJSmFcV0rj6xvDwe/15H5VSzyLBv2acBWYXPLLLjAo4EbLQ4evJXjky7DYWv\n\tQJcoZPt00vcN9kcS9OtVHYv3Qg8C9CMhr/piqsiKjAFoBsIpeZnWwG1A/UcOOvA+CiZC\n\tzp4g==","X-Gm-Message-State":"AHPjjUhGuMRklIKWdYtfEJ3dkHbT36fy5aJgE9s2uZpBEDud9N1hLiNp\n\tD3ZVJrnuRJpONCnw","X-Google-Smtp-Source":"ADKCNb717XtjgPT5lkOrUbD4Uk1pgeAihATyJnWW3nCmtbH1S1e6mGDR7Q4wj3jdBfg2+h46yl+N2g==","X-Received":"by 10.36.122.69 with SMTP id a66mr1744968itc.159.1504548904523; \n\tMon, 04 Sep 2017 11:15:04 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:15:02 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 20/29] ARM: kernel: use PC-relative symbol references\n\tin MMU switch code","In-Reply-To":"<20170903120757.14968-21-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041412160.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-21-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_111525_457198_58BDDDDA ","X-CRM114-Status":"GOOD (  15.16  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762831,"web_url":"http://patchwork.ozlabs.org/comment/1762831/","msgid":"<nycvar.YSQ.7.76.1709041417250.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:24:36","subject":"Re: [PATCH v2 21/29] ARM: kernel: use PC relative symbol references\n\tin suspend/resume code","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Replace some unnecessary absolute references with relative ones. Also,\n> to prepare for runtime relocation, which occurs with the caches on,\n> defer taking the absolute address of cpu_resume_after_mmu() until after\n> the MMU is enabled.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nWhat's the point of that last hunk? I understand you load the address \nafter the mMU is on. But you should be coming back from a sleep and \ncaches ought to be clean at that point. Not that it is a bad thing to do \nbut I don't understand your reason for it.\n\n\n> ---\n>  arch/arm/kernel/sleep.S | 9 ++++-----\n>  1 file changed, 4 insertions(+), 5 deletions(-)\n> \n> diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S\n> index f4920b5d0fc4..5b02744f2f12 100644\n> --- a/arch/arm/kernel/sleep.S\n> +++ b/arch/arm/kernel/sleep.S\n> @@ -60,15 +60,14 @@\n>  ENTRY(__cpu_suspend)\n>  \tstmfd\tsp!, {r4 - r11, lr}\n>  #ifdef MULTI_CPU\n> -\tldr\tr10, =processor\n> -\tldr\tr4, [r10, #CPU_SLEEP_SIZE] @ size of CPU sleep state\n> +\tldr_l\tr4, processor + CPU_SLEEP_SIZE\t@ size of CPU sleep state\n>  #else\n> -\tldr\tr4, =cpu_suspend_size\n> +\tadr_l\tr4, cpu_suspend_size\n>  #endif\n>  \tmov\tr5, sp\t\t\t@ current virtual SP\n>  \tadd\tr4, r4, #12\t\t@ Space for pgd, virt sp, phys resume fn\n>  \tsub\tsp, sp, r4\t\t@ allocate CPU state on stack\n> -\tldr\tr3, =sleep_save_sp\n> +\tadr_l\tr3, sleep_save_sp\n>  \tstmfd\tsp!, {r0, r1}\t\t@ save suspend func arg and pointer\n>  \tldr\tr3, [r3, #SLEEP_SAVE_SP_VIRT]\n>  \tALT_SMP(W(nop))\t\t\t@ don't use adr_l inside ALT_SMP()\n> @@ -101,13 +100,13 @@ ENDPROC(cpu_suspend_abort)\n>  \t.align\t5\n>  \t.pushsection\t.idmap.text,\"ax\"\n>  ENTRY(cpu_resume_mmu)\n> -\tldr\tr3, =cpu_resume_after_mmu\n>  \tinstr_sync\n>  \tmcr\tp15, 0, r0, c1, c0, 0\t@ turn on MMU, I-cache, etc\n>  \tmrc\tp15, 0, r0, c0, c0, 0\t@ read id reg\n>  \tinstr_sync\n>  \tmov\tr0, r0\n>  \tmov\tr0, r0\n> +\tldr\tr3, =cpu_resume_after_mmu\n>  \tret\tr3\t\t\t@ jump to virtual address\n>  ENDPROC(cpu_resume_mmu)\n>  \t.popsection\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"mW8a9sBq\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"BQeERZi6\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJDL66p2z9sP3\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:25:06 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow3T-0007l1-ON; Mon, 04 Sep 2017 18:25:03 +0000","from mail-io0-x22d.google.com ([2607:f8b0:4001:c06::22d])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow3P-0007Yi-SA for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:25:02 +0000","by mail-io0-x22d.google.com with SMTP id z67so4100558iof.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:24:39 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tg39sm2979386ioj.38.2017.09.04.11.24.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:24:37 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=egMa4+KI3R431FyDIoGpHqQG+Dlayx4Ng7S8QWmH1iw=;\n\tb=mW8a9sBqnw4lDM\n\tqwZvuIUelFHMMm+eZzhoa434fkd+ywzmq5IXxCt5jy0PwYuxFXlfyRgKTTxz7MA11r7K0kAEJOeks\n\tE+SxStFYg+Dy+e8FFDJjadXDdIIftJmD5XtPx3mQkFds6aDSWRYgWveXAWWvoQMr8b8OZR4B1zncj\n\tAuIwARFEp33CR5c4v5lYYwG/3hPDiyk8H9UJ8+IHD6bNy6evm9Z4VPX4ryCNIMJCtl/+LhsxUZ59M\n\tcpe89J/BOJMHIMpQoe0UTzohjIfe2bKNB+U5nO7B8A9EZGRSDJ8X9JmtKJhFG+7uiOwr3uvZYvy2Q\n\toNwmxTq99QyIw09+JhuA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=bqInvFWyJmwF8dgHFtaJJjSE6DIbOt7zfZF5ABL8rNE=;\n\tb=BQeERZi6SCoxfkoSa+4GIGWPuvDOsfc8DPcFzbs+91VEkbxdce1+TCBpxownenzwPC\n\tL1RAbAn9Uk6HgqoQa5xSDbokTHw092mGhhHDEUUTu68oA2mZ2qrbtfleUnu0Q5jSf7Ej\n\tvQQgnsp9p9pHTgKZG9La5l7+vn55URNesFKL0="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=bqInvFWyJmwF8dgHFtaJJjSE6DIbOt7zfZF5ABL8rNE=;\n\tb=a7IUODIkMX0m2QeOVLJF4tCe5ctNq2JZBRY43zjkJ4OLh7uzeWXLZjCTTUU7VSLVDl\n\tdr8jggxIUNvRPM2rYga0i5WNBB+q/WqbTHTmj9ACUl7QSko1TYNVEvFh2GGRplqwzTXo\n\tm0Nz/M2shiH1Wi2+8/vUd/lKyerNZgWwChUfvtAYmR/sQ+y8NE5hdxuT4STnU/PwtUx+\n\tG6hEQblz1m3GDdjucjQv7ogB9MTZ77vcqzJ3bt6wIkXdpzqPYq9nnEFdHwQJ7Dij7mAl\n\tP/zabdEZ22Phm4B18XueWTP0dR4Fx265QQCnGmHxCPcz7VIoEo5yPikgQsOnJLMYzLam\n\tBJDA==","X-Gm-Message-State":"AHPjjUjrbEcnD0FZ4Ihd+JG13/f/8H0HBI7r6GQfiiXE/5qMDjAuHdVe\n\twLGKWO1iwvJ+9eAz","X-Google-Smtp-Source":"ADKCNb4Hb2A64dLOyoAChJfrUHV0DoesWu+8PyAurK4EfcegYh3XB4qpMeRKGXNX9/txqJaHAd8WcA==","X-Received":"by 10.107.187.135 with SMTP id\n\tl129mr1487475iof.284.1504549478679; \n\tMon, 04 Sep 2017 11:24:38 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:24:36 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 21/29] ARM: kernel: use PC relative symbol references\n\tin suspend/resume code","In-Reply-To":"<20170903120757.14968-22-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041417250.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-22-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_112459_956133_C0540CAC ","X-CRM114-Status":"GOOD (  16.50  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22d listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762832,"web_url":"http://patchwork.ozlabs.org/comment/1762832/","msgid":"<nycvar.YSQ.7.76.1709041424570.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:25:13","subject":"Re: [PATCH v2 22/29] ARM: mm: export default vmalloc base address","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> In order for the EFI stub to be able to decide over what range to\n> randomize the load address of the kernel, expose the definition of\n> the default vmalloc base address as VMALLOC_DEFAULT_BASE.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/include/asm/pgtable.h | 1 +\n>  arch/arm/mm/mmu.c              | 3 +--\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h\n> index 1c462381c225..a0d4a63a6516 100644\n> --- a/arch/arm/include/asm/pgtable.h\n> +++ b/arch/arm/include/asm/pgtable.h\n> @@ -45,6 +45,7 @@\n>  #define VMALLOC_OFFSET\t\t(8*1024*1024)\n>  #define VMALLOC_START\t\t(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))\n>  #define VMALLOC_END\t\t0xff800000UL\n> +#define VMALLOC_DEFAULT_BASE\t(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET)\n>  \n>  #define LIBRARY_TEXT_START\t0x0c000000\n>  \n> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c\n> index e46a6a446cdd..566f7e657931 100644\n> --- a/arch/arm/mm/mmu.c\n> +++ b/arch/arm/mm/mmu.c\n> @@ -1128,8 +1128,7 @@ void __init debug_ll_io_init(void)\n>  }\n>  #endif\n>  \n> -static void * __initdata vmalloc_min =\n> -\t(void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET);\n> +static void * __initdata vmalloc_min = (void *)VMALLOC_DEFAULT_BASE;\n>  \n>  /*\n>   * vmalloc=size forces the vmalloc area to be exactly 'size'\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"e5urKQvs\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"QbblzTi2\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJF353sfz9sPk\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:25:43 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow44-0000fS-EF; Mon, 04 Sep 2017 18:25:40 +0000","from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow40-000061-Fw for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:25:38 +0000","by mail-io0-x22f.google.com with SMTP id q64so4075580iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:25:16 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tx6sm586567itd.22.2017.09.04.11.25.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:25:15 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=wvi6Jbo/UF+rJD1993zBeSRNpHURqIBGNYNr7GGm6Yo=;\n\tb=e5urKQvs6RfAF+\n\tb+ckbZOwK9rJbsbw+zTCCHDILGUE8pVESzowFNTC3SGmUhfXVbH6krdrBYb4X94JrR5bVWoC0nUQP\n\tbTQAA1/Qi+Pb6c2tVoAIN2k3R0g/bxFLzIEEGY9ja1tR9UwqI3pOT0PTdgsMVrCFs0phvZUqTsTih\n\tVLqXDvtFYqUolCetP2K2Sp4DAionPkja+xSnHV6LdP12fLjbQRlLcbO0YyhTELug0QAFkFHlZYhR+\n\tKiNL0T6a/Qg6D+0D35pfYMtHn+PamF25T7SHIoc4/4Db8gbxQoojWduUHJjQ77H4c3HE+FAGj/rDM\n\to1Z8dGIZBBkO5OdWiHuQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=HsNT7VdjwKmhv/CQWYzQbVXnzNnaN8Py3M55s9YrYRc=;\n\tb=QbblzTi2ECZ8wvxvWCyK8GqpQXm6YF2ivlUO+qifeSjL4LW2yV1X2V/RDlwtgS+czD\n\tmWkeEGagNpNJm+w0YsDqk+WTWxLOkDr3ov+XUipUatHZynmcVR6FyZZfqjWOcQVtZft/\n\tU8AngMpCBVAoJlaCS2Rnm3xn3clp/Pe+lgRgw="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=HsNT7VdjwKmhv/CQWYzQbVXnzNnaN8Py3M55s9YrYRc=;\n\tb=Z+NrYeXtvitTjGCIIzeDjmxhBnfMLlppetgpIEUy3icxWx4BU/1zEPvIO4vOXO56OS\n\tR3YRXHV8G4euPutR7MlQw9bQ+zyoGQUKW7WyjE/GU94I70iDgNHTdrSSpxnhiOVSbN9U\n\t3HnQDSAJqJkH9VFkhe5i2wsE7cDyVsDhB1opJkiR5N4teh69NzC2U8Bc/HExLpKOTf00\n\tAssHI+YQ5BThuB7i6GRs2MiBo5jsXtnlebcmD3E5XZF0q0QG1WxiN+DD3CZ6cW9tZ+xB\n\tfILLIoqWekB5FEzm0HP25731x+hpPkkwo1B7zAj+uRdf42++raf0ARKf6SvoKePOkeqb\n\tZ2rQ==","X-Gm-Message-State":"AHPjjUgce3VAlkCH8SeYwZrRGhWslH/lWsfqQ7kp8DjguOnh0nnVhvln\n\tuoaPFHqEoSxkfudz","X-Google-Smtp-Source":"ADKCNb7Z5xC2kyOjkWu2vsFgoqKjP9uw1qoFr8Bu/7Dvt/1hMKouWgwjqbDjYcbEQz/oqfz65GC2ww==","X-Received":"by 10.107.178.141 with SMTP id b135mr1804522iof.46.1504549515609;\n\tMon, 04 Sep 2017 11:25:15 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:25:13 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 22/29] ARM: mm: export default vmalloc base address","In-Reply-To":"<20170903120757.14968-23-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041424570.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-23-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_112536_686601_C5176A15 ","X-CRM114-Status":"GOOD (  16.22  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22f listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762834,"web_url":"http://patchwork.ozlabs.org/comment/1762834/","msgid":"<nycvar.YSQ.7.76.1709041427300.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:30:13","subject":"Re: [PATCH v2 23/29] ARM: kernel: refer to swapper_pg_dir via its\n\tsymbol","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> The location of swapper_pg_dir is relative to the kernel, not to\n> PAGE_OFFSET or PHYS_OFFSET. So define the symbol relative to the\n> start of the kernel image, and refer to it via its name.\n\nCould it cause a section access mismatch if defined in the __HEAD \nsection?\n\nOtherwise\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/kernel/head.S | 13 ++++---------\n>  1 file changed, 4 insertions(+), 9 deletions(-)\n> \n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index 5d685e86148c..71bc0d037bc9 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -48,14 +48,6 @@\n>  #define PMD_ORDER\t2\n>  #endif\n>  \n> -\t.globl\tswapper_pg_dir\n> -\t.equ\tswapper_pg_dir, KERNEL_RAM_VADDR - PG_DIR_SIZE\n> -\n> -\t.macro\tpgtbl, rd, phys\n> -\tadd\t\\rd, \\phys, #TEXT_OFFSET\n> -\tsub\t\\rd, \\rd, #PG_DIR_SIZE\n> -\t.endm\n> -\n>  /*\n>   * Kernel startup entry point.\n>   * ---------------------------\n> @@ -77,6 +69,9 @@\n>  \t.arm\n>  \n>  \t__HEAD\n> +\t.globl\tswapper_pg_dir\n> +\t.equ\tswapper_pg_dir, . - PG_DIR_SIZE\n> +\n>  ENTRY(stext)\n>   ARM_BE8(setend\tbe )\t\t\t@ ensure we are in BE8 mode\n>  \n> @@ -172,7 +167,7 @@ ENDPROC(stext)\n>   *  r4 = physical page table address\n>   */\n>  __create_page_tables:\n> -\tpgtbl\tr4, r8\t\t\t\t@ page table address\n> +\tadr_l\tr4, swapper_pg_dir\t\t@ page table address\n>  \n>  \t/*\n>  \t * Clear the swapper page table\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"i4bSoz03\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"cUwarYIs\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJLs4yBKz9sP3\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:30:45 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow8u-0002Rm-0z; Mon, 04 Sep 2017 18:30:40 +0000","from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dow8q-0002QF-IU for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:30:38 +0000","by mail-io0-x22b.google.com with SMTP id b2so4202643iof.1\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:30:15 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\th133sm3533590ioa.3.2017.09.04.11.30.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:30:14 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=armoJQ9N+mBPtqoZLUDpbO4WHfSQA8jPM3kDDVJa2TE=;\n\tb=i4bSoz033dlHME\n\t/8I/6jN8jzw8W8b8LZ+DmhjWgcz6qtZwP694Ko8ktk1NQmuSvVJ6gK6Bi/whYAldxj+k47aBSfFfP\n\tbxp6JUNj9F2yeK+hQn+4c4mVwqH5aC5Z/OqhbXdousOedfb8MsB8Naf3q8XJCfDPPPsw1mwKlEBFb\n\todFAdo94OAnsj0mMY9pNjzdauEGvmiSJ7IT5jOkboFX/Edwna7nSLPYhMpVqx9DwRc74T8MUD++B8\n\tcaxMSWVEoRBwP65KNS65eUYmMpGqRCufYEHdN8fj0VLqIV6fuP9fneo0QvjE5eeTY0a9c0jqMujpg\n\t0pgaUct7hCIin9/32GLA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=XGlR2o5JxlNgbKXiHJizf6gGXcZICtWYJYmPwguguaE=;\n\tb=cUwarYIsvYLQ2Xuaf7RtA0GDy6M4FrNfwXdRnYXpOBZQIKprj7fiIXbVrMjhlUkKKj\n\tz8IyI15IGW4h3rQG3eTpT4ovtbydbBXp0hQfW8xaZiVJb+SSBJ+UVuofvozBFY6JY8p8\n\tuHarKWz9SWNk5G8zhhuAFTbqt/xEpMq+X9LyA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=XGlR2o5JxlNgbKXiHJizf6gGXcZICtWYJYmPwguguaE=;\n\tb=FhoYMpRcO6z40GGP0Yn7rEgrC03fIAVcOmLXxXFGpO8YXktWEuZcYrQVl9kS8jZeDf\n\tOBpdx4nthsJ63FFMbZYYp+UVpzw/xjsA66jf47lqM1rbQtM7OZ+DX/wzuaBsYe/aoJrh\n\tMoNfduR01izmKHoTCKkWV5p4J5k68HIAjOvAStsuZZo9j3HKI9echJyWI2mmV6z7XxlV\n\tKkesyuzSRhzrtmYQVZfiWxyOrHgrs0P1QQInxZ4EL/+QHIzc9nSHQUH3A2XnKtV/Jjlf\n\tFOwm3lfThv/xDFRVWfZ9EhCkMxBUeU2aP//yAJAs+o2dKz3kK3iIZwnl5CqQSIU70d0X\n\tKt3g==","X-Gm-Message-State":"AHPjjUicf9EDk/R/0U5RSdt3JA5qOqYUM+lFlLPfuohmY+oDjj2NP7jj\n\trchQHBu5qOyBMZHE","X-Google-Smtp-Source":"ADKCNb6T1CdpVN3YxZwJgDJdiUuKhl23pPNmhpuJFOnwCjan4tU6HjNbbIojyQsvYiRtG1j3Ivu+WQ==","X-Received":"by 10.36.14.17 with SMTP id 17mr1772659ite.133.1504549814962;\n\tMon, 04 Sep 2017 11:30:14 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:30:13 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 23/29] ARM: kernel: refer to swapper_pg_dir via its\n\tsymbol","In-Reply-To":"<20170903120757.14968-24-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041427300.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-24-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_113036_660139_E3B6EA9A ","X-CRM114-Status":"GOOD (  16.43  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22b listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762836,"web_url":"http://patchwork.ozlabs.org/comment/1762836/","msgid":"<nycvar.YSQ.7.76.1709041431320.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:44:15","subject":"Re: [PATCH v2 24/29] ARM: kernel: implement randomization of the\n\tkernel load address","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> This implements randomization of the placement of the kernel image\n> inside the lowmem region. It is intended to work together with the\n> decompressor to place the kernel at an offset in physical memory\n> that is a multiple of 2 MB, and to take the same offset into account\n> when creating the virtual mapping.\n> \n> This uses runtime relocation of the kernel built as a PIE binary, to\n> fix up all absolute symbol references to refer to their runtime virtual\n> address. The physical-to-virtual mapping remains unchanged.\n> \n> In order to allow the decompressor to hand over to the core kernel\n> without making assumptions that are not guaranteed to hold when\n> invoking the core kernel directly using bootloaders that are not\n> KASLR aware, the KASLR offset is expected to be placed in r3 when\n> entering the kernel 4 bytes past the entry point, skipping the first\n> instruction.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/Kconfig       |  15 +++\n>  arch/arm/kernel/head.S | 103 ++++++++++++++++++--\n>  2 files changed, 109 insertions(+), 9 deletions(-)\n> \n> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig\n> index 300add3b8023..fe4a2cd1f15c 100644\n> --- a/arch/arm/Kconfig\n> +++ b/arch/arm/Kconfig\n> @@ -1825,6 +1825,21 @@ config XEN\n>  \thelp\n>  \t  Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.\n>  \n> +config RANDOMIZE_BASE\n> +\tbool \"Randomize the address of the kernel image\"\n> +\tdepends on MMU && AUTO_ZRELADDR\n> +\tdepends on !XIP_KERNEL && !ZBOOT_ROM\n\nThis should work even if ZBOOT_ROM is selected. The ZBOOT_ROM option \nallows for the decompressor executing directly from ROM and \ndecompressing the kernel anywhere in RAM.\n\n\n> +\tselect RELOCATABLE\n> +\thelp\n> +\t  Randomizes the virtual and physical address at which the kernel\n> +\t  image is loaded, as a security feature that deters exploit attempts\n> +\t  relying on knowledge of the location of kernel internals.\n> +\n> +\t  This relies on the UEFI stub to invoke the EFI_RNG_PROTOCOL to\n> +\t  randomize the load address of the decompressed kernel in the\n> +\t  physical space. The same offset is applied to the virtual mapping\n> +\t  of the kernel in the virtual space by the kernel proper.\n> +\n>  endmenu\n>  \n>  menu \"Boot options\"\n> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S\n> index 71bc0d037bc9..0795da990dde 100644\n> --- a/arch/arm/kernel/head.S\n> +++ b/arch/arm/kernel/head.S\n> @@ -48,6 +48,28 @@\n>  #define PMD_ORDER\t2\n>  #endif\n>  \n> +\t.macro\tget_kaslr_offset, reg\n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\tldr_l\t\t\t\\reg, __kaslr_offset\n> +#else\n> +\tmov\t\t\t\\reg, #0\n> +#endif\n> +\t.endm\n> +\n> +\t.macro\tadd_kaslr_offset, reg, tmp\n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\tget_kaslr_offset\t\\tmp\n> +\tadd\t\t\t\\reg, \\reg, \\tmp\n> +#endif\n> +\t.endm\n> +\n> +\t.macro\tsub_kaslr_offset, reg, tmp\n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\tget_kaslr_offset\t\\tmp\n> +\tsub\t\t\t\\reg, \\reg, \\tmp\n> +#endif\n> +\t.endm\n> +\n>  /*\n>   * Kernel startup entry point.\n>   * ---------------------------\n> @@ -73,6 +95,7 @@\n>  \t.equ\tswapper_pg_dir, . - PG_DIR_SIZE\n>  \n>  ENTRY(stext)\n> +\tmov\tr3, #0\t\t\t@ normal entry point - clear r3\n>   ARM_BE8(setend\tbe )\t\t\t@ ensure we are in BE8 mode\n>  \n>   THUMB(\tbadr\tr9, 1f\t\t)\t@ Kernel is always entered in ARM.\n> @@ -80,6 +103,16 @@ ENTRY(stext)\n>   THUMB(\t.thumb\t\t\t)\t@ switch to Thumb now.\n>   THUMB(1:\t\t\t)\n>  \n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\tstr_l\tr3, __kaslr_offset, r9\t@ offset in r3 if entered via kaslr ep\n> +\n> +\t.section \".bss\", \"aw\", %nobits\n> +\t.align\t2\n> +__kaslr_offset:\n> +\t.long\t0\t\t\t@ will be wiped before entering C code\n> +\t.previous\n> +#endif\n> +\n>  #ifdef CONFIG_ARM_VIRT_EXT\n>  \tbl\t__hyp_stub_install\n>  #endif\n> @@ -103,6 +136,7 @@ ENTRY(stext)\n>  #ifndef CONFIG_XIP_KERNEL\n>  \tadr_l\tr8, _text\t\t\t@ __pa(_text)\n>  \tsub\tr8, r8, #TEXT_OFFSET\t\t@ PHYS_OFFSET\n> +\tsub_kaslr_offset r8, r12\n>  #else\n>  \tldr\tr8, =PLAT_PHYS_OFFSET\t\t@ always constant in this case\n>  #endif\n> @@ -139,8 +173,8 @@ ENTRY(stext)\n>  \t * r0 will hold the CPU control register value, r1, r2, r4, and\n>  \t * r9 will be preserved.  r5 will also be preserved if LPAE.\n>  \t */\n> -\tldr\tr13, =__mmap_switched\t\t@ address to jump to after\n> -\t\t\t\t\t\t@ mmu has been enabled\n> +\tadr_l\tlr, __primary_switch\t\t@ address to jump to after\n> +\tmov\tr13, lr\t\t\t\t@ mmu has been enabled\n>  \tbadr\tlr, 1f\t\t\t\t@ return (PIC) address\n>  #ifdef CONFIG_ARM_LPAE\n>  \tmov\tr5, #0\t\t\t\t@ high TTBR0\n> @@ -151,7 +185,8 @@ ENTRY(stext)\n>  \tldr\tr12, [r10, #PROCINFO_INITFUNC]\n>  \tadd\tr12, r12, r10\n>  \tret\tr12\n> -1:\tb\t__enable_mmu\n> +1:\tget_kaslr_offset r12\t\t\t@ get before turning MMU on\n> +\tb\t__enable_mmu\n>  ENDPROC(stext)\n>  \t.ltorg\n>  \n> @@ -230,9 +265,14 @@ __create_page_tables:\n>  \t/*\n>  \t * Map our RAM from the start to the end of the kernel .bss section.\n>  \t */\n> -\tadd\tr0, r4, #PAGE_OFFSET >> (SECTION_SHIFT - PMD_ORDER)\n> -\tldr\tr6, =(_end - 1)\n> -\torr\tr3, r8, r7\n> +\tget_kaslr_offset r3\n> +\tadd\tr0, r3, #PAGE_OFFSET\n> +\tadd\tr0, r4, r0, lsr #(SECTION_SHIFT - PMD_ORDER)\n> +\tadr_l\tr6, _end - 1\n> +\tsub\tr6, r6, r8\n> +\tadd\tr6, r6, #PAGE_OFFSET\n> +\tadd\tr3, r3, r8\n> +\torr\tr3, r3, r7\n>  \tadd\tr6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER)\n>  1:\tstr\tr3, [r0], #1 << PMD_ORDER\n>  \tadd\tr3, r3, #1 << SECTION_SHIFT\n> @@ -376,7 +416,7 @@ ENTRY(secondary_startup)\n>  \t * Use the page tables supplied from  __cpu_up.\n>  \t */\n>  \tadr_l\tr3, secondary_data\n> -\tmov_l\tr12, __secondary_switched\n> +\tadr_l\tr12, __secondary_switch\n>  \tldrd\tr4, [r3, #0]\t\t\t@ get secondary_data.pgdir\n>  ARM_BE8(eor\tr4, r4, r5)\t\t\t@ Swap r5 and r4 in BE:\n>  ARM_BE8(eor\tr5, r4, r5)\t\t\t@ it can be done in 3 steps\n> @@ -414,6 +454,7 @@ ENDPROC(__secondary_switched)\n>   *  r4  = TTBR pointer (low word)\n>   *  r5  = TTBR pointer (high word if LPAE)\n>   *  r9  = processor ID\n> + *  r12 = KASLR offset\n>   *  r13 = *virtual* address to jump to upon completion\n>   */\n>  __enable_mmu:\n> @@ -451,6 +492,7 @@ ENDPROC(__enable_mmu)\n>   *  r1  = machine ID\n>   *  r2  = atags or dtb pointer\n>   *  r9  = processor ID\n> + *  r12 = KASLR offset\n>   *  r13 = *virtual* address to jump to upon completion\n>   *\n>   * other registers depend on the function called upon completion\n> @@ -466,10 +508,52 @@ ENTRY(__turn_mmu_on)\n>  \tmov\tr3, r3\n>  \tmov\tr3, r13\n>  \tret\tr3\n> -__turn_mmu_on_end:\n>  ENDPROC(__turn_mmu_on)\n> -\t.popsection\n>  \n> +__primary_switch:\n> +#ifdef CONFIG_RELOCATABLE\n> +\tadr_l\tr7, _text\t\t\t@ r7 := __pa(_text)\n> +\tsub\tr7, r7, #TEXT_OFFSET\t\t@ r7 := PHYS_OFFSET\n> +\n> +\tadr_l\tr5, __rel_begin\n> +\tadr_l\tr6, __rel_end\n> +\tsub\tr5, r5, r7\n> +\tsub\tr6, r6, r7\n> +\n> +\tadd\tr5, r5, #PAGE_OFFSET\n> +\tadd\tr6, r6, #PAGE_OFFSET\n> +\tadd\tr5, r5, r12\n> +\tadd\tr6, r6, r12\n> +\n> +\tadr_l\tr3, __stubs_start\t\t@ __pa(__stubs_start)\n> +\tsub\tr3, r3, r7\t\t\t@ offset of __stubs_start\n> +\tadd\tr3, r3, #PAGE_OFFSET\t\t@ __va(__stubs_start)\n> +\tsub\tr3, r3, #0xffff1000\t\t@ subtract VA of stubs section\n> +\n> +0:\tcmp\tr5, r6\n> +\tbge\t1f\n> +\tldm\tr5!, {r7, r8}\t\t\t@ load next relocation entry\n> +\tcmp\tr8, #23\t\t\t\t@ R_ARM_RELATIVE\n> +\tbne\t0b\n> +\tcmp\tr7, #0xff000000\t\t\t@ vector page?\n> +\taddgt\tr7, r7, r3\t\t\t@ fix up VA offset\n> +\tldr\tr8, [r7, r12]\n> +\tadd\tr8, r8, r12\n> +\tstr\tr8, [r7, r12]\n> +\tb\t0b\n> +1:\n> +#endif\n> +\tldr\tpc, =__mmap_switched\n> +ENDPROC(__primary_switch)\n> +\n> +#ifdef CONFIG_SMP\n> +__secondary_switch:\n> +\tldr\tpc, =__secondary_switched\n> +ENDPROC(__secondary_switch)\n> +#endif\n> +\t.ltorg\n> +__turn_mmu_on_end:\n> +\t.popsection\n>  \n>  #ifdef CONFIG_SMP_ON_UP\n>  \t__HEAD\n> @@ -570,6 +654,7 @@ __fixup_pv_table:\n>  \tadr_l\tr6, __pv_phys_pfn_offset\n>  \tadr_l\tr7, __pv_offset\t\t\t@ __pa(__pv_offset)\n>  \tmov_l\tr3, __pv_offset\t\t\t@ __va(__pv_offset)\n> +\tadd_kaslr_offset r3, ip\n>  \tmvn\tip, #0\n>  \tsubs\tr3, r7, r3\t@ PHYS_OFFSET - PAGE_OFFSET\n>  \tmov\tr0, r8, lsr #PAGE_SHIFT\t@ convert to PFN\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"l2S2HPVD\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"UIZGkYBG\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJg40gqPz9sPs\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:44:48 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowMW-0007pM-SB; Mon, 04 Sep 2017 18:44:44 +0000","from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowMT-0007nS-7n for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:44:43 +0000","by mail-qk0-x22c.google.com with SMTP id b82so4509569qkc.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:44:18 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\td199sm4065732qke.58.2017.09.04.11.44.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:44:16 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=J4mV7wm8IP7eAD/If3UXwfVaUTlOBRYNlx0D5c6t3Fc=;\n\tb=l2S2HPVD06srKs\n\tG9EK9BL19wvxVCD5Msk+igoI8t4zJgALUb966H0CNDVeBNiNTSERTdO5eXNzlh40d/MSZ1fh1BREm\n\tpD2ZI0KfCVNTCLDYpt19cs0Gu9/Op99NnjQ1k4XxlKFjMn16eax+mAhmAtStdCOI2NvMtrnRgIOUs\n\tg9xweR35BWCpzi0V2nygeNo2yN01YfevY5mEtZNISxoY5OGUltuV3X+lsVIlNoNEQkjvwA7xyr3em\n\tY1sGkVor/TBSEA0nFBVwrYnFy0zWLcKY69rBcH8p1Fl2Dnz3b6Hf8zhcgqvCK4JZmE1qvlq3jEEUr\n\txsaj2O0jM6x595qtNx0Q==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=WYUER7LhYwboeDuNQQD5OeKBBKSRNYlihrpNzl39Jd0=;\n\tb=UIZGkYBGemdymJCXwILBgrYJHg/9IT4jVIpxTltLyqmCd/hAvINnf8JZi/4MlOTdB1\n\tuzncQ9NLHruYNyVaLovnjkQo1iOuP7TJPQ6gtBolIoGSGQ+i/WA8eGdx2gf61QJCN+we\n\t4RsgMfWDkn6OVL+LZDMGDIOx4QiFrCGFCwlak="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=WYUER7LhYwboeDuNQQD5OeKBBKSRNYlihrpNzl39Jd0=;\n\tb=Z/qhPEiLYoZ+swogh9c4FMJK+KvbQUg/c9nYDl4rl8e1Lk3JbsuidfyO9SrQuQDKxD\n\tMiGnLYUXPNyYEoFf8/rXaRkgAoM9tXs/CMtQRE7njJRrX+VtwZI12bwLHWGb/eAN7eIo\n\t835r2CQbMaVB13YmrCd51T5KXbdHBF/N+DgoKNJi/I9JqihhNASyMBKjPN48MMq/aMf1\n\tvk//PeN6ZGzJZlKohjXbD3uf1c2hnr6PhzRWVxxKx8FPVglmcSLVFmQWUhbT805kG+wX\n\tpUmSTxghN3rA8muGhWNTyF7XrGVzOMmgYfn94euJPZUwY8Vil1GoaUE88SDXjNxsu74i\n\tEMiA==","X-Gm-Message-State":"AHPjjUgsfY3+B7eqh3mIAI5/XMb+9xrzZOwuT0TdTrUGkqc+BbHQBZJ1\n\tZZYbG1q8tK6Mpkba","X-Google-Smtp-Source":"ADKCNb7qBlV8qX7X4ZIBTAG9KLIwiXrr07rZghaVnbuFXMemUESsB94SATV1MdTICJBqMVTtjXhBfw==","X-Received":"by 10.233.244.72 with SMTP id z8mr2063931qkl.186.1504550657453; \n\tMon, 04 Sep 2017 11:44:17 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:44:15 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 24/29] ARM: kernel: implement randomization of the\n\tkernel load address","In-Reply-To":"<20170903120757.14968-25-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041431320.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-25-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_114441_594948_BB749A20 ","X-CRM114-Status":"GOOD (  28.89  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:400d:c09:0:0:0:22c listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762838,"web_url":"http://patchwork.ozlabs.org/comment/1762838/","msgid":"<nycvar.YSQ.7.76.1709041447040.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:47:42","subject":"Re: [PATCH v2 25/29] ARM: decompressor: explicitly map decompressor\n\tbinary cacheable","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> When randomizing the kernel load address, there may be a large\n> distance in memory between the decompressor binary and its payload\n> and the destination area in memory. Ensure that the decompressor\n> itself is mapped cacheable in this case, by tweaking the existing\n> routine that takes care of this for XIP decompressors.\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n\nAcked-by: Nicolas Pitre <nico@linaro.org>\n\n> ---\n>  arch/arm/boot/compressed/head.S | 16 ++++++++++------\n>  1 file changed, 10 insertions(+), 6 deletions(-)\n> \n> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S\n> index 5884e8151376..583cc6899d98 100644\n> --- a/arch/arm/boot/compressed/head.S\n> +++ b/arch/arm/boot/compressed/head.S\n> @@ -706,20 +706,24 @@ __setup_mmu:\tsub\tr3, r4, #16384\t\t@ Page directory size\n>  \t\tteq\tr0, r2\n>  \t\tbne\t1b\n>  /*\n> - * If ever we are running from Flash, then we surely want the cache\n> - * to be enabled also for our execution instance...  We map 2MB of it\n> - * so there is no map overlap problem for up to 1 MB compressed kernel.\n> - * If the execution is in RAM then we would only be duplicating the above.\n> + * Make sure our entire executable image (including payload) is mapped\n> + * cacheable, in case it is located outside the region we covered above.\n> + * (This may be the case if running from flash or with randomization enabled)\n> + * If the regions happen to overlap, we just duplicate some of the above.\n>   */\n>  \t\torr\tr1, r6, #0x04\t\t@ ensure B is set for this\n>  \t\torr\tr1, r1, #3 << 10\n>  \t\tmov\tr2, pc\n> +\t\tadr_l\tr9, _end\n>  \t\tmov\tr2, r2, lsr #20\n> +\t\tmov\tr9, r9, lsr #20\n>  \t\torr\tr1, r1, r2, lsl #20\n>  \t\tadd\tr0, r3, r2, lsl #2\n> -\t\tstr\tr1, [r0], #4\n> +\t\tadd\tr9, r3, r9, lsl #2\n> +0:\t\tstr\tr1, [r0], #4\n>  \t\tadd\tr1, r1, #1048576\n> -\t\tstr\tr1, [r0]\n> +\t\tcmp\tr0, r9\n> +\t\tbls\t0b\n>  \t\tmov\tpc, lr\n>  ENDPROC(__setup_mmu)\n>  \n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"jhgEmq1Q\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"idNW4Snb\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJl23mPtz9t16\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:48:12 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowPo-0001A6-UJ; Mon, 04 Sep 2017 18:48:08 +0000","from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowPl-00018b-75 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:48:06 +0000","by mail-io0-x233.google.com with SMTP id q64so4316512iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:47:44 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tp6sm632725itp.11.2017.09.04.11.47.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:47:43 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=eVQTHMkG5ENMZzknjgBim0wTywbVYuQuZ3dQWHaGj/E=;\n\tb=jhgEmq1QqHHRNY\n\tBsEGPvlKpdIjIsWk5/wpjSYjTevQgABGxIpB776dzxqnYq6fFGkyja6JL7RAu4ryr8Oq6vlIHa6xz\n\tiXwcJlrR72+kHOcS4YFhEZhCKIu9o009cIzcLgUu9XBDMVXIo4Vn1Rv30qlary2x+aLYGRJuEEQnz\n\tHqcLYKKwiIJeOUXxf6gSXI1CCxO1kPRg9bgJY0+xvLq0UBNk9P7NGbez1TkfbdE6lauBIK3JaCg/B\n\tpGdIBg1pr/dtZ+yWcTD3ZdCX+VeY5xDtlcZN8z8WTntPVY5/K6noSYGrbL0E77yo9oU3uKBp2ubYH\n\tQOV6biOazUmFfx5he0oA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=0pX7F/cdnzvtbI4DlFZnM+RSppqY+IU9GXMyLwbzA4s=;\n\tb=idNW4Snb5FTd0/8xyex+Id5R9rsv57vER8G7Be9fXuAMKu1yhtK15IISlr3l4gx0iZ\n\tVMIfV8N2lyBGpcwiGNoXbPEsek3VvSwMHt2j+KH2cIc6ebM8ioC4iEQQiB7dPou+Ygrh\n\tcyo3eKocTmtbn8qYaJTsokhRzKeU/xNmVFvpY="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=0pX7F/cdnzvtbI4DlFZnM+RSppqY+IU9GXMyLwbzA4s=;\n\tb=iCn5PXdaJUGwkyxZd+GLYQqd5AQJauoFeBWYcvDxXoyofrISCe1FOqgnvp8L6ic0zy\n\t+QLCRJsFtGA5Ugnv86VNewF9pnbmuIByXiQUHhXeK1g7WYj72O36SJZlu2SUn6tVjhoc\n\tlutynLdX2eT+Fcf5ot9XsCNfLMSemBJdHPeqADo8Jwzqo81KXbPzT+S+OS2w9QnN2E54\n\tRU9Qk03GgMghoNrtOlnpnXqw6k1bpKRBiblBl4UOZet3JhhUOeXglYyHBvhyxBSwr7+m\n\tGpiQxq0uypM/lDQGqWwI8uPmCCsXm/cuhxhHiv1j5J4fcIV4L7XL9XQIAdQt8K6XeQ20\n\tIyfw==","X-Gm-Message-State":"AHPjjUjkAJtRQ8o8yTscWB5t8PBqzlHjskfaFHHw7V3+JgV5XfQseSKu\n\tOTxQQbA4nhNgD8Wk","X-Google-Smtp-Source":"ADKCNb7zLR1x5clISlN7i8GfPBixm7OHzg6C3fFl6gbED1rf4xyTKSGO2UCjnkTYte9NLMnuN5RBfg==","X-Received":"by 10.36.65.72 with SMTP id x69mr1460817ita.30.1504550864348;\n\tMon, 04 Sep 2017 11:47:44 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:47:42 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 25/29] ARM: decompressor: explicitly map decompressor\n\tbinary cacheable","In-Reply-To":"<20170903120757.14968-26-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041447040.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-26-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_114805_300333_BC62622D ","X-CRM114-Status":"GOOD (  20.63  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:233 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762840,"web_url":"http://patchwork.ozlabs.org/comment/1762840/","msgid":"<nycvar.YSQ.7.76.1709041449041.8603@knanqh.ubzr>","list_archive_url":null,"date":"2017-09-04T18:53:52","subject":"Re: [PATCH v2 26/29] ARM: decompressor: add KASLR support","submitter":{"id":4652,"url":"http://patchwork.ozlabs.org/api/people/4652/","name":"Nicolas Pitre","email":"nicolas.pitre@linaro.org"},"content":"On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n\n> Add support to the decompressor to load the kernel at a randomized\n> offset, and invoke the kernel proper while passing on the information\n> about the offset at which the kernel was loaded.\n> \n> This implementation will extract some pseudo-randomness from the low\n> bits of the generic timer (if available), and use CRC-16 to combine\n> it with the build ID string and the device tree binary (which ideally\n> has a /chosen/kaslr-seed property, but may also have other properties\n> that differ between boots). This seed is used to select one of the\n> candidate offsets in the lowmem region that don't overlap the zImage\n> itself, the DTB, the initrd and /memreserve/s and/or /reserved-memory\n> nodes that should be left alone.\n> \n> When booting via the UEFI stub, it is left up to the firmware to supply\n> a suitable seed and select an offset.\n\nWhy did you remove the entropy contribution from general regs upon \nentry? That was an easy way to enable KASLR on those platforms not using \nDT as they would simply have to put some random value in any of the \nregs.\n\n\n> \n> Cc: Russell King <linux@armlinux.org.uk>\n> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n> ---\n>  arch/arm/boot/compressed/Makefile |   8 +-\n>  arch/arm/boot/compressed/head.S   |  84 ++++-\n>  arch/arm/boot/compressed/kaslr.c  | 398 ++++++++++++++++++++\n>  3 files changed, 484 insertions(+), 6 deletions(-)\n> \n> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile\n> index d50430c40045..771b1ba1baa3 100644\n> --- a/arch/arm/boot/compressed/Makefile\n> +++ b/arch/arm/boot/compressed/Makefile\n> @@ -85,8 +85,14 @@ $(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/\n>  $(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \\\n>  \t$(addprefix $(obj)/,$(libfdt_hdrs))\n>  \n> +ifneq ($(CONFIG_ARM_ATAG_DTB_COMPAT)$(CONFIG_RANDOMIZE_BASE),)\n> +OBJS\t+= $(libfdt_objs)\n>  ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)\n> -OBJS\t+= $(libfdt_objs) atags_to_fdt.o\n> +OBJS\t+= atags_to_fdt.o\n> +endif\n> +ifeq ($(CONFIG_RANDOMIZE_BASE),y)\n> +OBJS\t+= kaslr.o\n> +endif\n>  endif\n>  \n>  targets       := vmlinux vmlinux.lds piggy_data piggy.o \\\n> diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S\n> index 583cc6899d98..79b4033b0ed4 100644\n> --- a/arch/arm/boot/compressed/head.S\n> +++ b/arch/arm/boot/compressed/head.S\n> @@ -381,6 +381,42 @@ restart:\tadr\tr0, LC0\n>  dtb_check_done:\n>  #endif\n>  \n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\t\tldr\tr1, kaslr_offset\t@ check if the kaslr_offset is\n> +\t\tcmp\tr1, #0\t\t\t@ already set\n> +#ifdef CONFIG_EFI_STUB\n> +\t\tldreq\tr1, __efi_boot\t\t@ UEFI has its own KASLR init\n> +\t\tcmpeq\tr1, #0\t\t\t@ routine so skip over this one\n> +#endif\n> +\t\tbne\t1f\n> +\n> +\t\tstmfd\tsp!, {r0-r3, ip, lr}\n> +\t\tadr_l\tr2, _text\t\t@ start of zImage\n> +\t\tstmfd\tsp!, {r2, r8, r10}\t@ pass stack arguments\n> +\n> +#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)\n> +\t\t/*\n> +\t\t * Get some pseudo-entropy from the low bits of the generic\n> +\t\t * timer if it is implemented.\n> +\t\t */\n> +\t\tmrc\tp15, 0, r1, c0, c1, 1\t@ read ID_PFR1 register\n> +\t\ttst\tr1, #0x10000\t\t@ have generic timer?\n> +\t\tbeq\t0f\n> +\t\tmrrc\tp15, 1, r3, r1, c14\t@ read CNTVCT\n> +#endif\n> +0:\t\tadr_l\tr0, kaslr_offset\t@ pass &kaslr_offset in r0\n> +\t\tmov\tr1, r4\t\t\t@ pass base address\n> +\t\tmov\tr2, r9\t\t\t@ pass decompressed image size\n> +\t\teor\tr3, r3, r3, ror #16\t@ pass initial seed\n> +\t\tbl\tkaslr_early_init\n> +\t\tadd\tsp, sp, #12\n> +\t\tcmp\tr0, #0\n> +\t\taddne\tr4, r4, r0\t\t@ add offset to base address\n> +\t\tldmfd\tsp!, {r0-r3, ip, lr}\n> +\t\tbne\trestart\n> +1:\n> +#endif\n> +\n>  /*\n>   * Check to see if we will overwrite ourselves.\n>   *   r4  = final kernel address (possibly with LSB set)\n> @@ -1356,25 +1392,63 @@ __hyp_reentry_vectors:\n>  \n>  __enter_kernel:\n>  \t\tmov\tr0, #0\t\t\t@ must be 0\n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\t\tldr\tr3, kaslr_offset\n> +\t\tadd\tr4, r4, #4\t\t@ skip first instruction\n> +#endif\n>   ARM(\t\tmov\tpc, r4\t\t)\t@ call kernel\n>   M_CLASS(\tadd\tr4, r4, #1\t)\t@ enter in Thumb mode for M class\n>   THUMB(\t\tbx\tr4\t\t)\t@ entry point is always ARM for A/R classes\n>  \n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\t\t/*\n> +\t\t * Minimal implementation of CRC-16 that does not use a\n> +\t\t * lookup table and uses 32-bit wide loads, so it still\n> +\t\t * performs reasonably well with the D-cache off. Equivalent\n> +\t\t * to lib/crc16.c for input sizes that are 4 byte multiples.\n> +\t\t */\n> +ENTRY(__crc16)\n> +\t\tpush\t{r4, lr}\n> +\t\tldr\tr3, =0xa001\t\t@ CRC-16 polynomial\n> +0:\t\tsubs\tr2, r2, #4\n> +\t\tpopmi\t{r4, pc}\n> +\t\tldr\tr4, [r1], #4\n> +#ifdef __ARMEB__\n> +\t\teor\tip, r4, r4, ror #16\t@ endian swap\n> +\t\tbic\tip, ip, #0x00ff0000\n> +\t\tmov\tr4, r4, ror #8\n> +\t\teor\tr4, r4, ip, lsr #8\n> +#endif\n> +\t\teor\tr0, r0, r4\n> +\t\t.rept\t32\n> +\t\tlsrs\tr0, r0, #1\n> +\t\teorcs\tr0, r0, r3\n> +\t\t.endr\n> +\t\tb\t0b\n> +ENDPROC(__crc16)\n> +\n> +\t\t.align\t2\n> +kaslr_offset:\t.long\t0\n> +#ifdef CONFIG_EFI_STUB\n> +__efi_boot:\t.long\t0\n> +#endif\n> +#endif\n> +\n>  reloc_code_end:\n>  \n>  #ifdef CONFIG_EFI_STUB\n>  \t\t.align\t2\n> -_start:\t\t.long\tstart - .\n> -\n>  ENTRY(efi_stub_entry)\n>  \t\t@ allocate space on stack for passing current zImage address\n>  \t\t@ and for the EFI stub to return of new entry point of\n>  \t\t@ zImage, as EFI stub may copy the kernel. Pointer address\n>  \t\t@ is passed in r2. r0 and r1 are passed through from the\n>  \t\t@ EFI firmware to efi_entry\n> -\t\tadr\tip, _start\n> -\t\tldr\tr3, [ip]\n> -\t\tadd\tr3, r3, ip\n> +#ifdef CONFIG_RANDOMIZE_BASE\n> +\t\tadr\tr3, __efi_boot\n> +\t\tstr\tr3, [r3]\t\t@ set __efi_boot != 0\n> +#endif\n> +\t\tadr_l\tr3, start\n>  \t\tstmfd\tsp!, {r3, lr}\n>  \t\tmov\tr2, sp\t\t\t@ pass zImage address in r2\n>  \t\tbl\tefi_entry\n> diff --git a/arch/arm/boot/compressed/kaslr.c b/arch/arm/boot/compressed/kaslr.c\n> new file mode 100644\n> index 000000000000..c68bdea764b6\n> --- /dev/null\n> +++ b/arch/arm/boot/compressed/kaslr.c\n> @@ -0,0 +1,398 @@\n> +/*\n> + * Copyright (C) 2017 Linaro Ltd;  <ard.biesheuvel@linaro.org>\n> + *\n> + * This program is free software; you can redistribute it and/or modify\n> + * it under the terms of the GNU General Public License version 2 as\n> + * published by the Free Software Foundation.\n> + *\n> + */\n> +\n> +#include <libfdt.h>\n> +#include <linux/types.h>\n> +#include <generated/compile.h>\n> +#include <generated/utsrelease.h>\n> +#include <asm/pgtable.h>\n> +\n> +struct regions {\n> +\tu32 pa_start;\n> +\tu32 pa_end;\n> +\tu32 image_size;\n> +\tu32 zimage_start;\n> +\tu32 zimage_size;\n> +\tu32 dtb_start;\n> +\tu32 dtb_size;\n> +\tu32 initrd_start;\n> +\tu32 initrd_size;\n> +\tint reserved_mem;\n> +\tint reserved_mem_addr_cells;\n> +\tint reserved_mem_size_cells;\n> +};\n> +\n> +extern u32 __crc16(u32 crc, u32 const input[], int byte_count);\n> +\n> +static u32 __memparse(const char *val, const char **retptr)\n> +{\n> +\tint base = 10;\n> +\tu32 ret = 0;\n> +\n> +\tif (*val == '0') {\n> +\t\tval++;\n> +\t\tif (*val == 'x' || *val == 'X') {\n> +\t\t\tval++;\n> +\t\t\tbase = 16;\n> +\t\t} else {\n> +\t\t\tbase = 8;\n> +\t\t}\n> +\t}\n> +\n> +\twhile (*val != ',' && *val != ' ' && *val != '\\0') {\n> +\t\tchar c = *val++;\n> +\n> +\t\tswitch (c) {\n> +\t\tcase '0' ... '9':\n> +\t\t\tret = ret * base + (c - '0');\n> +\t\t\tcontinue;\n> +\t\tcase 'a' ... 'f':\n> +\t\t\tret = ret * base + (c - 'a' + 10);\n> +\t\t\tcontinue;\n> +\t\tcase 'A' ... 'F':\n> +\t\t\tret = ret * base + (c - 'A' + 10);\n> +\t\t\tcontinue;\n> +\t\tcase 'g':\n> +\t\tcase 'G':\n> +\t\t\tret <<= 10;\n> +\t\tcase 'm':\n> +\t\tcase 'M':\n> +\t\t\tret <<= 10;\n> +\t\tcase 'k':\n> +\t\tcase 'K':\n> +\t\t\tret <<= 10;\n> +\t\t\tbreak;\n> +\t\tdefault:\n> +\t\t\tif (retptr)\n> +\t\t\t\t*retptr = NULL;\n> +\t\t\treturn 0;\n> +\t\t}\n> +\t}\n> +\tif (retptr)\n> +\t\t*retptr = val;\n> +\treturn ret;\n> +}\n> +\n> +static bool regions_intersect(u32 s1, u32 e1, u32 s2, u32 e2)\n> +{\n> +\treturn e1 >= s2 && e2 >= s1;\n> +}\n> +\n> +static bool intersects_reserved_region(const void *fdt, u32 start,\n> +\t\t\t\t       u32 end, struct regions *regions)\n> +{\n> +\tint subnode, len, i;\n> +\tu64 base, size;\n> +\n> +\t/* check for overlap with /memreserve/ entries */\n> +\tfor (i = 0; i < fdt_num_mem_rsv(fdt); i++) {\n> +\t\tif (fdt_get_mem_rsv(fdt, i, &base, &size) < 0)\n> +\t\t\tcontinue;\n> +\t\tif (regions_intersect(start, end, base, base + size))\n> +\t\t\treturn true;\n> +\t}\n> +\n> +\tif (regions->reserved_mem < 0)\n> +\t\treturn false;\n> +\n> +\t/* check for overlap with static reservations in /reserved-memory */\n> +\tfor (subnode = fdt_first_subnode(fdt, regions->reserved_mem);\n> +\t     subnode >= 0;\n> +\t     subnode = fdt_next_subnode(fdt, subnode)) {\n> +\t\tconst fdt32_t *reg;\n> +\n> +\t\tlen = 0;\n> +\t\treg = fdt_getprop(fdt, subnode, \"reg\", &len);\n> +\t\twhile (len >= (regions->reserved_mem_addr_cells +\n> +\t\t\t       regions->reserved_mem_size_cells)) {\n> +\n> +\t\t\tbase = fdt32_to_cpu(reg[0]);\n> +\t\t\tif (regions->reserved_mem_addr_cells == 2)\n> +\t\t\t\tbase = (base << 32) | fdt32_to_cpu(reg[1]);\n> +\n> +\t\t\treg += regions->reserved_mem_addr_cells;\n> +\t\t\tlen -= 4 * regions->reserved_mem_addr_cells;\n> +\n> +\t\t\tsize = fdt32_to_cpu(reg[0]);\n> +\t\t\tif (regions->reserved_mem_size_cells == 2)\n> +\t\t\t\tsize = (size << 32) | fdt32_to_cpu(reg[1]);\n> +\n> +\t\t\treg += regions->reserved_mem_size_cells;\n> +\t\t\tlen -= 4 * regions->reserved_mem_size_cells;\n> +\n> +\t\t\tif (base >= regions->pa_end)\n> +\t\t\t\tcontinue;\n> +\n> +\t\t\tif (regions_intersect(start, end, base,\n> +\t\t\t\t\t      min(base + size, (u64)U32_MAX)))\n> +\t\t\t\treturn true;\n> +\t\t}\n> +\t}\n> +\treturn false;\n> +}\n> +\n> +static bool intersects_occupied_region(const void *fdt, u32 start,\n> +\t\t\t\t       u32 end, struct regions *regions)\n> +{\n> +\tif (regions_intersect(start, end, regions->zimage_start,\n> +\t\t\t      regions->zimage_start + regions->zimage_size))\n> +\t\treturn true;\n> +\n> +\tif (regions_intersect(start, end, regions->initrd_start,\n> +\t\t\t      regions->initrd_start + regions->initrd_size))\n> +\t\treturn true;\n> +\n> +\tif (regions_intersect(start, end, regions->dtb_start,\n> +\t\t\t      regions->dtb_start + regions->dtb_size))\n> +\t\treturn true;\n> +\n> +\treturn intersects_reserved_region(fdt, start, end, regions);\n> +}\n> +\n> +static u32 count_suitable_regions(const void *fdt, struct regions *regions)\n> +{\n> +\tu32 pa, ret = 0;\n> +\n> +\tfor (pa = regions->pa_start; pa < regions->pa_end; pa += SZ_2M) {\n> +\t\tif (!intersects_occupied_region(fdt, pa,\n> +\t\t\t\t\t\tpa + regions->image_size,\n> +\t\t\t\t\t\tregions))\n> +\t\t\tret++;\n> +\t}\n> +\treturn ret;\n> +}\n> +\n> +static u32 get_numbered_region(const void *fdt,\n> +\t\t\t\t\t struct regions *regions,\n> +\t\t\t\t\t int num)\n> +{\n> +\tu32 pa;\n> +\n> +\tfor (pa = regions->pa_start; pa < regions->pa_end; pa += SZ_2M) {\n> +\t\tif (!intersects_occupied_region(fdt, pa,\n> +\t\t\t\t\t\tpa + regions->image_size,\n> +\t\t\t\t\t\tregions))\n> +\t\t\tif (num-- == 0)\n> +\t\t\t\treturn pa;\n> +\t}\n> +\treturn regions->pa_start; /* should not happen */\n> +}\n> +\n> +static void get_cell_sizes(const void *fdt, int node, int *addr_cells,\n> +\t\t\t   int *size_cells)\n> +{\n> +\tconst int *prop;\n> +\tint len;\n> +\n> +\t/*\n> +\t * Retrieve the #address-cells and #size-cells properties\n> +\t * from the 'node', or use the default if not provided.\n> +\t */\n> +\t*addr_cells = *size_cells = 1;\n> +\n> +\tprop = fdt_getprop(fdt, node, \"#address-cells\", &len);\n> +\tif (len == 4)\n> +\t\t*addr_cells = fdt32_to_cpu(*prop);\n> +\tprop = fdt_getprop(fdt, node, \"#size-cells\", &len);\n> +\tif (len == 4)\n> +\t\t*size_cells = fdt32_to_cpu(*prop);\n> +}\n> +\n> +static u32 get_memory_end(const void *fdt)\n> +{\n> +\tint mem_node, address_cells, size_cells, len;\n> +\tconst fdt32_t *reg;\n> +\tu64 memory_end = 0;\n> +\n> +\t/* Look for a node called \"memory\" at the lowest level of the tree */\n> +\tmem_node = fdt_path_offset(fdt, \"/memory\");\n> +\tif (mem_node <= 0)\n> +\t\treturn 0;\n> +\n> +\tget_cell_sizes(fdt, 0, &address_cells, &size_cells);\n> +\n> +\t/*\n> +\t * Now find the 'reg' property of the /memory node, and iterate over\n> +\t * the base/size pairs.\n> +\t */\n> +\tlen = 0;\n> +\treg = fdt_getprop(fdt, mem_node, \"reg\", &len);\n> +\twhile (len >= 4 * (address_cells + size_cells)) {\n> +\t\tu64 base, size;\n> +\n> +\t\tbase = fdt32_to_cpu(reg[0]);\n> +\t\tif (address_cells == 2)\n> +\t\t\tbase = (base << 32) | fdt32_to_cpu(reg[1]);\n> +\n> +\t\treg += address_cells;\n> +\t\tlen -= 4 * address_cells;\n> +\n> +\t\tsize = fdt32_to_cpu(reg[0]);\n> +\t\tif (size_cells == 2)\n> +\t\t\tsize = (size << 32) | fdt32_to_cpu(reg[1]);\n> +\n> +\t\treg += size_cells;\n> +\t\tlen -= 4 * size_cells;\n> +\n> +\t\tmemory_end = max(memory_end, base + size);\n> +\t}\n> +\treturn min(memory_end, (u64)U32_MAX);\n> +}\n> +\n> +static char *__strstr(const char *s1, const char *s2, int l2)\n> +{\n> +\tint l1;\n> +\n> +\tl1 = strlen(s1);\n> +\twhile (l1 >= l2) {\n> +\t\tl1--;\n> +\t\tif (!memcmp(s1, s2, l2))\n> +\t\t\treturn (char *)s1;\n> +\t\ts1++;\n> +\t}\n> +\treturn NULL;\n> +}\n> +\n> +static const char *get_cmdline_param(const char *cmdline, const char *param,\n> +\t\t\t\t     int param_size)\n> +{\n> +\tstatic const char default_cmdline[] = CONFIG_CMDLINE;\n> +\tconst char *p;\n> +\n> +\tif (!IS_ENABLED(CONFIG_CMDLINE_FORCE) && cmdline != NULL) {\n> +\t\tp = __strstr(cmdline, param, param_size);\n> +\t\tif (p == cmdline ||\n> +\t\t    (p > cmdline && *(p - 1) == ' '))\n> +\t\t\treturn p;\n> +\t}\n> +\n> +\tif (IS_ENABLED(CONFIG_CMDLINE_FORCE)  ||\n> +\t    IS_ENABLED(CONFIG_CMDLINE_EXTEND)) {\n> +\t\tp = __strstr(default_cmdline, param, param_size);\n> +\t\tif (p == default_cmdline ||\n> +\t\t    (p > default_cmdline && *(p - 1) == ' '))\n> +\t\t\treturn p;\n> +\t}\n> +\treturn NULL;\n> +}\n> +\n> +u32 kaslr_early_init(u32 *kaslr_offset, u32 image_base, u32 image_size,\n> +\t\t     u32 seed, u32 zimage_start, const void *fdt,\n> +\t\t     u32 zimage_end)\n> +{\n> +\tstatic const char __aligned(4) build_id[] = UTS_VERSION UTS_RELEASE;\n> +\tstruct regions regions;\n> +\tconst char *command_line;\n> +\tconst char *p;\n> +\tint chosen, len;\n> +\tu32 lowmem_top, num;\n> +\n> +\tif (fdt_check_header(fdt))\n> +\t\treturn 0;\n> +\n> +\tchosen = fdt_path_offset(fdt, \"/chosen\");\n> +\tif (chosen < 0)\n> +\t\treturn 0;\n> +\n> +\tcommand_line = fdt_getprop(fdt, chosen, \"bootargs\", &len);\n> +\n> +\t/* check the command line for the presence of 'nokaslr' */\n> +\tp = get_cmdline_param(command_line, \"nokaslr\", sizeof(\"nokaslr\") - 1);\n> +\tif (p != NULL)\n> +\t\treturn 0;\n> +\n> +\t/* check the command line for the presence of 'vmalloc=' */\n> +\tp = get_cmdline_param(command_line, \"vmalloc=\", sizeof(\"vmalloc=\") - 1);\n> +\tif (p != NULL)\n> +\t\tlowmem_top = VMALLOC_END - __memparse(p + 8, NULL) -\n> +\t\t\t     VMALLOC_OFFSET;\n> +\telse\n> +\t\tlowmem_top = VMALLOC_DEFAULT_BASE;\n> +\n> +\tregions.image_size = round_up(image_size, SZ_2M);\n> +\tregions.pa_start = round_down(image_base, SZ_128M);\n> +\tregions.pa_end = lowmem_top - PAGE_OFFSET + regions.pa_start -\n> +\t\t\t regions.image_size;\n> +\tregions.zimage_start = zimage_start;\n> +\tregions.zimage_size = zimage_end - zimage_start;\n> +\tregions.dtb_start = (u32)fdt;\n> +\tregions.dtb_size = fdt_totalsize(fdt);\n> +\n> +\t/*\n> +\t * Stir up the seed a bit by taking the CRC of the DTB:\n> +\t * hopefully there's a /chosen/kaslr-seed in there.\n> +\t */\n> +\tseed = __crc16(seed, fdt, regions.dtb_size);\n> +\n> +\t/* stir a bit more using data that changes between builds */\n> +\tseed = __crc16(seed, (u32 *)build_id, sizeof(build_id));\n> +\n> +\t/* check for initrd on the command line */\n> +\tregions.initrd_start = regions.initrd_size = 0;\n> +\tp = get_cmdline_param(command_line, \"initrd=\", sizeof(\"initrd=\") - 1);\n> +\tif (p != NULL) {\n> +\t\tregions.initrd_start = __memparse(p + 7, &p);\n> +\t\tif (*p++ == ',')\n> +\t\t\tregions.initrd_size = __memparse(p, NULL);\n> +\t\tif (regions.initrd_size == 0)\n> +\t\t\tregions.initrd_start = 0;\n> +\t}\n> +\n> +\t/* ... or in /chosen */\n> +\tif (regions.initrd_size == 0) {\n> +\t\tconst fdt32_t *prop;\n> +\t\tu64 start = 0, end = 0;\n> +\n> +\t\tprop = fdt_getprop(fdt, chosen, \"linux,initrd-start\", &len);\n> +\t\tif (prop) {\n> +\t\t\tstart = fdt32_to_cpu(prop[0]);\n> +\t\t\tif (len == 8)\n> +\t\t\t\tstart = (start << 32) | fdt32_to_cpu(prop[1]);\n> +\t\t}\n> +\n> +\t\tprop = fdt_getprop(fdt, chosen, \"linux,initrd-end\", &len);\n> +\t\tif (prop) {\n> +\t\t\tend = fdt32_to_cpu(prop[0]);\n> +\t\t\tif (len == 8)\n> +\t\t\t\tend = (end << 32) | fdt32_to_cpu(prop[1]);\n> +\t\t}\n> +\t\tif (start != 0 && end != 0 && start < U32_MAX) {\n> +\t\t\tregions.initrd_start = start;\n> +\t\t\tregions.initrd_size = max_t(u64, end, U32_MAX) - start;\n> +\t\t}\n> +\t}\n> +\n> +\t/* check the memory nodes for the size of the lowmem region */\n> +\tregions.pa_end = min(regions.pa_end, get_memory_end(fdt));\n> +\n> +\t/* check for a reserved-memory node and record its cell sizes */\n> +\tregions.reserved_mem = fdt_path_offset(fdt, \"/reserved-memory\");\n> +\tif (regions.reserved_mem >= 0)\n> +\t\tget_cell_sizes(fdt, regions.reserved_mem,\n> +\t\t\t       &regions.reserved_mem_addr_cells,\n> +\t\t\t       &regions.reserved_mem_size_cells);\n> +\n> +\t/*\n> +\t * Iterate over the physical memory range covered by the lowmem region\n> +\t * in 2 MB increments, and count each offset at which we don't overlap\n> +\t * with any of the reserved regions for the zImage itself, the DTB,\n> +\t * the initrd and any regions described as reserved in the device tree.\n> +\t * This produces a count, which we will scale by multiplying by a 16-bit\n> +\t * random value and shifting right by 16 places.\n> +\t * Using this random value, we iterate over the physical memory range\n> +\t * again until we counted enough iterations, and return the offset we\n> +\t * ended up at.\n> +\t */\n> +\tnum = ((u16)seed * count_suitable_regions(fdt, &regions)) >> 16;\n> +\n> +\t*kaslr_offset = get_numbered_region(fdt, &regions, num) -\n> +\t\t\tregions.pa_start;\n> +\n> +\treturn *kaslr_offset;\n> +}\n> -- \n> 2.11.0\n> \n>","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"oqGvthtk\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"fnB8hpLe\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJt90105z9s72\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 04:54:24 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowVn-0004NS-Qr; Mon, 04 Sep 2017 18:54:19 +0000","from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowVj-0003a9-8g for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 18:54:18 +0000","by mail-io0-x231.google.com with SMTP id q64so4381833iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 11:53:54 -0700 (PDT)","from xanadu.home (modemcable199.200-80-70.mc.videotron.ca.\n\t[70.80.200.199]) by smtp.gmail.com with ESMTPSA id\n\tf204sm591857itc.23.2017.09.04.11.53.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 04 Sep 2017 11:53:53 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:\n\tIn-Reply-To:Subject:To:From:Date:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=8irtVYA5yCSqyTNsv774FHJGX2jpMOCiobZ7N27pJX8=;\n\tb=oqGvthtko/zhkp\n\tvegIyYHMX/jLJzUMChGgr5FhyRZXst3AUobGCC5f7INaBrw1LYceiEZHZY9cyg+qqtZBHnFuMkj5v\n\tmybfCw3TVBbmETKHyvwXtWksH2WUEK35IOmy6pe75L1r/TNw/aCpAT1NPP6Xen+n/MMJ5w30x2eQy\n\tgOKlwvNlTvLs4P1QClgaq0kB8q1eB+rJV3joSV0dY7BMgOE5Mx2CCpuYOxWG2v8IbmVtwif22tHCc\n\twcG3L6yz8pLqYNlPEOsjCGumAKGmHaqacnBufd5EwOohfNzvu+GwY+JqJSt6yjBMlIVOPhsybvrFl\n\t9WbDmTaspzRFp1uYFP8A==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=date:from:to:cc:subject:in-reply-to:message-id:references\n\t:user-agent:mime-version;\n\tbh=sh/40GqgaC7miXxpL5BfBV8RXNdjrGJd818SQfKy1fk=;\n\tb=fnB8hpLek8AAZ82oC/AEDqNdYIT4O2oj335BstUn482Xf7pYPpQXacepgvyNiqI7eJ\n\txmrFfoo/3lCRBi7QCZgyWdTKtrDAUNr5+Q6zcHE1clypTsxGzop6WQpPsJ1dnF8uXd3t\n\thLpS00C0XBcr3Dw5VOJChwIvu9uzY2aGx0nEE="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id\n\t:references:user-agent:mime-version;\n\tbh=sh/40GqgaC7miXxpL5BfBV8RXNdjrGJd818SQfKy1fk=;\n\tb=oJ+H5lXi5uCd4XTbN3Kyni9Tg8RexV8PG0fZst2Clc1PEeGWj8KW1bS2cpLd4uVunU\n\tWDFTRqy7kj4bItBdNYKaGBGn69FqaWbR5IEz/A15e3gw4s7UxwR2pcdXY+UTOCa4iHBB\n\tg/xPSMDCHAjGoyxd4NyV4JhvGp1KL/KlphTvWfJqjVcuRfVGKumEGYWiBsezEn2zR03O\n\t3+fepTXCjqwGx3Xp1s09rknaSi7oF81J4xAEMDurr0+zqfXVhqwue/sROI2yMOUoGvIN\n\tpI6ubimWf9DPuwgq0PHV0/26dq13U5DcMZeP5uRRUluTZjw1q/cxKJ8Wdfna+gxGOruo\n\txG0g==","X-Gm-Message-State":"AHPjjUi2f4WKJsoG/1gS5ycihQrNIF/CI5Wnaz5P6I6OBxdbXQLaJ/Eg\n\thdil+I3pmp2j0f6UVtLbcg==","X-Google-Smtp-Source":"ADKCNb79kYIz3NUPw6ElpGF+liW38NtXUndQSvH6LhKAUF6NpadM5kLKbncdw1GdNShqXLf9VCCIiA==","X-Received":"by 10.36.147.135 with SMTP id y129mr1447085itd.134.1504551233838;\n\tMon, 04 Sep 2017 11:53:53 -0700 (PDT)","Date":"Mon, 4 Sep 2017 14:53:52 -0400 (EDT)","From":"Nicolas Pitre <nicolas.pitre@linaro.org>","To":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Subject":"Re: [PATCH v2 26/29] ARM: decompressor: add KASLR support","In-Reply-To":"<20170903120757.14968-27-ard.biesheuvel@linaro.org>","Message-ID":"<nycvar.YSQ.7.76.1709041449041.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-27-ard.biesheuvel@linaro.org>","User-Agent":"Alpine 2.21 (LFD 202 2017-01-01)","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_115415_542559_CD77C2D9 ","X-CRM114-Status":"GOOD (  37.24  )","X-Spam-Score":"-2.0 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>, kernel-hardening@lists.openwall.com,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\tlinux-arm-kernel@lists.infradead.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762846,"web_url":"http://patchwork.ozlabs.org/comment/1762846/","msgid":"<CAKv+Gu8TSBAz5vykf6iseYeGOaKYNYay-YMRH0_dKAg8JbTiiQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T19:10:00","subject":"Re: [PATCH v2 19/29] ARM: kernel: make vmlinux buildable as a PIE\n\texecutable","submitter":{"id":26857,"url":"http://patchwork.ozlabs.org/api/people/26857/","name":"Ard Biesheuvel","email":"ard.biesheuvel@linaro.org"},"content":"On 4 September 2017 at 19:11, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:\n> On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n>\n>> Update the build flags and linker script to allow vmlinux to be built\n>> as a PIE  binary, which retains relocation information about absolute\n>> symbol references so that they can be fixed up at runtime. This will\n>> be used for implementing KASLR,\n>>\n>> Cc: Russell King <linux@armlinux.org.uk>\n>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n>> ---\n>>  arch/arm/Kconfig                 |  4 ++++\n>>  arch/arm/Makefile                |  5 +++++\n>>  arch/arm/include/asm/assembler.h |  2 +-\n>>  arch/arm/kernel/vmlinux.lds.S    |  9 +++++++++\n>>  include/linux/hidden.h           | 20 ++++++++++++++++++++\n>>  scripts/module-common.lds        |  1 +\n>>  6 files changed, 40 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig\n>> index 61a0cb15067e..300add3b8023 100644\n>> --- a/arch/arm/Kconfig\n>> +++ b/arch/arm/Kconfig\n>> @@ -2085,6 +2085,10 @@ config DMI\n>>         firmware need to be enabled. This would require the DMI subsystem\n>>         to be enabled much earlier than we do on ARM, which is non-trivial.\n>>\n>> +config RELOCATABLE\n>> +     bool\n>> +     select HAVE_ARCH_PREL32_RELOCATIONS\n>> +\n>\n> You should probably make it depend on !XIP_KERNEL.\n>\n\nIndeed.\n\n> Other than that\n>\n> Acked-by: Nicolas Pitre <nico@linaro.org>\n>\n\nThanks.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"I2gAal1N\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Ch8vpFAU\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmKDh5P63z9t2R\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 05:10:28 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowlN-0004Ke-Dt; Mon, 04 Sep 2017 19:10:25 +0000","from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowlJ-0002ve-J1 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 19:10:23 +0000","by mail-io0-x22e.google.com with SMTP id j141so525765ioj.4\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 12:10:01 -0700 (PDT)","by 10.107.162.1 with HTTP; Mon, 4 Sep 2017 12:10:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=jdahmSI2lr1jPCxpYiG9iCDXxPthmCvaX3f/wEaTdlk=;\n\tb=I2gAal1NnOQB0q\n\ttdBmR9e/V0JgnV2kYMcT5GpOvmfuGVtzDjGmYb6Jxfv5m4/yzaAnoFc5Twim/XvAA7C6z0mEbwzVE\n\tEvSH1eUykj83hr3s7gFFbRmQfVGROH2s43d7gnfPXXQAP9/mnUwDWI/wftOEV2ZazWeUN7J9NQjui\n\tUH2W0QvIiO4WhY8pnoNaMtDySUWZqSpEQSxUyUe5eERhVnj9LIt1SW/ayQoQnUwemzAoyTCovcBJn\n\tUc5yETjbaw/GQCx9b89pWKhJ3NiHQY8BBEhWcTmpuZhOoB/XeQAJTLB3bmbVYtvcyUC71IDzsD+M6\n\t34EK1Rt6cLt+92NJVViw==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=jCoe5l7YRBUmywrSNBmWW1c0YWqZKswfdGA25/NdrWM=;\n\tb=Ch8vpFAUCT/roKqHp7IeusEGN5n0G+Jl//O/5jtbg45ctUcXjCyqemYjl7LqiWGOHI\n\tIOxa/0GN3JRc+s4dJBLBbq9Pn84G0TfNfgbvrqWr/ZgDegwXWtK0mmcWWwp8J5nIFkCn\n\tzRf5SJ5OmE544NNmQpnf0FAlWMFvNDCy+pESA="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=jCoe5l7YRBUmywrSNBmWW1c0YWqZKswfdGA25/NdrWM=;\n\tb=XCBAHswonL2xZP7/YA+YfABYHzqM7lqPh2XPYVoODhUraoq2FU6/vyNsAzpIHXDEha\n\tT4RB8l50DxJZzMApV0X6qeUNCFzII1XS8vool4jRArzmY2uu4hEtS3gBuG/W4mSbRhLh\n\tOlp/92CAbN9XRcVfegYlSSeV37knfCgAdWbCWjLVC6z5DEyjIhyawgbO2Z3oz7XoYgvH\n\tKqz/lYsc4QEYkYlqCXD+Wh6g2FnB9Ttlv/94xg5cBp1PE1rrwgkRX25mEH8HbgYZvCL+\n\t7nz/xKwN3a6xUUKB1qYXkm+zEYRXPtqCaIbGsSTN86Xn6YtuqhzQWN09ryaQFeMiMS4H\n\tQCCw==","X-Gm-Message-State":"AHPjjUgESZprNTuz9NYV7zbboTQhKWNNot36PykWtka0/uSbWg6slZA/\n\tSTPEJ9iNMcxD+u4La0f8oJHPfksAjyGAzxU=","X-Google-Smtp-Source":"ADKCNb7uqM6oJXUpFSBOGYuZJTkcxq6ATacJcGER2QdDUpe4MGcg/5d1Mbc3x5N0qizWS2rV/a3d5Nuq5loBSe4pXes=","X-Received":"by 10.107.144.7 with SMTP id s7mr1814373iod.224.1504552200675;\n\tMon, 04 Sep 2017 12:10:00 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<nycvar.YSQ.7.76.1709041409530.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-20-ard.biesheuvel@linaro.org>\n\t<nycvar.YSQ.7.76.1709041409530.8603@knanqh.ubzr>","From":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Date":"Mon, 4 Sep 2017 20:10:00 +0100","Message-ID":"<CAKv+Gu8TSBAz5vykf6iseYeGOaKYNYay-YMRH0_dKAg8JbTiiQ@mail.gmail.com>","Subject":"Re: [PATCH v2 19/29] ARM: kernel: make vmlinux buildable as a PIE\n\texecutable","To":"Nicolas Pitre <nicolas.pitre@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_121021_669264_0DDD7380 ","X-CRM114-Status":"GOOD (  15.15  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>,\n\tKernel Hardening <kernel-hardening@lists.openwall.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762847,"web_url":"http://patchwork.ozlabs.org/comment/1762847/","msgid":"<CAKv+Gu9c=EaHg-hiu48ABQf01yVAK-APjP4skG7KVZD_3K4LZg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T19:09:27","subject":"Re: [PATCH v2 17/29] ARM: kernel: use relative phys-to-virt patch\n\ttables","submitter":{"id":26857,"url":"http://patchwork.ozlabs.org/api/people/26857/","name":"Ard Biesheuvel","email":"ard.biesheuvel@linaro.org"},"content":"On 4 September 2017 at 19:03, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:\n> On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n>\n>> Replace the contents of the __pv_table entries with relative references\n>> so that we don't have to relocate them at runtime when running the KASLR\n>> kernel. This ensures these quantities are invariant under runtime\n>> relocation, which makes any cache maintenance after runtime relocation\n>> unnecessary.\n>>\n>> Cc: Russell King <linux@armlinux.org.uk>\n>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n>> ---\n>>  arch/arm/include/asm/memory.h |  6 +++---\n>>  arch/arm/kernel/head.S        | 21 ++++++++++----------\n>>  2 files changed, 13 insertions(+), 14 deletions(-)\n>>\n>> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h\n>> index 1f54e4e98c1e..47a984e3a244 100644\n>> --- a/arch/arm/include/asm/memory.h\n>> +++ b/arch/arm/include/asm/memory.h\n>> @@ -195,7 +195,7 @@ extern const void *__pv_table_begin, *__pv_table_end;\n>>       __asm__(\"@ __pv_stub\\n\"                         \\\n>>       \"1:     \" instr \"       %0, %1, %2\\n\"           \\\n>>       \"       .pushsection .pv_table,\\\"a\\\"\\n\"         \\\n>> -     \"       .long   1b\\n\"                           \\\n>> +     \"       .long   1b - .\\n\"                       \\\n>>       \"       .popsection\\n\"                          \\\n>\n> [...]\n>\n>> --- a/arch/arm/kernel/head.S\n>> +++ b/arch/arm/kernel/head.S\n>> @@ -612,22 +611,22 @@ __fixup_a_pv_table:\n>>       orr     r6, r6, r7, lsl #12\n>>       orr     r6, #0x4000\n>>       b       2f\n>> -1:   add     r7, r3\n>> -     ldrh    ip, [r7, #2]\n>> +1:   add     r7, r4\n>> +     ldrh    ip, [r7, #-2]\n>\n> Please use \"ldrh ip, [r7, #(-4 + 2)]\" so the -4 offset is clearly\n> spelled out. The #-2 gave me a pause of confusion.\n>\n>>  ARM_BE8(rev16        ip, ip)\n>>       tst     ip, #0x4000\n>>       and     ip, #0x8f00\n>>       orrne   ip, r6  @ mask in offset bits 31-24\n>>       orreq   ip, r0  @ mask in offset bits 7-0\n>>  ARM_BE8(rev16        ip, ip)\n>> -     strh    ip, [r7, #2]\n>> +     strh    ip, [r7, #-2]\n>\n> Ditto here.\n>\n>>       bne     2f\n>> -     ldrh    ip, [r7]\n>> +     ldrh    ip, [r7, #-4]\n>\n> And to be clear, here I'd use \"#(-4 + 0)\" to be explicit.\n>\n>>  ARM_BE8(rev16        ip, ip)\n>>       bic     ip, #0x20\n>>       orr     ip, ip, r0, lsr #16\n>>  ARM_BE8(rev16        ip, ip)\n>> -     strh    ip, [r7]\n>> +     strh    ip, [r7, #-4]\n>\n> And so here.\n>\n\nOK\n\n>\n> With that:\n>\n> Reviewed-by: Nicolas Pitre <nico@linaro.org>\n\nThanks.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"j4OntGO3\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"cXVZStb/\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmKD648Z1z9sPs\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 05:09:57 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowkp-0002mE-SB; Mon, 04 Sep 2017 19:09:51 +0000","from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowkm-0002Ep-T6 for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 19:09:50 +0000","by mail-io0-x22b.google.com with SMTP id z67so4583213iof.3\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 12:09:28 -0700 (PDT)","by 10.107.162.1 with HTTP; Mon, 4 Sep 2017 12:09:27 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=lIt6xg9BBbgFPLu62LKNzx/ASEaKDTHDn60K+wMI8SQ=;\n\tb=j4OntGO3Rp2MLq\n\tyB7jK8jURnnagWTiDsHYM3agwypyGCFik/A4oJ9OSkozwV4JzL6LHZ6qSHSaOH+MIBYOWX+KK0hFw\n\tUEDvdZoJlavE+Yl7LYO8anpMoK8/ZDOE4JAmiY8DTt66HveahMBRdON8O4Gxy3l5cS9wPq+5uyVup\n\tpEPmTe1YA5jsL6AE+9/89SB46ryQ/hc93/cMGY2oqtKgqi8SwjvqsVMd5JpMrJnlW27rG7E616vIx\n\tUZa/5igA2kew/fmbiAq85+eQl1ewO2Z56ZZLcB1jteMAp2DtatV3HmROdev081X41F3j1dIp0xyAw\n\tpjSTptBx1cP0emOc6UgQ==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=2y5asBpD/RPhKz1DBjaVkBwyaqR6aw47gLfdbGY+FGA=;\n\tb=cXVZStb/6HIKf9pvq9G07+cZhrZeY4o/Q6kyaHfTEn3GEH7v3aGabGAfVGlU/VIqSi\n\tYZqArpp5b3Pv5oN/AOQjjfSUBAjsH/oBwmv6SoTmU/Cwp69/jdv/iUj6X2syTMVAJ7ps\n\tLpNeC5/oNIMJizx9jssbgmKaaB1iyRFDkjeVo="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=2y5asBpD/RPhKz1DBjaVkBwyaqR6aw47gLfdbGY+FGA=;\n\tb=eDp0B1cz9fQ/i3FluF58qMUNSSM+mInM9NszkFw9mFl17ZrBamB63wHEfSdVHAA5KP\n\tQnl03MBnljXYViSyzqrW35UOx385wANOor/GIwWVerHKQaZM4Q4NALgYz+GekDxS5KqP\n\tyToTB8x3TGPZTUllF72BpwW5eEhVw9GpYkeSofq0lJmt3S163e3aB7++7NdLCOMbX4iq\n\tZfDsJFe2BQOgyDHhBkXTftLZAX3bBhNR3lotVPgA8nWwkmL5gPiTtPb5wB0qmvcTUd7B\n\tSijL+TsvzA4h2U8mUfX23tgWMAykHP0lKrZ9SQsR1pSGSqaRB2Il1N/sqtXdpMVHmBsq\n\tSvcA==","X-Gm-Message-State":"AHPjjUg/9WkG504tkdnnjuABprpkBn+sYzJrxguK1FkfH291v5ns1+IM\n\tFhrci1+CD6dJahEemlDoRwKBKRmII4+7","X-Google-Smtp-Source":"ADKCNb6V6JKh1/wue4gXBhYwBeihrfEdEIwBDzPaX1gzTYDnJMfnFrtGG6alRqOOcZ4ykhLcawqLPjIz2XSO2hhS+gY=","X-Received":"by 10.36.8.138 with SMTP id 132mr1784198itc.162.1504552167833;\n\tMon, 04 Sep 2017 12:09:27 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<nycvar.YSQ.7.76.1709041326130.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-18-ard.biesheuvel@linaro.org>\n\t<nycvar.YSQ.7.76.1709041326130.8603@knanqh.ubzr>","From":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Date":"Mon, 4 Sep 2017 20:09:27 +0100","Message-ID":"<CAKv+Gu9c=EaHg-hiu48ABQf01yVAK-APjP4skG7KVZD_3K4LZg@mail.gmail.com>","Subject":"Re: [PATCH v2 17/29] ARM: kernel: use relative phys-to-virt patch\n\ttables","To":"Nicolas Pitre <nicolas.pitre@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_120949_225506_5E5C29A8 ","X-CRM114-Status":"GOOD (  13.69  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:22b listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>,\n\tKernel Hardening <kernel-hardening@lists.openwall.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}},{"id":1762848,"web_url":"http://patchwork.ozlabs.org/comment/1762848/","msgid":"<CAKv+Gu_mrngkDQY8YzjhEgfS_UZz3n0deVjXvkzb1XuAvUn4ag@mail.gmail.com>","list_archive_url":null,"date":"2017-09-04T19:14:54","subject":"Re: [PATCH v2 20/29] ARM: kernel: use PC-relative symbol references\n\tin MMU switch code","submitter":{"id":26857,"url":"http://patchwork.ozlabs.org/api/people/26857/","name":"Ard Biesheuvel","email":"ard.biesheuvel@linaro.org"},"content":"On 4 September 2017 at 19:15, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:\n> On Sun, 3 Sep 2017, Ard Biesheuvel wrote:\n>\n>> To prepare for adding support for KASLR, which relocates all absolute\n>> symbol references at runtime after the caches have been enabled,\n>> update the MMU switch code to avoid using absolute symbol references\n>> where possible. This ensures these quantities are invariant under\n>> runtime relocation.\n>>\n>> Cc: Russell King <linux@armlinux.org.uk>\n>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>\n>> ---\n>>  arch/arm/kernel/head-common.S | 39 ++++++++------------\n>>  1 file changed, 15 insertions(+), 24 deletions(-)\n>>\n>> diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S\n>> index 06035488130c..b74477507a12 100644\n>> --- a/arch/arm/kernel/head-common.S\n>> +++ b/arch/arm/kernel/head-common.S\n>> @@ -79,9 +79,10 @@ ENDPROC(__vet_atags)\n>>   */\n>>       __INIT\n>>  __mmap_switched:\n>> -     adr     r3, __mmap_switched_data\n>> -\n>> -     ldmia   r3!, {r4, r5, r6, r7}\n>> +     adr_l   r4, __data_loc\n>> +     adr_l   r5, _sdata\n>> +     adr_l   r6, __bss_start\n>> +     adr_l   r7, _end\n>>       cmp     r4, r5                          @ Copy data segment if needed\n>>  1:   cmpne   r5, r6\n>>       ldrne   fp, [r4], #4\n>> @@ -93,9 +94,17 @@ __mmap_switched:\n>>       strcc   fp, [r6],#4\n>>       bcc     1b\n>>\n>> - ARM(        ldmia   r3, {r4, r5, r6, r7, sp})\n>> - THUMB(      ldmia   r3, {r4, r5, r6, r7}    )\n>> - THUMB(      ldr     sp, [r3, #16]           )\n>> +     adr_l   r3, init_thread_union + THREAD_START_SP\n>> +     mov     sp, r3\n>> +     adr_l   r4, processor_id\n>> +     adr_l   r5, __machine_arch_type\n>> +     adr_l   r6, __atags_pointer\n>> +#ifdef CONFIG_CPU_CP15\n>> +     adr_l   r7, cr_alignment\n>> +#else\n>> +     mov     r7, #0\n>> +#endif\n>\n> The code that follows is testing for a non-zero r7 value to store r0 so\n> you could make that code conditional rather than loading 0 here.\n>\n\nOK, I will look into that.","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"VeVIQct+\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"hTN8f3hq\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmKLT34Svz9s7c\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 05:15:25 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowq9-0006B5-Du; Mon, 04 Sep 2017 19:15:21 +0000","from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dowq5-0004vZ-2E for linux-arm-kernel@lists.infradead.org;\n\tMon, 04 Sep 2017 19:15:19 +0000","by mail-io0-x236.google.com with SMTP id q64so4611969iod.5\n\tfor <linux-arm-kernel@lists.infradead.org>;\n\tMon, 04 Sep 2017 12:14:55 -0700 (PDT)","by 10.107.162.1 with HTTP; Mon, 4 Sep 2017 12:14:54 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:\n\tReferences:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=H1XTxGFT5mteft5ta8d+FKnGwLBKnsHyewmXzNHB1M8=;\n\tb=VeVIQct+t0QaY0\n\tpllPWNq0FGRI0ZqM8eQkuIhFjQZvZssySLV/c46dokjtZRY6e43HfF9Ap8nwZ0mFHgeqkpbnJNIKq\n\tLqyuADsVITvz2v4sXq+SE7iZAwH0vMwO0AFEZ7Ejxwdm/osMMuFpBXOeDnPk3EqlPuyEf5ripKaLd\n\teoolPuvHcxhjpagIMp5DvP6b5wZNH7YTFHySQAysJRlOab/8xO/lIo0iYJDEFzRgBCWVN/4QDKCMc\n\tv8EHqNEvmWvgpRvDNGP0K2ZRjF1wbLY93t9V6xYNOVbdysQNrv/3B3+QPDztltnC/AEvf2V2JddWo\n\tyX9eGEf3jAVwY64nKWMg==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=Ag8BS2mcO9mN4nZXutLUzWX7YL0FpGcKTNbifVocOXY=;\n\tb=hTN8f3hqXu8lTNTnXnFfYMSNnprobqLWqPGRZICV0mE0TChxoF5pf47cmEF9ilyW9w\n\tC/WdpxMgQ9axpDTilrF2adNsPkKuAiBQOo2PaN4w4XmbN7u3vGMOMW6Ri5L/mn+zQsdS\n\tFx3R8YrV0AHv5NGo123l0j2msZSWF1PzvBWQw="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=Ag8BS2mcO9mN4nZXutLUzWX7YL0FpGcKTNbifVocOXY=;\n\tb=W0pDPXzhtzvzqOdHdtwwnW/jMlSgMCLnMCgPm/4Cb6hUvadfb8XKQOs0hR/S/C8Rxw\n\tde6hNuVqDIn/ffUIVzbkQcRdTyBKr/flVmMMMPROuiusY7l8xPvUXksXi5woootowQMv\n\tnoUAuFe6aRFUEBbw40npawXM9izlr0cQ0kunxEXUxTCxkUVuIKZ2YuKeu3usS3U6VuVY\n\tHUsHRZemOq9Xph9THEbyKz36kq20ewhagJf9/Gt6H6b0y3g9R3h5GLlMkYuxdvKRR5N+\n\tjw2MH/H4pEgTzuJ6Bu3T/Rku8M760STcgtWIza20VZvpbmnR8rkLacfAHACqqswsRS7l\n\tMluw==","X-Gm-Message-State":"AHPjjUiJRyvFXuLx7abU6nDS8yTdYI/FfBweovtkYpXTdI5SizCYQIsp\n\thmGHX6m4452WKgjhFjQN0AA4qPw+lL+I","X-Google-Smtp-Source":"ADKCNb4r2xgYHKroEuCYV5eQFd1jNB4PWwin6bEy1dBXche/CKGqCSHWKn3VPQuIdzq2Lw8lBxMNPjlmq+Ao9ect7W8=","X-Received":"by 10.36.139.195 with SMTP id g186mr1842012ite.128.1504552494978;\n\tMon, 04 Sep 2017 12:14:54 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<nycvar.YSQ.7.76.1709041412160.8603@knanqh.ubzr>","References":"<20170903120757.14968-1-ard.biesheuvel@linaro.org>\n\t<20170903120757.14968-21-ard.biesheuvel@linaro.org>\n\t<nycvar.YSQ.7.76.1709041412160.8603@knanqh.ubzr>","From":"Ard Biesheuvel <ard.biesheuvel@linaro.org>","Date":"Mon, 4 Sep 2017 20:14:54 +0100","Message-ID":"<CAKv+Gu_mrngkDQY8YzjhEgfS_UZz3n0deVjXvkzb1XuAvUn4ag@mail.gmail.com>","Subject":"Re: [PATCH v2 20/29] ARM: kernel: use PC-relative symbol references\n\tin MMU switch code","To":"Nicolas Pitre <nicolas.pitre@linaro.org>","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170904_121517_289398_9A9FF878 ","X-CRM114-Status":"GOOD (  12.51  )","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2607:f8b0:4001:c06:0:0:0:236 listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>, Kees Cook <keescook@chromium.org>, \n\tArnd Bergmann <arnd@arndb.de>,\n\tKernel Hardening <kernel-hardening@lists.openwall.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\tRussell King <linux@armlinux.org.uk>, \n\tDave Martin <dave.martin@arm.com>, Tony Lindgren <tony@atomide.com>, \n\tMatt Fleming <matt@codeblueprint.co.uk>,\n\tThomas Garnier <thgarnie@google.com>, \n\t\"linux-arm-kernel@lists.infradead.org\"\n\t<linux-arm-kernel@lists.infradead.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]