Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp162702imu; Tue, 27 Nov 2018 10:26:32 -0800 (PST) X-Google-Smtp-Source: AJdET5eDX80cl9iri0G+nmmyHJKXZ/+Lb1vbikpETNHFijpVIWXqm7ZyJhDTD33s0gJee0lruGh2 X-Received: by 2002:aa7:8758:: with SMTP id g24mr33352719pfo.250.1543343192793; Tue, 27 Nov 2018 10:26:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543343192; cv=none; d=google.com; s=arc-20160816; b=O5IHGbKSDppzQuAE8ndaXQrtsismydY1JyQKHDlcLYU1Jg3chMSXUBt3H4gkTn3iLf pJmj1uODEHOQygKMtgt56TUu2NhNrewc+HfoA+y6QZit/kou1tcJJ4DKPQUg9mFUUaRJ RIXB75eFZPq4mhiPlcEBWOPWdZIHJFYePHqhpjP1AkQXMmg/XXzwh2bETCLa7lgTQ8Hf hlmttz+G0MrE7ZwXFI3kCUuuacmtoDRD7OGSmELRUvArJR3SBLD6H+N6Q/iIjjPqpMLr t38kFcNAWdBu7wZP5z3U9XG7YUbfRoIV8KtfPrT5iH8pZCAUhGzznaoKaMG+KzLtQW8M Scnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=3lFSJDkDsYc7i9XzrGTl88htmVDj2+4Q70fe1iI2OSk=; b=h6LvgFjwZcudg3TL0T+AJhA8pGNg/Xhq6XXLwj9fnwalmlEcE9yJPJPXG9SKrRdRq+ 5qNkMVZqFUO2b8oKvesVHljmLiZfzUTzdGVoiYT4h+77FRSbrqJ6TFarrEQGy1E0Vt5L 52mKt3BeQXzzRY9H8f4WR6ycYUWZ4u4W5mGvjUWYc2zCWaSsnbKLLeQPVR7tetCrGU9b iD0nSaYoBhnkxmwZQ2t+fompIcfvnVGm1bCg1oI7KgGw+88Z5Td74zwBCNZaXi3d8u/T C2Llapu2LDzNDKWiSbCuzxBrIW8eObnxh031AVMys7ehDUR2WQwhtqRvsKKlKuqB9T53 XLTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si4486240pld.229.2018.11.27.10.26.14; Tue, 27 Nov 2018 10:26:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728916AbeK1FX3 (ORCPT + 99 others); Wed, 28 Nov 2018 00:23:29 -0500 Received: from www62.your-server.de ([213.133.104.62]:60340 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725758AbeK1FX3 (ORCPT ); Wed, 28 Nov 2018 00:23:29 -0500 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1gRi2M-0003j8-1c; Tue, 27 Nov 2018 19:24:42 +0100 Received: from [178.197.249.21] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gRi2L-000RJe-Qs; Tue, 27 Nov 2018 19:24:41 +0100 Subject: Re: [PATCH] arm64/bpf: use movn/movk/movk sequence to generate kernel addresses To: Will Deacon , Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, ast@fb.com References: <20181123172902.21480-1-ard.biesheuvel@linaro.org> <20181127182203.GA19721@arm.com> From: Daniel Borkmann Message-ID: Date: Tue, 27 Nov 2018 19:24:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20181127182203.GA19721@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.2/25158/Tue Nov 27 15:16:14 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/27/2018 07:22 PM, Will Deacon wrote: > Hi Ard, > > On Fri, Nov 23, 2018 at 06:29:02PM +0100, Ard Biesheuvel wrote: >> On arm64, all executable code is guaranteed to reside in the vmalloc >> space (or the module space), and so jump targets will only use 48 >> bits at most, and the remaining bits are guaranteed to be 0x1. >> >> This means we can generate an immediate jump address using a sequence >> of one MOVN (move wide negated) and two MOVK instructions, where the >> first one sets the lower 16 bits but also sets all top bits to 0x1. >> >> Signed-off-by: Ard Biesheuvel >> --- > > Acked-by: Will Deacon > > Denial, Alexei, shall I take this via arm64, or would you rather take > it via davem? Yeah we can take it via bpf trees, thanks. Cheers, Daniel