Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2460518rdd; Fri, 12 Jan 2024 10:02:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAYQu5gllbt93gQFshACx8LiMb7aWO4kJyCQm4wng/Kdc7OGWsQ+0dmxm5JAIG9HJg4xB1 X-Received: by 2002:a17:902:d4ce:b0:1d4:7f08:46db with SMTP id o14-20020a170902d4ce00b001d47f0846dbmr1900912plg.119.1705082555006; Fri, 12 Jan 2024 10:02:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705082554; cv=none; d=google.com; s=arc-20160816; b=EyMabJjYRk+z80KeTFlwlq6xFbbT+CT9sVG5oGZxdwXwWnGfvQDubrHcUJd+kDeG0g Q+p3Lvl02ZhpsRLoqIZj4zh94UCd39lnjxya2fcCOZ/1ctB9GYFu8psNjEdEdPXasyQ8 JIf9/1z2tWW5jeRSx0IezB6tFsOf59SqFIw4wzzDX6CtmdirX1yaqqePIXCLKpwo2f0T +PBRfiYEIQhTwunRxbqrqKngZFl5FNh83hTHOarOor2p/V6uC9czGvA27xC9RfdnT8ho 8z537SyOWUahTUczKu6axRmnzZpr+TGHQ+MQ9GtnvXDMvQWUcqwBsL7fvI8uVSjXxtxh FlhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=a8dTLTTQWQauPVmA7N7Cgw9w08I3I6pmEcifcj/7RQ0=; fh=Yg5cCoVo7lKKoViZXikAGxF9HfW4UdRCvJeCiUvdAhg=; b=UXkHxllUVrVjYwW755bxhG7bN//rTWwatqVw+cOo7jrmlZ7tpS+oPGBycYMff9abcs VNUcwtqXy93FJnJWkUrMOvD3BDdhfQqZjlhFGDlvOu7zzX2yR21XLt4HBQvWP6qZuPSF Kou4qx9VvXU2nDiMQrxB+mZAUJ/LTGHUK8kbBLtv7Dkl04HAm1rvK662FA8F0gDqYpP8 FSn+NF3akqAEAmHb7KGi69F3Qsrw4rsH6Awvgl583x3bnlrefXs6J8MK6XI6SDaw31Hx MTurSYyB0Zpz2tEc4nXgePQJHo3A5l79xfCxlZjQX2CdyPazfmiLoiuAv9IvRiaAYREn rJuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FBxhJ3sR; spf=pass (google.com: domain of linux-kernel+bounces-24948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z7-20020a170903018700b001d54e74db4fsi4071705plg.224.2024.01.12.10.02.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 10:02:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FBxhJ3sR; spf=pass (google.com: domain of linux-kernel+bounces-24948-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 79B7528635B for ; Fri, 12 Jan 2024 18:02:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F13E41AAAD; Fri, 12 Jan 2024 18:02:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FBxhJ3sR" Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E75E11AAAA; Fri, 12 Jan 2024 18:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-dbed85ec5b5so5501576276.3; Fri, 12 Jan 2024 10:02:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705082541; x=1705687341; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=a8dTLTTQWQauPVmA7N7Cgw9w08I3I6pmEcifcj/7RQ0=; b=FBxhJ3sR5h2CfOu7FhqI6P/tigDGMcFX8RSTI+dGMMJjj7NhrMJ/QJFko/b2udD6ht jOH2TcSV6P3QeOsChlVyMsBTWD+V/GgeDYV+tcBM2MNEI1PIqNY9xQYPrCbV65cWNQcB VsJMgt7nL1tw1kG3KFs0QDibqMBrpRSqoQlVjCUP2PnE3J6MiTj4FDQ7ySdh9pKrbuXq p0dTwdhp8FhTbTJQEqMl96nxLdAeCrjFt4bzXRN9V4+43kdGrUjYj6164bKlKmMZye0D A7DVSAX5+jLdgF4zZhTBrCHFo8bqigUji3he8VJG9SXvo9KUhrCnLMLWU8hWm5O3qSgl kBAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705082541; x=1705687341; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a8dTLTTQWQauPVmA7N7Cgw9w08I3I6pmEcifcj/7RQ0=; b=JhLzVgZ7gBo7oMkRFMwz2VFsOpVM2WKRDv5SBmesB/Nu//jY3GTJZt5WwMUq5VPv1h F25f59lF75PujLWVLglIzM5Nd8l3mt9cqgpIfUMLthfgYvwDpn5Ou99MIXfBemgOQAi7 TmheybEWoQurJAn6qkh2qDelljf04hwIILCMSkoH06WRrCR8nTPMcSha82ngOrzafYnF jQVaYgqXBsN2mXCa5oE3NPVsJy9N9Z5kWrL+GuY99r331YAOlxzza69A91idIkNP98Am XrFPc+p8RJzLdJXj/XIPAr3sSUSjsagPxJhoumffyz5cANjwuBd7HVSiACkZdLG9gpzn vKTw== X-Gm-Message-State: AOJu0YzgqQSfxXG6HBXpUCp4uu3oPY9ld35ohdzO+cEwwVullDzCkk2H 8TacYhJBlzbPWgKZPVL4l7bVMbTnYNrH8Gl0VQ== X-Received: by 2002:a25:ce43:0:b0:dbd:c1ef:8fb5 with SMTP id x64-20020a25ce43000000b00dbdc1ef8fb5mr835203ybe.51.1705082540645; Fri, 12 Jan 2024 10:02:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240112152011.6264-1-sunhao.th@gmail.com> In-Reply-To: From: Hao Sun Date: Fri, 12 Jan 2024 19:02:09 +0100 Message-ID: Subject: Re: [PATCH v3 1/2] bpf: Reject variable offset alu on PTR_TO_FLOW_KEYS To: Alexei Starovoitov Cc: bpf , Willem de Bruijn , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Eddy Z , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2024 at 6:57=E2=80=AFPM Alexei Starovoitov wrote: > > On Fri, Jan 12, 2024 at 7:20=E2=80=AFAM Hao Sun wro= te: > > > > For PTR_TO_FLOW_KEYS, check_flow_keys_access() only uses fixed off > > for validation. However, variable offset ptr alu is not prohibited > > for this ptr kind. So the variable offset is not checked. > > Why resend v3? > What changed from v2? Nothing changes in the first patch, the tests in the second patch are reformatted with a proper number of tabs after each instruction. Forgot to add changelo= gs.