Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1042364lqb; Wed, 17 Apr 2024 20:25:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWr6yuHaJAvW8TyCe+IpzQYuSKp6iS97uEVWHbffDeIYaAy6MWxrk5Yg9gz+qjlSBgAcvsYYHt6cgoQwn/WQ0DSp9vkMtyP1K1NMGwmnw== X-Google-Smtp-Source: AGHT+IFsmyqzwb5ecqjNiSjv+K5nlm/xcqx43G4YjpufiM0BYss3P0zlRglR9SQAOfnSA/sRHPVm X-Received: by 2002:aca:2b05:0:b0:3c7:2918:ab5d with SMTP id i5-20020aca2b05000000b003c72918ab5dmr1635952oik.12.1713410742112; Wed, 17 Apr 2024 20:25:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713410742; cv=pass; d=google.com; s=arc-20160816; b=gT7KzbKzrcP/WjPpnYY5qaKXT1+Grm4sOE9CFh+0X7gZBnLGospZErJdTddiZ+LyuA WVX0cgucajTHpqcpMGKhK9iR5rlGjpQTMrEojDrczre0FhZ5cajEhxC++4lviNsNJe8b QwXLJn4qFdRc+rh3a6wJ10w5Dc5Rfc8+kMTv4P0EwHCQ3b+mkQkWduwgpw0ijD6V2ojZ acWrFoFQEJy+mdTy8gtXF2HA3wu728RZ4SlF3l6z4WXCdthOrZXj8/Aq6HrjMxqB+c4J YXxnssJa+oBTfjhQgvEMl6wt5wX3I3kFtjq+I/sUKXThxcEIpfbWOt/xQXAP4Jn8HErg 1zrg== ARC-Message-Signature: i=2; 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=zSwLJu8rdw4bUVSTLucj6ST41NIPqdq09hipEdekjzw=; fh=uenzsMHUf/i8SWRlknDrvbpM9LyLwG5kV69ky0elVoU=; b=tPrPejhXUmb0v9bRbiIR3R7Qkw7JroO32A2i/QrdM0ogYd6JiWWqRGTIC49mlpx9PS Vok/xEWqflz4y0WLqWH0e5ZuubYmjiK7RICrhFEQi7A01nKqZpUxMABvcLk2pi6lqnE5 K3uVDciqBomoflWigUlgK2QqW6KbpKKzoW0yJTKWTA56bFaUxekHYiwKJwRK0KKKO570 AeO6SmZEy0LuQH5zx1GhCu9LtBmrGyJzO1ipNadtvutZeJBkx8SfMji2zdda/cqWGjxE HQ4Moyj8Xl6Lle1gwukeZxjQPHavpaRnxRItydj3WvqTghkP12f3wGhctznJY1X7gmU6 l6Ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IhrUr3wQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p12-20020a63950c000000b005d8e38097f8si543064pgd.265.2024.04.17.20.25.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 20:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IhrUr3wQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149469-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 B5526282EB2 for ; Thu, 18 Apr 2024 03:25:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DF1B52F95; Thu, 18 Apr 2024 03:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IhrUr3wQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C7935244; Thu, 18 Apr 2024 03:25:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713410734; cv=none; b=bXasLddcOOLJ1ZnmXrVs9pMOgG5Wr7E6Dw43sqdM8WuDm7HKGC/IXytciqnQj4k3IuStlRrHAhwJomOag5fBs6Mso7r/HjpijwGap+XJlCcIJxgEuX/WERFYMT3/1IEMW3k+E0rfuEX77zIf60bbBpZte0FebFWhSo6P4aoQd3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713410734; c=relaxed/simple; bh=rxKsOCKe0DAcEdcR0ylfZC8wvWu25zLu+9a6x1ho/mM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=E4+vUr175AGLpnrrvtVLD8JJkv++vaeE87bI+Atbb6tj8tsJxjiMth0POC2idwn3SRByVenrjOaZQHHfm+DqHKjqb57Gz5e5potqrIBdxNyQhNkwGfPJO4cRotQn6gg0UD1XRpGXplAVG80qisT4NHnRY5YNPOMFthrTunSwBQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IhrUr3wQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD2CDC4AF07; Thu, 18 Apr 2024 03:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713410733; bh=rxKsOCKe0DAcEdcR0ylfZC8wvWu25zLu+9a6x1ho/mM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IhrUr3wQdS7pMOqL38LvOm8p0MZNEvn6fOcHj2wfhmP+73+5LLudV1Lgnfamja9Y6 sRl3cvEx4+efmsi6OoN6IQjmIVywTvetkiMpSK/kppc0rcmLoQirUiGUNuRp5zaDZ2 LjJ4fHwEigd6MH+yOWiy4vP0aMpf8qmvO6JPDKtnG9dlwK1a1r0jYllWkLv2Q22jj/ 3qtmgPDWL0OloTxzL4fcSRTYW7nhY00gB6uFDeGTbOUItxehk8YdogbK0ZWu5vtDn9 DY0o74obhDlmX7PpkTQP2qmin9R4/WNa2pfOLif9mG5R57uVTPils9I/cDFnsNeX8J 68kk/Rkf0r9LA== Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-516cdb21b34so410129e87.1; Wed, 17 Apr 2024 20:25:33 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVs4+6ZxYTa7WihoPdbf64NIZhJrHZcxf8fIddCPb84mFIjd5lK3YvBo2lXXj+YYaS/g/eZ/2hG1yqqjQOBSB5GVS/krVCzA3T9y5uJDs0LHx53j3H/bnPQA0R+j/QWA20kOPk9rZvzE7Y7lXX/z7iM1gLZ8zHP0SN0G/vTHCgrpzkx X-Gm-Message-State: AOJu0Yznro36Xf84n9BQhJjXaL5xOAOnnR1/fWP8UFSU+36xh5s5u1XQ TFReJ8HriQT6tH9uoOQA10Bjb6PBhIZBc30ZP/1BB2rW8GI9RvQ/9aKXg6LGzozM9Sgju4VjIuC QEmrbYijPM+e+qzVAoTH6cQdUbYU= X-Received: by 2002:a19:771d:0:b0:518:8e3c:4647 with SMTP id s29-20020a19771d000000b005188e3c4647mr624875lfc.7.1713410732054; Wed, 17 Apr 2024 20:25:32 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240416-bpf_wq-v1-0-c9e66092f842@kernel.org> <20240416-bpf_wq-v1-16-c9e66092f842@kernel.org> In-Reply-To: <20240416-bpf_wq-v1-16-c9e66092f842@kernel.org> From: Song Liu Date: Wed, 17 Apr 2024 20:25:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH bpf-next 16/18] selftests/bpf: add checks for bpf_wq_set_callback() To: Benjamin Tissoires Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 16, 2024 at 7:11=E2=80=AFAM Benjamin Tissoires wrote: [...] > +SEC("?tc") > +__log_level(2) > +__failure > +/* check that the first argument of bpf_wq_set_callback() > + * is a correct bpf_wq pointer. > + */ > +__msg("mark_precise: frame0: regs=3Dr1 stack=3D before") This line and some other "mark_precise" lines are causing issues for test_progs-no_alu32 in the CI. I can reproduce it in my local tests. I am not quite sure what is the best fix. Maybe we can just remove it. Thanks, Song > +__msg(": (85) call bpf_wq_set_callback_impl#") /* anchor message */ > +__msg("off 1 doesn't point to 'struct bpf_wq' that is at 0") > +long test_wrong_wq_pointer_offset(void *ctx) > +{ > + int key =3D 0; > + struct bpf_wq *wq; > + > + wq =3D bpf_map_lookup_elem(&array, &key); > + if (!wq) > + return 1; > + > + if (bpf_wq_init(wq, &array, 0)) > + return 2; > + > + if (bpf_wq_set_callback((void *)wq + 1, wq_cb_sleepable, 0)) > + return 3; > + > + return -22; > +} > > -- > 2.44.0 >