From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f8.google.com (mail-wm2-f8.google.com [74.125.225.136]) (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 B374846D0A2 for ; Tue, 21 Jul 2026 18:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784658350; cv=none; b=eM0SfGjKscbnLetDxuq3CZV8jCjBMHkyRAvV8per0wGdS3Z1ajcpyKUR2nJvA8Ak31UiMfDCAJtVZtT0Dj1Bkh9BlUZdsVoI5xFJx/ZOnsbg3jJCSz4UUiwH0t83BKcKK37aiWy9EFqLlX4Be0YfKG1KqWsGOSTB+gDNYfDZBu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784658350; c=relaxed/simple; bh=SeQQtojGt29p0HQnBgMK6DLzlAvRjRZawe7OxD4XFCc=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=TAWjiZWmI9I7+AOpgm7b8b8yTDhp7gTfXIeLBqJjwHK/nXMk1N7CCYOvUFaBWETHlAS61zPdApLAEUAEBDPS4AojMKpLRbPv3N8GhMgeY3lpP8k5gNgJDxt5IgEUO3Ub2ci00+Ck8rKTEPirhLLEV843wHLLAOI43EHidRCm7EA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AFvXHKer; arc=none smtp.client-ip=74.125.225.136 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AFvXHKer" Received: by mail-wm2-f8.google.com with SMTP id 5b1f17b1804b1-49550b004f9so11885285e9.1 for ; Tue, 21 Jul 2026 11:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784658346; x=1785263146; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=SeQQtojGt29p0HQnBgMK6DLzlAvRjRZawe7OxD4XFCc=; b=AFvXHKerCAFkaYisw7yGc94qEDH6/A2Bh2V/dWp5TxLKPqYDP0AGdvYjdyshWYkO6l ukenp2NkLDNeT+Mxkva4XTKb90lZahmlQx1ITYW3OCt/E6pHRmeF9cFtwBBG/3czuzG1 /lkpbiDYsxIsTyjmgIVRsrjjKBNCVepmRpD5OEJkLZcBqyLWJ2ZBI/B/w9ApwaLJCpPU NdCLhryLxwcsdaJoHi6mKutf4aqXCf917lJWO27+Vf1dtSVngKN8k03s0umiuinNaNYw alQyatme830+BdB551wiGYmbFfdFbkEcsatUQ5My213FbWKnaP9ewWNAoimJpq/EGcCp D+2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784658346; x=1785263146; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SeQQtojGt29p0HQnBgMK6DLzlAvRjRZawe7OxD4XFCc=; b=IIfy+dJH5HPLJ6/fT2K3yokalWi1V6qmjvkro2U+GH55RksTvwkfAEnYpo+dw0WhaN Pfc+Go/lw3k4hTavArN0VjCJDWe/lT4frCTNkVpbzT0uzgDSF4rTDTBWxnxALrc5JFWP AiTA4yVHJ1h8f8BAYhCAL9LY1GUqiApzfaHnfyRA2CLRPwstJl/tl1aQic2PXvcnrBtC IdudZuHLmCt4iAU6e8EaKrfx8cAvAFC5/jADPDdndkh9EZ2wd89lB4QNhgQs8bhrc0+n Mk2LeiJmV96tfFH6FjLR9eeLF6YZqn3pA2u9xfneaNps1eSQj/URzuB5ZfYlsl7kqVMT A9Mg== X-Forwarded-Encrypted: i=1; AHgh+RrrHhyX0KwcohruqbB3nhDPmUYFWmg+0qrKvGBEI/F30nktaC+4idIWhJSVT6X/MCFVoXACUAjpeyUIjfE=@vger.kernel.org X-Gm-Message-State: AOJu0YyhpTyCpqz5XJ3j+TTo7s4MrZnUA7/Qpe0g47Q/Ykk7UQgPwps3 ONe/QEC1m9wT1qj9/l4AO4CowI6wyK+nM0AyanX5+M5odZCFBKJLOqTf X-Gm-Gg: AfdE7clKgwGQoxIAYvuEl4djr6pkAB/7nQUgrk0y+LuYC+Hxw50Rk424pQDSksSeJbJ jeMKlF/jx0aUjlnPl3cAIZAK6y+w/altwAbW39Cb1lyxkg4/857BTsg7RUBpq8WBcRpT0T2Nnp3 BRqoB7TPUBcwSScqvi04XG8gd4wBmJqPRk0f8we88HcNlRPZm/fphwzkGYLmu0Jz5X3idgZPe8k g88Len6zSy19+Fos26ahuovQpBcAzMVYwaLXlDxq0dUMeLYVwzCpgsNQyrYmx+Kg1mDm4DJRHeo N3E4faRVSgQhKfEi45IbXbNZAUSqhxBioWTpURDq6sMJXrQEeW2rsDLaN5PXWDy7QfFZLi1xyPk VSRR0XwlfUsHuAt/rnsZ2aSb8hIzFYEQFZddVG05ZtkJ7PIQV1SmzC4U0lKH6zhC6aGFsImAdEb Aoo70QBBdJAa67LAOTB2SNn31lTMJZR19d7Sbqb67Q4wJAULgOLa9kFlSdXNKbuCOWyIemfedzx a97wVLMHJwWLPeQg4Aw2w0Y0V8e2AHMhfL1RCsgjYIo X-Received: by 2002:a05:600c:48aa:b0:495:4589:cea6 with SMTP id 5b1f17b1804b1-4954a516530mr139259715e9.34.1784658345726; Tue, 21 Jul 2026 11:25:45 -0700 (PDT) Received: from localhost (nat-icclus-192-26-29-3.epfl.ch. [192.26.29.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e496ffsm40416461f8f.3.2026.07.21.11.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 11:25:45 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 21 Jul 2026 20:25:44 +0200 Message-Id: Cc: =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , , , Subject: Re: [PATCH v3] bpf, riscv: fix extable handling for arena load_acquire From: "Kumar Kartikeya Dwivedi" To: =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , "Feng Jiang" , "Alexei Starovoitov" , "Daniel Borkmann" , "Andrii Nakryiko" , "Eduard Zingerman" , "Martin KaFai Lau" , "Song Liu" , "Yonghong Song" , "Jiri Olsa" , "Emil Tsalapatis" , "Pu Lehui" , "Puranjay Mohan" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" X-Mailer: aerc 0.21.0 References: <20260720-bpf-riscv-fix-extable-v3-1-e9a603882309@kylinos.cn> <87h5lsurzn.fsf@all.your.base.are.belong.to.us> In-Reply-To: <87h5lsurzn.fsf@all.your.base.are.belong.to.us> On Tue Jul 21, 2026 at 8:17 PM CEST, Bj=C3=B6rn T=C3=B6pel wrote: > Feng Jiang writes: > >> emit_atomic_ld_st() returns 1 to have build_body() skip the zext after >> a sub-word load_acquire. The caller does "ret =3D ret ?: >> add_exception_handler(...)", which skips add_exception_handler() on any >> non-zero ret, so the extable entry is missing and a faulting >> PROBE_ATOMIC load_acquire oopses. >> >> REG_DONT_CLEAR_MARKER leaves rd stale on fault, and the verifier still >> thinks the load overwrote it, so a program can leak it through a map. >> >> Check ret >=3D 0 before calling add_exception_handler(), and pass rd for >> LOAD_ACQ so the fault zeroes rd like a PROBE_MEM load. Return ret >> unchanged for the zext skip. >> >> Fixes: fb7cefabae81 ("riscv, bpf: Add support arena atomics for RV64") >> Signed-off-by: Feng Jiang > > Thank you for spinning a new version! > > Reviewed-by: Bj=C3=B6rn T=C3=B6pel > Acked-by: Bj=C3=B6rn T=C3=B6pel There was an identical v4 resend. I applied the acks there and pushed. Thanks.