Message ID | 20230314203424.4015351-1-xukuohai@huaweicloud.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-kselftest-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CBF8C6FD1C for <linux-kselftest@archiver.kernel.org>; Tue, 14 Mar 2023 07:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjCNHfR (ORCPT <rfc822;linux-kselftest@archiver.kernel.org>); Tue, 14 Mar 2023 03:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbjCNHfQ (ORCPT <rfc822;linux-kselftest@vger.kernel.org>); Tue, 14 Mar 2023 03:35:16 -0400 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 173F87E7A6; Tue, 14 Mar 2023 00:35:15 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4PbQKV0nZqz4f3l80; Tue, 14 Mar 2023 15:35:10 +0800 (CST) Received: from k01.huawei.com (unknown [10.67.174.197]) by APP4 (Coremail) with SMTP id gCh0CgBnF6utIxBk_rhhFQ--.63403S2; Tue, 14 Mar 2023 15:35:10 +0800 (CST) From: Xu Kuohai <xukuohai@huaweicloud.com> To: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>, Shuah Khan <shuah@kernel.org> Subject: [PATCH bpf-next v2 0/2] bpf: Fix a umin > umax reg bound error Date: Tue, 14 Mar 2023 16:34:22 -0400 Message-Id: <20230314203424.4015351-1-xukuohai@huaweicloud.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgBnF6utIxBk_rhhFQ--.63403S2 X-Coremail-Antispam: 1UD129KBjvdXoWrXr1kCFyxGFWrZF1Dtw4DCFg_yoWxGFXEya y8tas8JFnrXFy5Ja97KF17XrZrGrs09ryfAF1DtrWUJr1UZr18GFs5GF4Fqa4DXa18JrZ7 Jr90ya97Ar4agjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbsxYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_Grv_XF1l8c AvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq 3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Gc CE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxI r21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87 Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIE c7CjxVA2Y2ka0xkIwI1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2 IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v2 6r4a6rW5MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2 IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWrZr1j6s0DMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0x ZFpf9x07joksgUUUUU= X-CM-SenderInfo: 50xn30hkdlqx5xdzvxpfor3voofrz/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: <linux-kselftest.vger.kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org |
Series |
bpf: Fix a umin > umax reg bound error
|
expand
|
From: Xu Kuohai <xukuohai@huawei.com> This patchset fixes a umin > umax reg bound error and adds cases for it. v2: 1. add bound check to avoid min > max 2. update 32-bit reg min/max when 64-bit reg value is a constant 3. add Fixes tag v1: https://lore.kernel.org/bpf/20230307220449.2933650-1-xukuohai@huaweicloud.com/ Xu Kuohai (2): bpf: Fix a umin > umax reg bound error selftests/bpf: check bounds not in the 32-bit range kernel/bpf/verifier.c | 143 ++++++++++++------ tools/testing/selftests/bpf/verifier/bounds.c | 121 +++++++++++++++ 2 files changed, 214 insertions(+), 50 deletions(-)