Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1963946ima; Thu, 25 Oct 2018 07:39:22 -0700 (PDT) X-Google-Smtp-Source: AJdET5eu2Sb29mOVt4+HV5Lc+JRaTjMKSZK8xRJN972w/UyTpmYV0g6g9hFDqeMBFyQmEL6z6Fo+ X-Received: by 2002:a63:5c61:: with SMTP id n33-v6mr1667376pgm.1.1540478362442; Thu, 25 Oct 2018 07:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540478362; cv=none; d=google.com; s=arc-20160816; b=APRtV3ixSBIVVli0VgqbPCYjhbV0G1SuVvbS75v/vLPz2QFzNQNntFslG7t5YWpnhh twxgq/Ry/SvLYtI0N0ue5V5bZA2T1Awo5Z1WYJTpSFSWkFFJ+aLcz9E+C8qgE6st5goZ 3vXZH5m6c2SrHjxnP44Gm8MrfUOPECp5WlCEngkq93HEZm5pWw4KnPwI/vdkkPhMwHAo bM31N5O0CDKGwRVGvh9HVXB0WuIwuZQMnNdK3ctcFwieUMalOT2osq0yigRaxz7/J/Jm kPeWm91J1tOKUeP3DaD5+H4Awot/P6mQF2YTvYdW5gidDx2TRJ0EoDwQUzYaxG87dEt6 D8bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=jUf7+0FFYLOayQxZ9G3DIm2Yr2aSocJpvfFX3WaGwjQ=; b=bEaop3x/3LwiW/IW1MLfCqt2Z7Wi5BTT+XddHqvNaFVlUREfpoHFEol6g9HKGk04tk j82E4TlUEBT74gjX++pQRXxKYQ8bN+d+6//G12xJlFmRKLr/Ppl17bH1T7XW2JOrOF/Z oiIDF/0rrdP5EbUrXRaf8y7e90Yrnd34uedrslyYmoVvxaN6a03DLzbaysdRyV/yKl6b IXEyCzDqI3G8N1KBsJu83/8oB7Ukdj2iOiFOX6IlWTB3l83L1OBjIQl8lVYKoFBsiJm6 498TvAkJx/WJspWRLEpFtV9k+lEROmN/rQ1UUV4G8o1s50vCfeEDyR2RrmoBaNRSxRIC OTcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sfsWs4UP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si8318110pgh.45.2018.10.25.07.38.46; Thu, 25 Oct 2018 07:39:22 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=sfsWs4UP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729397AbeJYWt1 (ORCPT + 99 others); Thu, 25 Oct 2018 18:49:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:58584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729381AbeJYWtZ (ORCPT ); Thu, 25 Oct 2018 18:49:25 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0741620868; Thu, 25 Oct 2018 14:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476989; bh=4Xq4SOsjVyyVorzbDU/Z8L31vQpAWYy5ZsqzH1VTEak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sfsWs4UPh+d/AZsE7LK74PrUmyLGkcUMH60P2d558ND6+XgvkKzUwp79aMc5KLnFs x7YEhVdhlBHd5c4gHbeOfgK1UGy1UdOBy90PtT+83W8lqNwnhCEYml1JW0KyCk20KM 27OuxK5E/YzteZ5C7E/U8bGTFirgUBMOxvLExqaQ= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thadeu Lima de Souza Cascardo , Daniel Borkmann , Sasha Levin Subject: [PATCH AUTOSEL 4.9 85/98] test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches Date: Thu, 25 Oct 2018 10:14:10 -0400 Message-Id: <20181025141423.213774-85-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141423.213774-1-sashal@kernel.org> References: <20181025141423.213774-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thadeu Lima de Souza Cascardo [ Upstream commit 52fda36d63bfc8c8e8ae5eda8eb5ac6f52cd67ed ] Function bpf_fill_maxinsns11 is designed to not be able to be JITed on x86_64. So, it fails when CONFIG_BPF_JIT_ALWAYS_ON=y, and commit 09584b406742 ("bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y") makes sure that failure is detected on that case. However, it does not fail on other architectures, which have a different JIT compiler design. So, test_bpf has started to fail to load on those. After this fix, test_bpf loads fine on both x86_64 and ppc64el. Fixes: 09584b406742 ("bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y") Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: Yonghong Song Signed-off-by: Daniel Borkmann Signed-off-by: Sasha Levin --- lib/test_bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 1586dfdea809..960d4d627361 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -4874,7 +4874,7 @@ static struct bpf_test tests[] = { { "BPF_MAXINSNS: Jump, gap, jump, ...", { }, -#ifdef CONFIG_BPF_JIT_ALWAYS_ON +#if defined(CONFIG_BPF_JIT_ALWAYS_ON) && defined(CONFIG_X86) CLASSIC | FLAG_NO_DATA | FLAG_EXPECTED_FAIL, #else CLASSIC | FLAG_NO_DATA, -- 2.17.1