Received: by 10.213.65.68 with SMTP id h4csp388089imn; Tue, 20 Mar 2018 06:01:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELu2etFhJeMVB2FzjW4mhewGtsNQuykoAD2KHlQa/Gri2ju0g06W6ClDi79wVJSejJOEgeV0 X-Received: by 10.98.152.22 with SMTP id q22mr13613484pfd.178.1521550862224; Tue, 20 Mar 2018 06:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521550862; cv=none; d=google.com; s=arc-20160816; b=Vc4risApJ9TbeF1QoTy4lv5nmMn+ecacHjaDH0Kpuk5dOV8ZjbnHIOUbL/l0ratooj +s6PjgKC+cNTEcCWGL4dTtrsRKd0dm06ng+nOhEESPiMGPEXWNzqdL37ZnHvRgMjUPH5 Ey04bOQDrmT9vg0CjG1TCizZ6Vl5kTyQfSl9KpgK5GMMmoMsnh+4N9olL1Gq0GVg3kMi uQy2voZYYNOFjwIkkOt7hA1j5b06x67Dt+stfFilIsmphcGdEkGJ7/RB8rjx4CQxG25L 12Dzf2Qlo155cNKcLk5hSOoM+2qI3EvD6a8R9F5ZKVtLP/b8xrzNhie0qY/brGYaHryS gjJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=vtSQIL55T6t8oHXBWEXsuKPoVL556am7YHEY3k5H5pQ=; b=lctIPL4av/HB210d9s2lQG1UgI4kqPyTKRvHYrHB74rsQxYM6qPpYdHRIWFtH2Swqu HO9Fqnt/83dV+zxggxwvo7R0ynz9I2Z/iWOldPd3cM+a2Ih6aecVQU8PlZFJU2ZhZSMA xpuF1wcA/bk9ueaeAFEjqFG1K34TVdVfTX5p3wuILlqlUNwVCqrABhLFNny9HlnEMk4A cIQtR10XNRLTN/ozrDlwK+52WQKhdTipYi2wIAEgwskLHL9RcxEt9Jge5G52JZ61AfWp srokb4N6K+TDEkEhc9t+EO0/CpDOJ2KksE8O6BZnAjmnNjIJhkZF0heb3dWJK8OB9Y2G HH1w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p65si1229414pfa.323.2018.03.20.06.00.41; Tue, 20 Mar 2018 06:01:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753540AbeCTM7N (ORCPT + 99 others); Tue, 20 Mar 2018 08:59:13 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53405 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753367AbeCTM7H (ORCPT ); Tue, 20 Mar 2018 08:59:07 -0400 Received: from [187.121.16.17] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1eyGr3-0000iF-9s; Tue, 20 Mar 2018 12:59:05 +0000 From: Thadeu Lima de Souza Cascardo To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Yonghong Song , Daniel Borkmann , Alexei Starovoitov Subject: [PATCH] test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches Date: Tue, 20 Mar 2018 09:58:51 -0300 Message-Id: <20180320125851.19650-1-cascardo@canonical.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 2efb213716faa..3e9335493fe49 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -5467,7 +5467,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.15.1