Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1935510ima; Thu, 25 Oct 2018 07:15:38 -0700 (PDT) X-Google-Smtp-Source: AJdET5dWgUbjFTLOf/kxYJfxqKJ+9X95DVt/UjsuezSjsRfELQoIPty4lyMUIQlf2i3cTln/7ked X-Received: by 2002:a62:2542:: with SMTP id l63-v6mr1814336pfl.64.1540476937907; Thu, 25 Oct 2018 07:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476937; cv=none; d=google.com; s=arc-20160816; b=fM2Dh0zyeQPKNH/vCZzB7+GIU/YCl1g9udnTQ7oNDbuXlA6n6t0ZU2oW7/N/jW8dQh 0BrLq0aBfu1n7NhV4ICOYGWwH3F4GrFjwI8H8qef2Ar1ZCqPbdsB9B1vEAgGzLsZsjdq p0gfkMpDN1cmaG2QLFHhde7exlrp7zemW9L7uc9cWRR1w9F52m9pCgzBDdUYjb6Mp4q9 FR0RpyVUc6rZ0XChK2MCjItDFQ0u6p0IQ5Nr74zhG/4Vsvil0Nh2toG4gRjZQBUxc5PI PJfjeuHL031MTOZZOFYXCNzKnrFntOJUZs5O1bLPjqw0+D8InZG+jOWdF7MdZh5YYU7I 4tqA== 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=bn3eebAYHfjQTTnoIfL52i5L0CE+8QgFqO0qaFnQpnI=; b=iUQAS0BdH7K+nepWknbz7ovqf+IbAJtBFSiW6+z5sDPykZqi3IigH0crNTWDzqfsW8 xkYlnXUqmhxY/+wa9GG6jCAT3ZglsnT9Z4tUDMS19cfZia9Pm+2nlh2qZ+U+rJP84wy2 nIUjVfvpEq6bjRgZAS2Pv1GtPT4zivWvCbd3lPnfVRTI3h8aSRKsCxx2uEtLW4AX5xQy cnt2Lb4YP8fJEp3xb21zoiomPfh+sY+aOw7iqruDocNZlf5CUbCEN8uXmKbQX6a4VI5A 0t8taLPTzHGN2lNXGZF2FsvopTjHw+XcatE7uhc2iUmEDeIG2ARholBXUOWIO9YRf+lt qNUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aQrq7Ipv; 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 65-v6si6470071pgj.173.2018.10.25.07.15.07; Thu, 25 Oct 2018 07:15:37 -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=aQrq7Ipv; 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 S1728138AbeJYWoX (ORCPT + 99 others); Thu, 25 Oct 2018 18:44:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:53100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728110AbeJYWoW (ORCPT ); Thu, 25 Oct 2018 18:44:22 -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 26A862083E; Thu, 25 Oct 2018 14:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476687; bh=X7MZL5nLxNT84jQAols5mPzKwNehQ4sPY4erL8lyJMA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQrq7IpvI8vdtgiXDVd/k+Ser1D9eonrmhEDfAfDQM7OgHKoRilB+Dis61zAAGji2 Kay0bHRQcA5OpWXdgiZD4oGEcd2RYNHGfAklvxtHDa+h+P7pPOzrkWrMmGDfZLeMlC rqUOF4Y3VckyjYdu3MbAEROivwvn43a2abzwdCIM= 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.14 23/46] test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches Date: Thu, 25 Oct 2018 10:10:30 -0400 Message-Id: <20181025141053.213330-23-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-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 64701b4c9900..75ebf2bbc2ee 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -5427,7 +5427,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