Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp486265pxt; Fri, 6 Aug 2021 06:50:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTaIZnhDWAFHAXwSdqfwfMtUBPfDN+7qrrcd4jA20qVJF6j5HgTsBGgSQ3wtJWE7Uvfr/u X-Received: by 2002:a6b:ea0b:: with SMTP id m11mr565599ioc.186.1628257802884; Fri, 06 Aug 2021 06:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628257802; cv=none; d=google.com; s=arc-20160816; b=IkHGsMdwii+SRUk5DLUpgukXlKl1PXguWiJdeisTLW3BtT8flxVxhWbDJOHv14cktw 5GKPKdSvezCLRz2s03+CKzm/e+2ffe1x2OSt97bZzKaoNEiL1K1d+cAF0jyB1ewICJyL Kqw4lpX5ysKRHvrMxY6Es3gNdy9GQsK08GKzlDBUZSYjlRuGHv3A6Z7Afvqpj0dL/uKE HsQdl1Kd9VILFZtg9LAFnD/RYwav5PbFPkrGE3nvHM8I0ttCiPdm4oLD2pnnMfjSYEnR /Z3n+wxzP06XSFuNEyI8iiw+WwNo0mJayQhKoAFqaETX5vw0hSlmS8ah6RfkvBQfT8O2 QkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OLaxAy0JT+3e7QicmaWdRkzsS2aml2yT2pJFRaQC3Rk=; b=QxPIVpG3XYokTPUlW/9Z4InX6TbKYJcAhpAVlHpzerwCgfrhSF0dON73UubR34vKha zSKxh6SqqbyQ+O4W9BhokuePPkhtyk5DcujC3QGjc/Lt34GbVeayiCIpj/k7tmUNp/Dd 6Yi7n8n/UERivUi6SoKlXFJUUsLO22Beb61P+HGMaCUyzsgytiYtCOZFpjzXxELfL+hc bEoCaALMxEE/09X2AzsqsoifipHYEkJMf2faiBJP5vGrtkcyf7s/uAhlAibzRo0NpU7w Nw268kKXPNzu3zpqsXguFpxpANLrqeLrC0Igyd9skCcHa9GBVqLax5XBUfdy3JKeyrsy dy6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WkRAzYha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si9349887ilq.87.2021.08.06.06.49.51; Fri, 06 Aug 2021 06:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WkRAzYha; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244285AbhHFIXL (ORCPT + 99 others); Fri, 6 Aug 2021 04:23:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:51188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244017AbhHFIT4 (ORCPT ); Fri, 6 Aug 2021 04:19:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2DC84611CE; Fri, 6 Aug 2021 08:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628237980; bh=Qu27UQFO8jORTADI8/bf30PqQmjO4O0AKYuIGAXgvoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WkRAzYhaqSUg1NcZHpLkUoNuggByvY2R41rErMNPwgmTmjdnlfX54hQdK94Cgbyer m6/duyzWge1NtpDrSAKw7MIOfFcMNkEnCAYzk2ff9OlgrKRBh2JrH82edi/ZapL8LS G1DxWfwk/qBP9TCbLgolWxWH/1UenGFYjo511Te4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Daniel Borkmann , Alexei Starovoitov , Ovidiu Panait Subject: [PATCH 5.10 27/30] bpf, selftests: Adjust few selftest result_unpriv outcomes Date: Fri, 6 Aug 2021 10:17:05 +0200 Message-Id: <20210806081114.046059421@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.126861800@linuxfoundation.org> References: <20210806081113.126861800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Borkmann commit 1bad6fd52be4ce12d207e2820ceb0f29ab31fc53 upstream Given we don't need to simulate the speculative domain for registers with immediates anymore since the verifier uses direct imm-based rewrites instead of having to mask, we can also lift a few cases that were previously rejected. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: Ovidiu Panait Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/bpf/verifier/stack_ptr.c | 2 -- tools/testing/selftests/bpf/verifier/value_ptr_arith.c | 8 -------- 2 files changed, 10 deletions(-) --- a/tools/testing/selftests/bpf/verifier/stack_ptr.c +++ b/tools/testing/selftests/bpf/verifier/stack_ptr.c @@ -295,8 +295,6 @@ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0), BPF_EXIT_INSN(), }, - .result_unpriv = REJECT, - .errstr_unpriv = "invalid write to stack R1 off=0 size=1", .result = ACCEPT, .retval = 42, }, --- a/tools/testing/selftests/bpf/verifier/value_ptr_arith.c +++ b/tools/testing/selftests/bpf/verifier/value_ptr_arith.c @@ -302,8 +302,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, { @@ -373,8 +371,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, { @@ -474,8 +470,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, { @@ -768,8 +762,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, {