Received: from 69-171-232-180.mail-mxout.facebook.com (69-171-232-180.mail-mxout.facebook.com [69.171.232.180]) (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 2C64E364EBC for ; Thu, 26 Mar 2026 01:32:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=69.171.232.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488748; cv=none; b=WllED6lYzKe1msgnP81BA4qOOXJEdNOiauBwu/3nGrI4+7xpf3FUKY6whMiFHm4MdXzno5Z0cx2nfTGoYwPTJjMnTHmPBrJge9TUEqjjVFIad9uiWVtnf99wwsg8cMBcBthCjgxkFEYcn6c50l+2rtWeAGsg5eHqzVGZn40XQ+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488748; c=relaxed/simple; bh=PANRz+fro1eKNpqVlSNAzAJAajwwVgEUZ7sJdyA8rLM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMQBzmNyOD5bKjAXpsaDEmrlr26EoqgACeub2le7cuQrIO7Iu0Pde6NoQHKFo7wTmJHGn9vZKP5u0bRgUiywJyvFiT3TAuOFCxlRGqfWqwJ08R69ISHBlXq+LTDkwhVmML4vqTjZIjfmHcYhTn3Xg9WpIoPay1QzGk1RwqzoqrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev; spf=fail smtp.mailfrom=linux.dev; arc=none smtp.client-ip=69.171.232.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=linux.dev Received: by devvm16039.vll0.facebook.com (Postfix, from userid 128203) id 342082E280FDA; Wed, 25 Mar 2026 18:32:15 -0700 (PDT) From: Yonghong Song To: Alan Maguire , Arnaldo Carvalho de Melo , dwarves@vger.kernel.org Cc: Alexei Starovoitov , Andrii Nakryiko , bpf@vger.kernel.org, kernel-team@fb.com Subject: [PATCH dwarves v4 06/11] dwarf_loader: Change exprlen checking condition in parameter__reg() Date: Wed, 25 Mar 2026 18:32:15 -0700 Message-ID: <20260326013215.2906073-1-yonghong.song@linux.dev> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260326013144.2901265-1-yonghong.song@linux.dev> References: <20260326013144.2901265-1-yonghong.song@linux.dev> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The change does not change any functionalities. But it allows DW_OP_stack_value preserved in longer location list for future parameter checking. Signed-off-by: Yonghong Song --- dwarf_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwarf_loader.c b/dwarf_loader.c index 9e103ac..9b91590 100644 --- a/dwarf_loader.c +++ b/dwarf_loader.c @@ -1308,7 +1308,7 @@ static int parameter__reg(Dwarf_Attribute *attr, in= t expected_reg, struct conf_l * DW_OP_stack_value instructs interpreter to pop current value from * DWARF expression evaluation stack, and thus is not important here. */ - if (exprlen > 1 && expr[exprlen - 1].atom =3D=3D DW_OP_stack_value) + if (exprlen =3D=3D 2 && expr[exprlen - 1].atom =3D=3D DW_OP_stack_valu= e) exprlen--; =20 if (exprlen !=3D 1) --=20 2.52.0