From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE66CC43461 for ; Mon, 14 Sep 2020 16:04:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D87F21741 for ; Mon, 14 Sep 2020 16:04:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mr7SdlFx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uMO0rA52" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D87F21741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rtMDOad8U449e4CDNZl0Lajx3csA1vYELSs8uGJ5H6I=; b=mr7SdlFxw6siaDd5ujP/mZ60x Z+nbD/GxtLPKadPWmc1Bc8LA6NJf7UTdfeDAaV9XhIlssHPQo2UDrIQMc2s+kyHzqdjaaxC9PrI3l 2MC+tkiPOS/vCFpIHcRG+ptM8RtlVK5bEL+FX/j+TIvnoumn/L9nfF0qCOSaAF5pF3K5Hewt5z/H4 whl4C2e+WsRKFKKgOZy2DlkU0BEYW0yE8gkQfjz0umBNr1NP55Z0g42dkv9SY0hWkbeGxocu+ncIg SRl6DTJv18byj6YPyOFDfiBNGrQNysLE+utN+ihHp22Q4VvDKiR+w95o2RxiG7q6GmpZ7iPrmRAXs kj1mDiwjQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHqvg-0007td-Jp; Mon, 14 Sep 2020 16:02:08 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHqve-0007tG-5b for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 16:02:07 +0000 Received: by mail-wr1-x443.google.com with SMTP id e16so263406wrm.2 for ; Mon, 14 Sep 2020 09:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=n6LtCGvrAXE3QiE4qfJQGgn89kMaY1QEsIyHXiYtTTc=; b=uMO0rA52/BJZa3hesvspLsRNPKOgvDHB48G3FFPOnOTHBvO/7rzHvbZH+I+ezWRfER gGgQ5y/XC6V89t9/Cnj0yTvVFYqa6YvbsNVA/4QPyivhzcUj6JdwA3IZpyMJrpBO6EFj RIXJMmdGYuChKvDCXMTRC6UAL3aHZHAi4LIWcQ/UYrymAp9TxuevXWznP3BcpYb6mpu4 BhL9hIZUOeg/xF6oeIJr/pByUK6pVGXKdkctS3rVaFPczGwl5CmdAhihkzkrSDzQHasD Cv9ebamJkPytXiJLcbdH3bmbaAa1hgqXzVeH4C3gixvhKmpVX10AZXpvmHt3fxzpriPk nDVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=n6LtCGvrAXE3QiE4qfJQGgn89kMaY1QEsIyHXiYtTTc=; b=gZcATyEvBNGdkum3vVO1z0XzwzUc+BKNdwYijmztdv0T9Ip8dOS9Ssmck39i9aXWZd 8Nt3vNxlTl2L2mY5xZL4F32jM8fOawDEJt+7O1/HwTCiL+r1UniOhhAFY4fKHd/rqPT1 BeJWWu6R8M06erCe9YLCMPwspF3V0+ywiUAtyJLaAzhxqf70uG+zzXokZPmmSFU7Oqjt BN45RWAj2jBT66LxX4kHd5lsvDGJwSmGJPzBe2/RaVPiRlkPUncW5o3jd4zc3Fjkyugg gTafZUVgwzkHwNij78GeJP63sTejF69OYySE4+5+f990+0UFMHwdISgkP9YanRBAuGQ1 i2Ww== X-Gm-Message-State: AOAM532r+4Yw9tsfexw2efoDFOjr/1HZQUk6Vo0HDWp9yLdFdnTJQ/ao CvROBSDqAONSrwTZO9OgJIcFHw== X-Google-Smtp-Source: ABdhPJxrxx4pHXAatCaTpLx0Z01e1J3C6ex7zab4CjGtNT/uGp91v/25pIPlvN+Y7kD/f3mo80j7AA== X-Received: by 2002:a5d:4c90:: with SMTP id z16mr17678413wrs.170.1600099324621; Mon, 14 Sep 2020 09:02:04 -0700 (PDT) Received: from apalos.home (athedsl-246545.home.otenet.gr. [85.73.10.175]) by smtp.gmail.com with ESMTPSA id v204sm20508924wmg.20.2020.09.14.09.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 09:02:04 -0700 (PDT) Date: Mon, 14 Sep 2020 19:02:00 +0300 From: Ilias Apalodimas To: Will Deacon Subject: Re: [PATCH] arm64: bpf: Fix branch offset in JIT Message-ID: <20200914160200.GA19026@apalos.home> References: <20200914083622.116554-1-ilias.apalodimas@linaro.org> <20200914122042.GA24441@willie-the-truck> <20200914123504.GA124316@apalos.home> <20200914132350.GA126552@apalos.home> <20200914140114.GG24441@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200914140114.GG24441@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_120206_230642_A8E78F0E X-CRM114-Status: GOOD ( 15.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jean-Philippe Brucker , Song Liu , linux-kernel@vger.kernel.org, Jesper Dangaard Brouer , Daniel Borkmann , Yauheni Kaliuta , Zi Shen Lim , naresh.kamboju@linaro.org, John Fastabend , Alexei Starovoitov , Martin KaFai Lau , netdev@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Catalin Marinas , KP Singh , Yonghong Song , bpf@vger.kernel.org, Andrii Nakryiko , ardb@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Will, On Mon, Sep 14, 2020 at 03:01:15PM +0100, Will Deacon wrote: > Hi Ilias, > [...] > > > > > > > > No Fixes: tag? > > > > > > I'll re-spin and apply one > > > > > Any suggestion on any Fixes I should apply? The original code was 'correct' and > > broke only when bounded loops and their self-tests were introduced. > > Ouch, that's pretty bad as it means nobody is regression testing BPF on > arm64 with mainline. Damn. That might not be entirely true. Since offset is a pointer, there's a chance (and a pretty high one according to my reproducer) that the offset[-1] value happens to be 0. In that case the tests will pass fine. I can reproduce the bug approximately 1 every 6-7 passes here. I'll send a v2 shortly fixing the tags and adding a few comments on the code, which will hopefully make future reading easier. Cheers /Ilias _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel