Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3551351imu; Fri, 30 Nov 2018 02:08:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/X/RK3LnFvbQcl8QposNn5NUDrPEM+MJk7VdRlGvkO83IPP6soZwGNknffy79bnwV7B4TFh X-Received: by 2002:a17:902:8c98:: with SMTP id t24mr5084819plo.130.1543572516611; Fri, 30 Nov 2018 02:08:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543572516; cv=none; d=google.com; s=arc-20160816; b=mmWnar3INeCwwSvCuryvqGscIKzrtqDXN9I7rf7GT/swKCGQIF3clXkRrssrhAcO07 aklaXsY2KXJMsi6I5AnXivJ4B3jTE0cmMl1StMpj2kiwvIoIBj6YgJk3WmVipuEwmjmk UpMFF4manQ8DpSCCMMLLPgTMurf4yqlbA+g3yqjI/MscMQ1OjU7GqMuG8O/lFdvScKtS cpEiuNEeFRqBWpxJ+EkrpxtdOrTiTjy1TjzRePiKHidNTjND36L65HXoI5tgZbITwSlw Ij6LvgfP8+JESDdvYgkeBEACvPl1Jj6KuPnG93i6gadooU6VPqi0rqbv5iuTKft0F6/5 bNLg== 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:references:cc:to:from:subject; bh=C0XEDFNGiOhYEHnJKGFd3+oxStb/lAUM2ZVMiZBXQHg=; b=aIsWaMco5L+4OCSHrqSO363PH8jxy0/FgoiyuXEBihTqQ8JCVwT+8hAzoBh7AJVvVI CXGIswWhSZOGx9TwGnxDYTFi7z9xwURgou/gw8Lkvw0ThzWtVAQ3PhTNRQxynK2gfiMU qoWJMoDktpkXcV2Ff2eN77k80coBJp2eCh4q3ioTl3R9Fg+xc7bfpJapyAtm/Dn9hYam rrjKy2aq3Ix4Qye+8BYm0YfxKTZUerkiuShuwQB6ryP0GneF8sXu+blkPnPWh38vMMV3 2ZdWfapPZboU8d8RaaIX/At2oUvUoOopez0oHd+ZQYGRlLvjUc/YduCDlrSC+Lo+S1B/ mYXg== 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 d37si940338plb.140.2018.11.30.02.08.21; Fri, 30 Nov 2018 02:08:36 -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 S1726814AbeK3VQW (ORCPT + 99 others); Fri, 30 Nov 2018 16:16:22 -0500 Received: from www62.your-server.de ([213.133.104.62]:58880 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbeK3VQW (ORCPT ); Fri, 30 Nov 2018 16:16:22 -0500 Received: from [78.46.172.2] (helo=sslproxy05.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 1gSfht-0001eZ-0m; Fri, 30 Nov 2018 11:07:33 +0100 Received: from [2a02:1203:ecb1:b710:c81f:d2d6:50a9:c2d] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gSfhs-000X48-Nu; Fri, 30 Nov 2018 11:07:32 +0100 Subject: Re: [PATCH] arm64/bpf: use movn/movk/movk sequence to generate kernel addresses From: Daniel Borkmann 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> Message-ID: Date: Fri, 30 Nov 2018 11:07:32 +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: 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/25166/Fri Nov 30 07:15:29 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:24 PM, Daniel Borkmann wrote: > 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. And now applied, thanks!