From patchwork Wed Aug 4 17:09:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 492230 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EA85C4320A for ; Wed, 4 Aug 2021 17:09:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E711D61002 for ; Wed, 4 Aug 2021 17:09:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbhHDRKE (ORCPT ); Wed, 4 Aug 2021 13:10:04 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]:44560 "EHLO mx0b-0064b401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbhHDRKD (ORCPT ); Wed, 4 Aug 2021 13:10:03 -0400 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 174FTHdE019136; Wed, 4 Aug 2021 17:09:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=t48ay0rRoDSWI6JfuK/AwxpBPT9IKO3iNRr04Ffe4LM=; b=aniHV9z7X6rwIxt3k2CHQ1t1dMdDloceyhbDr4PXzd8R7DQIeYLpq8E7dk9JHePq/ve4 YB4fYdlNi/4Ahag469qpFBSksIZpvlV3sRp5NTj2LJ/acXtmPCgiu2TaIGDzKZtSs+LQ vRxy54lugz183Qwf0YXbAMA3lEZwWqjKmR41GvDSEXxWeYlRsru8z/cGhzpiIts624xZ 1Ke/XSqthxylGCuOD1WXj9UDbfhwu1rxeWztVFZXS4qTP28p8LUz5ZMuFhZr0bdXHhuR f33z63LqwbtbLmbI0f9Ppz1e3gOsI8GFTB5ubgW5CQytvHyM30tTIZMTlXWjDWH+7be2 iw== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by mx0a-0064b401.pphosted.com with ESMTP id 3a7uekg62r-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 17:09:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=llNjNlxBX8s6ce+9Ih4GVA/A9t/FJLjz/zjxo4r41E+st9P7qnUPBx0b3Vm94xWEYvFFdaoIEGseo1U4A7fyQxQVjb9WIT4IuVJJ7+K8ItFiDv8VnyYzGrvVA7L48A0x0sotgSOtWGyHIORN0sVFKbykQeKy9SztV9b3AhH7N66ItzsOE7wsbHeSgh1XuRHgCFBKp6itJf0WDvM5QI8n6hFHKkbZsxr1AwZ3qmyeQjl22CzUNfXt8BcnFZhhMiTCVngeNYjEL9yDUV2Z0Jwx+XQ6773fWv+OGI+9RKr4SIgqXH2HDVsxcCi/CriC2NLZjdyXs7qgrFjuMdlyo2dQmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t48ay0rRoDSWI6JfuK/AwxpBPT9IKO3iNRr04Ffe4LM=; b=K8iSbJ5UyXwTQzoGjPJp97kNf7ClN+uanmiqj2ajrNhQKf1NMlHG+jVxzBDLOs51yargHuzvc0VyHGO1VRbds+1MfToC8Ny99z74l91+/3HF4wylBkTGgt7M1C/EV1fHX/jvGfaGGmzguHXb+Uyo1gozZUxyvUV+INp711oyI71HJ3yCUvFKZvCzWCb06gimKjePcwpy5oAwVJNaaD9TZZqMfALFMPs9FCoeIH3VfoZFcB963tIQou5B8N6u8hXQTipcKwSCvcXAR+Mltcwjyw1QSDWt+H7KSSp7TzWtRKEMwzOWxp1WOKOKDMEeaTgaNoF9lTRw8KsqBZsG4tqJGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=windriver.com; Received: from DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) by DM5PR11MB1834.namprd11.prod.outlook.com (2603:10b6:3:113::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.25; Wed, 4 Aug 2021 17:09:34 +0000 Received: from DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3]) by DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3%7]) with mapi id 15.20.4394.017; Wed, 4 Aug 2021 17:09:34 +0000 From: Ovidiu Panait To: stable@vger.kernel.org Cc: bpf@vger.kernel.org, daniel@iogearbox.net Subject: [PATCH 5.10 1/6] selftests/bpf: Add a test for ptr_to_map_value on stack for helper access Date: Wed, 4 Aug 2021 20:09:12 +0300 Message-Id: <20210804170917.3842969-2-ovidiu.panait@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210804170917.3842969-1-ovidiu.panait@windriver.com> References: <20210804170917.3842969-1-ovidiu.panait@windriver.com> X-ClientProxiedBy: VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) To DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from otp-linux03.wrs.com (46.97.150.20) by VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Wed, 4 Aug 2021 17:09:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd8ebee0-a9b7-4241-0324-08d9576aa1d1 X-MS-TrafficTypeDiagnostic: DM5PR11MB1834: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:655; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /3kI7btxTmTgbr8xy45nfQYUM8TwIDO6wTb29NxLTfTD3LRJm5h2s/5jBeW7Ki9uI7xE6dneaTBAiZyIEIFPkaksnqx1c3THHECUkb9mIbIFeTRNksf9qwUmBKf08CKhO5eoTcD0fffYJmfNGSj0CR2Up+/yEv/lupIOjvIobiMPyJFPLmjBmWdaDzUJaFTG0wSJk8wmpHawYjZRLyXbx/GR81tW5Dwkl73h9m8T8gJTYckW6sKrVWeaotG38LLX3vuRa2pFsMnoejKnGB/8nLjuHDnr4qzSKb9PDrd4mX8RBLCX4WZwGcftUpX43JbaJVDFhvlNhTCJSNw8cpq+1cHV1kHzaXjaxJqCx5ZfjdbLsOyaZZxNkDQXMJr6jf1uTcrP/XfnBt3PvItWpFBXTYQ5JYeWr8I0ijAB0SnPn6bD/nMcJozPfrqfNB7HvVb7aM+vYPkrpSwDX3ZIgrICcdffzGHCgRRSb645Q/WbnAyDiVDcpHsRAu31JXduntWABnV1vjLkHDWtQRY9eIkSMgXq1OO60VGK9+n6iTBCWs4M4h2ZBYQ/DAMRy6/fB9vag6qarKtCTTrBzRBeL8dEKp0GJyTgSVgcSMCTREhg+CyB1BHTx6XvvW+gMM++7rRzSmhEEvowjLgvu2dZPYgvyzEZ85yA5kNbAVFAF3KRI0e3U2cjJOR4DwPTzxwjgUpGMlA46WaY3s1Q0j5+j4+STWlXUl/rLc1G0dFkPvI0VPji0E43vZGwoMg/NiumQWvjbfUC711uh3gl8IG28kUt0MWJ+8dMBrX8d8Vx7v4jMRY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5327.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(366004)(396003)(346002)(376002)(6666004)(38100700002)(316002)(6506007)(1076003)(86362001)(38350700002)(52116002)(83380400001)(478600001)(44832011)(2906002)(5660300002)(8936002)(956004)(6486002)(2616005)(4326008)(966005)(6916009)(186003)(36756003)(66556008)(66476007)(8676002)(6512007)(66946007)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wJI0y++l+F9YvN9akKVJUFvOfAvdyCp4o+XYHUGuFkxpdQXlLKdPKZ32ixyHX7yrCHsbwNwipdSV4VnbFHigwTMnfEyzTHRg258GUhrC+DhHlzEU0mX4zxC0bXe8ApZ/CYubPu1zOR2SA/I0u4X3sHNb8JKT2FwbuUU9+oclweBSQ3XHyoCuhCN0bcUNbPBVy06IcbaOTxnUkYLudTm3BwIC9KdkwCjAs0uASFjFPQNA5IMHqQLkcfKe5QNBWkMHOlQuedYrvbhvkfj4gFjNLzU3UMUAZrqleF4pElYMZE1REEQymQeWCT/28fT2/5RwHCl1o7w7cESq2JlpVI3dUa74brmWJHhtBpMoKtOwhiqYZDVbbgk95D8VxqFYLmiUF1N2arETiNlAKgbXKwTwUe8W7TM2865Hgi+xVlfxwGblZ6aLB45KID2FfLGCqgJtbcDMK4P0A6eliQdJrwVVHPQMf2HJugUUAM6RfWP8MR6zUuayMJ4XcKy4JTKKgio8KBel27na+THfVe3WET1qseEpZxo5+BhCUSpwwzaygL6XniZzQzxZLwr5Pspo/BvUKxADcTZeVznTj0gRpEb6q84vsSHMck3rpEM5NQ3HGBmnd8XaUQ93CZXDjfGVR2UYqnXw6tWhK7V0xZv2dc24PL67yE/SigJLBFQz+gbnkgNVMQBUd6xG3Gjob2p92et8Ry23vJWn9CO1zoPAEbbb93wyuQC/BrMQe03J5vAwQ/54mEnyZNVucqRj39VDfRTrFc5jmiqNxDL9G2XV8KT4kGycYR61V+m/inNHQNkSgpFWaYd6NQLjAO8Bx4BSjhq7goW2tKcjhvuowzE9kIS5J2PLzJRl1wLBGcW6/lXnkWFtz0NAnhdgUoo6LeoeZ/K2U9Nv2t1RSYzgI1scmM2Y78I01sARjJLSL88ZRk8SaAqtNi+1wmB9np7Tybp57Jrcaw8pVRwCLdHPOVE6SB7BDmKG5/7+sFl91LA+uJiAjzHzemnaoIXM/6bLDb8T2F3mO3c0Z5KQoBDIU1r5yislwxA6ts2skgi2TeCvaxUgYxsLIDh634PBurxIcOHuVB46cR57pyou8cCmWuikTxhNILszWc3Oi61uEG/S7Lwd7bU64XGIsxZyZuNnAqErGFpY0FrmFMjOabR2Juz7XwI/aPX0mWkmpM2mH7D8GZT6Hl6mDFG1kPrsrzJlEwMgf2NmHrQWArxJ2bF43/wIuHnW2xXBxtCcUcIGMO88+cE3me8R5CRhwqNGoD87jamEDP+rRuEFnvTZMDk4GZGFxSqvwC+Um8Dzgy3dJx1qQiFYKuPMI7J32pwqTLeP++pdGXTy X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd8ebee0-a9b7-4241-0324-08d9576aa1d1 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5327.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2021 17:09:34.3790 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4uMPmoVbDlEET+zBf1f/y6IR5kSu+MM/y311WXN2q2klDvatgXrpo8iIJZlqYSi1Xww0YLRilMVTTZ9l4T94MPiHCOjN0JTo8a8Jqx9hplo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1834 X-Proofpoint-GUID: 9zbPOrbmYbrdpAiRMxqg4V0BwO0QUtgj X-Proofpoint-ORIG-GUID: 9zbPOrbmYbrdpAiRMxqg4V0BwO0QUtgj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1, Aquarius:18.0.790, Hydra:6.0.391, FMLib:17.0.607.475 definitions=2021-08-04_05,2021-08-04_03,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 mlxscore=0 adultscore=0 clxscore=1015 malwarescore=0 phishscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108040098 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yonghong Song commit b4b638c36b7e7acd847b9c4b9c80f268e45ea30c upstream Change bpf_iter_task.c such that pointer to map_value may appear on the stack for bpf_seq_printf() to access. Without previous verifier patch, the bpf_iter test will fail. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20201210013350.943985-1-yhs@fb.com Signed-off-by: Ovidiu Panait --- tools/testing/selftests/bpf/progs/bpf_iter_task.c | 3 ++- tools/testing/selftests/bpf/verifier/unpriv.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_task.c b/tools/testing/selftests/bpf/progs/bpf_iter_task.c index 4983087852a0..b7f32c160f4e 100644 --- a/tools/testing/selftests/bpf/progs/bpf_iter_task.c +++ b/tools/testing/selftests/bpf/progs/bpf_iter_task.c @@ -11,9 +11,10 @@ int dump_task(struct bpf_iter__task *ctx) { struct seq_file *seq = ctx->meta->seq; struct task_struct *task = ctx->task; + static char info[] = " === END ==="; if (task == (void *)0) { - BPF_SEQ_PRINTF(seq, " === END ===\n"); + BPF_SEQ_PRINTF(seq, "%s\n", info); return 0; } diff --git a/tools/testing/selftests/bpf/verifier/unpriv.c b/tools/testing/selftests/bpf/verifier/unpriv.c index 0d621c841db1..2df9871b169d 100644 --- a/tools/testing/selftests/bpf/verifier/unpriv.c +++ b/tools/testing/selftests/bpf/verifier/unpriv.c @@ -108,8 +108,9 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 3 }, - .errstr = "invalid indirect read from stack off -8+0 size 8", - .result = REJECT, + .errstr_unpriv = "invalid indirect read from stack off -8+0 size 8", + .result_unpriv = REJECT, + .result = ACCEPT, }, { "unpriv: mangle pointer on stack 1", From patchwork Wed Aug 4 17:09:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 492229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E05E2C43216 for ; Wed, 4 Aug 2021 17:09:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA00A61037 for ; Wed, 4 Aug 2021 17:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239760AbhHDRKE (ORCPT ); Wed, 4 Aug 2021 13:10:04 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]:44802 "EHLO mx0b-0064b401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239784AbhHDRKD (ORCPT ); Wed, 4 Aug 2021 13:10:03 -0400 Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 174GjQ7f019523; Wed, 4 Aug 2021 17:09:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=L/0SUfiM0Rayh5+sRs78n2ETdYtwpYP7KbsOvumttEM=; b=l/p7KMdIEYr8+dAJP04BpOTDXAkGDzm2bmP1vtWnLq5NY2Cri5TCJ7BLhHl9Ya1+jz5a TOq2Vuet76lmIh+swzeVNmb7AF6TXSNeVEaTbtX3FV7NH4ES5ebAidSEvrj2rjK+Ixro uOLc5dBsI+ZHrbmALgrmLAve5Gi/ZBGynS7nq9b+usUsVzUalLXQp9fdlv6/mGvfSRsF WZLyOyEvnJoqwhSbY+1wRzvb+9lxWXMRnb/8AIBS680MKQ72V/kYW2MO/KdEfHFRPang KrDKdUBlE0TTPbIMLUUZ6XvxVX047XQIeBB8tX45BfR6MNR+R599xe/ENdKLE3W9nMqe zw== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by mx0a-0064b401.pphosted.com with ESMTP id 3a7w71834x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 17:09:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ms9MEsfAR2WQopHxRtHTvY6PVZNt1QlWVP7eAUvAKPNQyzdPBFY3XJoeu3dYe+kXdJQ3GDMWHODhBJmktc1ar3qrUrCA2mffWEY9jyny6dOlw63pQ8S7ZaI27FiYB3UOxLGdLvfZORKy0wA1pEN6ndX0I9RQkWqAKovqURTcDxc7M3iDZZwURaMllYcCfcIDNVl3o6+TT7P6b78a+2/hzAcPGCR8e1Tn1LF6/DnpeAeyn8FmtEsyKOrcqfMxJpXKPSSQwMvgOxTdAkVtvobKqVOPFd5PB/rgn+hzqqa588gA72cIYjG+ix1N/Q0tkZH1tsA87/tl9YdP4887oTKavQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L/0SUfiM0Rayh5+sRs78n2ETdYtwpYP7KbsOvumttEM=; b=EwPkEOwkzn7NYEVbWH8s84ZqV2RVQv+acWOP/D71MBx+Gk+AMh6ouDUWDqICwiJWrLgwq6ecWqPWnljLkIVzhCXHFTbh1/NTD7yp3vufUETC8PJCVBVZGYLRD75CAxZ1leoDD66D5z2fzMF47MQPFgDQ/B5qVvOkhBjtbOXnDhF7MeJQ3DZZ5W9zGKDuVCy5x9bq9s1BdhyH4XQB7ePxxMolevSH0U/zUZJmx4qSe8BLujt6xN0YEOvNwfC4jc6kS/Ha14fS5Lu2IhFJVVEgXzIRXf4eK/HwKTENz5zpkP54PLzVeRP6VpbzLe9vrfRFi55ksdeBrDvYeZnORBXxqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=windriver.com; Received: from DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) by DM5PR11MB1834.namprd11.prod.outlook.com (2603:10b6:3:113::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.25; Wed, 4 Aug 2021 17:09:36 +0000 Received: from DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3]) by DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3%7]) with mapi id 15.20.4394.017; Wed, 4 Aug 2021 17:09:36 +0000 From: Ovidiu Panait To: stable@vger.kernel.org Cc: bpf@vger.kernel.org, daniel@iogearbox.net Subject: [PATCH 5.10 2/6] selftest/bpf: Adjust expected verifier errors Date: Wed, 4 Aug 2021 20:09:13 +0300 Message-Id: <20210804170917.3842969-3-ovidiu.panait@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210804170917.3842969-1-ovidiu.panait@windriver.com> References: <20210804170917.3842969-1-ovidiu.panait@windriver.com> X-ClientProxiedBy: VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) To DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from otp-linux03.wrs.com (46.97.150.20) by VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Wed, 4 Aug 2021 17:09:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10cab9c5-2394-4e4d-cde1-08d9576aa2c1 X-MS-TrafficTypeDiagnostic: DM5PR11MB1834: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1002; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4cjiUZZp50euhXEODJKCX6wb2wzq6Ads7+guFHlsMezAOgpWMJRtaGdDcyVanA2EHDt4CARq3CvWHtB86tLiZp1w2e1B5WcAts+lOD8AmSQnVvpa8HcstYh7n5c8FkDXiYWVrLkfXf58vMq0bvdekEZN0Uu31AXBjjA+jlS3SC13J5eYFDWFSruYT0F8cAPshMN4Bff6kR1n7dwsS3DvGIHuSthoGmi1rYZ/iet9yHURbeERCHly+aWMslTfEY9QuN1SWSLrapcT8+VJI2lwwCi0ZOVPr/Tse85WDjGUgFPaZ0DhNbEEtPLBxsjo6+wxLDElNo4q5jYAIWybPH9nshLPcdXqd1owXQLV27BgTzw/IQ28Fhn6Bq10VeWu7tENGhuZ+Skav6K3BEIaiiBYCiPfPgrLhcT0rNcgmUiQYlHHO7nm7yPgFaOavyCmWl8vs7EmQ1ZKkT+YuyCcNdF0J5300l1Tvfoy7Y1ro249krwgRRuY1HlxLyWA2IXBfx9bkvK6Sz7V/hXhlKP/EFcj6jC104iq9krC0BBGw4XOgQ/yB70wIiITHdtoltsCg2rLHmyceRDVAtkBH8cawzAOgaSMcUUhzC3XpEjQi3pSExH0iFLrrq2fCzJb3jPTsHPxfYAc2uMVLan+B0g4FJQoGYV1d3yUXZ9mwV+GHNdowrxhvS1XJSIMuhrPJCI3ogbiyuH0S0ejmSxmwPyGjdI5xtuORZ9RXPKeULAJEYDPxhlLN2eobpJh5B4blDn3qXqvDJ2dvgtYCkHsKz7207hT50NFmHxqot6Q6tzbhNA9YZw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5327.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(366004)(396003)(346002)(376002)(6666004)(38100700002)(316002)(6506007)(1076003)(86362001)(38350700002)(52116002)(83380400001)(478600001)(30864003)(44832011)(2906002)(5660300002)(8936002)(956004)(6486002)(2616005)(4326008)(966005)(6916009)(186003)(36756003)(66556008)(66476007)(8676002)(6512007)(66946007)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KRp0DCUhjRfxfksYTqOrEu+RjXBy/lxmEyMLQ8y1kc5HKvyUPg81Qo8QigxUyJRZhFKUbDqXhvPQsfbjtA3BcO6JWY7ksEoGLgWpCiuzat4tUyfoxWEf/4pRhRYZue5OlL8YH39rebAoRMgpbU07jdE+Clo0XllncXl4mrM2k9ocdc+6G9vLnfOTIGNJpErO1vL5KEEu619FonM+JO8RdABF/xr6pZ0evOmFZ8Xpv1+nAJmuhmxTOG2bKnEodunOXFDCOCMWXPSqSCsbWMv816bGS9LJEvKT4IUMlgP16eNJCrRAOlYgmECp6A9k63cAkrollXIFByVcMqP3/IEDUT2bquSANXb+vi+v08DOKT8x3UEfILP96XUHivdnOHO+hNtpjySCPGe0XJQ3YxP95ShWtspa1/dpbTzvx7GSvso/JCqR2DPm0QlPqsJKDxagXZQIKEqXjuYygl5re/qgPttJkTmLyOk93aYXg1aJbeOnymJ4V8HOPXtYiT8ZsiZkviy/lmaV2bCrMcJtuRV8QybcDIpAMDaC44b//c99TnVSCUETgCeDQCdz6T2cefNYVnCsHNSv8bD0YEutMPLPK9oYApHj3v6K8xPh9QVAT2WA7xo19xXmuWb88pczs0rELljL3zeRhb8vKTo9gpk2/jwCyz4JGLXVvyy1BLWnqwnOhllDWGEQrebWOITeswSPC0MPRIf0+UbJeHXx2PL4hk5OzAdYFvV1AQb0ZWCeFClk5w4V/V04PctK34bZHKct+Ect/Tp3ygjTjTeuQddtwle6TqMOvTwb1+epU/nMeFURk9HNyjjNjT7+9jlNFrGJ0zfncitZqkr8fcrtDPLsJehTOZ5ZDQRCMJCfe0GMGgWPc2SNrpW3oZBwONhKjUKOSZE4Xlif1mOY4BJmBTRuzjmKjwV6pBI5vxJiFXtGhiPG/qPXvy7OHLOgWmZCtRt9xe8utEsc2enFckyF+HXsl0i+OBcxnZlnTuC28jQiVkFX59dYU0aJezY6xKO5HzYMKnhFEdk+Baxygr0X4w+uVQjGhjznwHOU+Q7nOATaHTUxO7VU1YRtQAn2J3Ai5j6fS1nwSVYTUTnBCpJr4uEoMkaWel7A74PV0m93XpUkhmqLDMLt79WAjbB/OEGpDoXs5MaMAqqTHJrhmroHWzK+5MsQQ/ZWW074NXJb3brgGcCksu3WUzfJIZHOZlky1xsq1JSDaJXkm446YCbw6P6FbgWSclWXUh/9gSVDAijoeYJ3Vq8lQ1AgbJ5xfxtyd8z2BBCTxf/qOZn5+49MyJmlFxeX0K5m5I6JLNbP4C2csZVWPkRBDM42IZZoXdCUq3hB X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10cab9c5-2394-4e4d-cde1-08d9576aa2c1 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5327.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2021 17:09:36.0018 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FMBNxqC/MbhnCoTPzsxC5g9xhEuLtRxUOG/PueBvWhjYhAJMGXOZTLN8+eIYg9kiupAHtB7rKPlp4vjHu1vF39rb+zAbzCPRTp2UqhNGn3s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1834 X-Proofpoint-ORIG-GUID: GU-GREhRcBZLNuUyJih-WCzVyJMGF5Cb X-Proofpoint-GUID: GU-GREhRcBZLNuUyJih-WCzVyJMGF5Cb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1, Aquarius:18.0.790, Hydra:6.0.391, FMLib:17.0.607.475 definitions=2021-08-04_05,2021-08-04_03,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 clxscore=1015 mlxscore=0 malwarescore=0 adultscore=0 priorityscore=1501 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108040098 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrei Matei commit a680cb3d8e3f4f84205720b90c926579d04eedb6 upstream The verifier errors around stack accesses have changed slightly in the previous commit (generally for the better). Signed-off-by: Andrei Matei Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210207011027.676572-3-andreimatei1@gmail.com Signed-off-by: Ovidiu Panait --- .../selftests/bpf/verifier/basic_stack.c | 2 +- tools/testing/selftests/bpf/verifier/calls.c | 4 ++-- .../testing/selftests/bpf/verifier/const_or.c | 4 ++-- .../bpf/verifier/helper_access_var_len.c | 12 +++++----- .../testing/selftests/bpf/verifier/int_ptr.c | 6 ++--- .../selftests/bpf/verifier/raw_stack.c | 10 ++++----- .../selftests/bpf/verifier/stack_ptr.c | 22 +++++++++++-------- tools/testing/selftests/bpf/verifier/unpriv.c | 2 +- .../testing/selftests/bpf/verifier/var_off.c | 16 +++++++------- 9 files changed, 41 insertions(+), 37 deletions(-) diff --git a/tools/testing/selftests/bpf/verifier/basic_stack.c b/tools/testing/selftests/bpf/verifier/basic_stack.c index b56f8117c09d..f995777dddb3 100644 --- a/tools/testing/selftests/bpf/verifier/basic_stack.c +++ b/tools/testing/selftests/bpf/verifier/basic_stack.c @@ -4,7 +4,7 @@ BPF_ST_MEM(BPF_DW, BPF_REG_10, 8, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid stack", + .errstr = "invalid write to stack", .result = REJECT, }, { diff --git a/tools/testing/selftests/bpf/verifier/calls.c b/tools/testing/selftests/bpf/verifier/calls.c index c4f5d909e58a..eb888c8479c3 100644 --- a/tools/testing/selftests/bpf/verifier/calls.c +++ b/tools/testing/selftests/bpf/verifier/calls.c @@ -1228,7 +1228,7 @@ .prog_type = BPF_PROG_TYPE_XDP, .fixup_map_hash_8b = { 23 }, .result = REJECT, - .errstr = "invalid read from stack off -16+0 size 8", + .errstr = "invalid read from stack R7 off=-16 size=8", }, { "calls: two calls that receive map_value via arg=ptr_stack_of_caller. test1", @@ -1958,7 +1958,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_48b = { 6 }, - .errstr = "invalid indirect read from stack off -8+0 size 8", + .errstr = "invalid indirect read from stack R2 off -8+0 size 8", .result = REJECT, .prog_type = BPF_PROG_TYPE_XDP, }, diff --git a/tools/testing/selftests/bpf/verifier/const_or.c b/tools/testing/selftests/bpf/verifier/const_or.c index 6c214c58e8d4..0719b0ddec04 100644 --- a/tools/testing/selftests/bpf/verifier/const_or.c +++ b/tools/testing/selftests/bpf/verifier/const_or.c @@ -23,7 +23,7 @@ BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), BPF_EXIT_INSN(), }, - .errstr = "invalid stack type R1 off=-48 access_size=58", + .errstr = "invalid indirect access to stack R1 off=-48 size=58", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -54,7 +54,7 @@ BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), BPF_EXIT_INSN(), }, - .errstr = "invalid stack type R1 off=-48 access_size=58", + .errstr = "invalid indirect access to stack R1 off=-48 size=58", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, diff --git a/tools/testing/selftests/bpf/verifier/helper_access_var_len.c b/tools/testing/selftests/bpf/verifier/helper_access_var_len.c index 87c4e7900083..0ab7f1dfc97a 100644 --- a/tools/testing/selftests/bpf/verifier/helper_access_var_len.c +++ b/tools/testing/selftests/bpf/verifier/helper_access_var_len.c @@ -39,7 +39,7 @@ BPF_EMIT_CALL(BPF_FUNC_probe_read_kernel), BPF_EXIT_INSN(), }, - .errstr = "invalid indirect read from stack off -64+0 size 64", + .errstr = "invalid indirect read from stack R1 off -64+0 size 64", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -59,7 +59,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid stack type R1 off=-64 access_size=65", + .errstr = "invalid indirect access to stack R1 off=-64 size=65", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -136,7 +136,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid stack type R1 off=-64 access_size=65", + .errstr = "invalid indirect access to stack R1 off=-64 size=65", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -156,7 +156,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid stack type R1 off=-64 access_size=65", + .errstr = "invalid indirect access to stack R1 off=-64 size=65", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -194,7 +194,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid indirect read from stack off -64+0 size 64", + .errstr = "invalid indirect read from stack R1 off -64+0 size 64", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, @@ -584,7 +584,7 @@ BPF_LDX_MEM(BPF_DW, BPF_REG_1, BPF_REG_10, -16), BPF_EXIT_INSN(), }, - .errstr = "invalid indirect read from stack off -64+32 size 64", + .errstr = "invalid indirect read from stack R1 off -64+32 size 64", .result = REJECT, .prog_type = BPF_PROG_TYPE_TRACEPOINT, }, diff --git a/tools/testing/selftests/bpf/verifier/int_ptr.c b/tools/testing/selftests/bpf/verifier/int_ptr.c index ca3b4729df66..070893fb2900 100644 --- a/tools/testing/selftests/bpf/verifier/int_ptr.c +++ b/tools/testing/selftests/bpf/verifier/int_ptr.c @@ -27,7 +27,7 @@ }, .result = REJECT, .prog_type = BPF_PROG_TYPE_CGROUP_SYSCTL, - .errstr = "invalid indirect read from stack off -16+0 size 8", + .errstr = "invalid indirect read from stack R4 off -16+0 size 8", }, { "ARG_PTR_TO_LONG half-uninitialized", @@ -59,7 +59,7 @@ }, .result = REJECT, .prog_type = BPF_PROG_TYPE_CGROUP_SYSCTL, - .errstr = "invalid indirect read from stack off -16+4 size 8", + .errstr = "invalid indirect read from stack R4 off -16+4 size 8", }, { "ARG_PTR_TO_LONG misaligned", @@ -125,7 +125,7 @@ }, .result = REJECT, .prog_type = BPF_PROG_TYPE_CGROUP_SYSCTL, - .errstr = "invalid stack type R4 off=-4 access_size=8", + .errstr = "invalid indirect access to stack R4 off=-4 size=8", }, { "ARG_PTR_TO_LONG initialized", diff --git a/tools/testing/selftests/bpf/verifier/raw_stack.c b/tools/testing/selftests/bpf/verifier/raw_stack.c index 193d9e87d5a9..cc8e8c3cdc03 100644 --- a/tools/testing/selftests/bpf/verifier/raw_stack.c +++ b/tools/testing/selftests/bpf/verifier/raw_stack.c @@ -11,7 +11,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid read from stack off -8+0 size 8", + .errstr = "invalid read from stack R6 off=-8 size=8", .prog_type = BPF_PROG_TYPE_SCHED_CLS, }, { @@ -59,7 +59,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack type R3", + .errstr = "invalid zero-sized read", .prog_type = BPF_PROG_TYPE_SCHED_CLS, }, { @@ -205,7 +205,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack type R3 off=-513 access_size=8", + .errstr = "invalid indirect access to stack R3 off=-513 size=8", .prog_type = BPF_PROG_TYPE_SCHED_CLS, }, { @@ -221,7 +221,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack type R3 off=-1 access_size=8", + .errstr = "invalid indirect access to stack R3 off=-1 size=8", .prog_type = BPF_PROG_TYPE_SCHED_CLS, }, { @@ -285,7 +285,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack type R3 off=-512 access_size=0", + .errstr = "invalid zero-sized read", .prog_type = BPF_PROG_TYPE_SCHED_CLS, }, { diff --git a/tools/testing/selftests/bpf/verifier/stack_ptr.c b/tools/testing/selftests/bpf/verifier/stack_ptr.c index 8bfeb77c60bd..07eaa04412ae 100644 --- a/tools/testing/selftests/bpf/verifier/stack_ptr.c +++ b/tools/testing/selftests/bpf/verifier/stack_ptr.c @@ -44,7 +44,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off=-79992 size=8", + .errstr = "invalid write to stack R1 off=-79992 size=8", .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", }, { @@ -57,7 +57,7 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off=0 size=8", + .errstr = "invalid write to stack R1 off=0 size=8", }, { "PTR_TO_STACK check high 1", @@ -106,7 +106,7 @@ BPF_EXIT_INSN(), }, .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", - .errstr = "invalid stack off=0 size=1", + .errstr = "invalid write to stack R1 off=0 size=1", .result = REJECT, }, { @@ -119,7 +119,8 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off", + .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", + .errstr = "invalid write to stack R1", }, { "PTR_TO_STACK check high 6", @@ -131,7 +132,8 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off", + .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", + .errstr = "invalid write to stack", }, { "PTR_TO_STACK check high 7", @@ -183,7 +185,7 @@ BPF_EXIT_INSN(), }, .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", - .errstr = "invalid stack off=-513 size=1", + .errstr = "invalid write to stack R1 off=-513 size=1", .result = REJECT, }, { @@ -208,7 +210,8 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off", + .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", + .errstr = "invalid write to stack", }, { "PTR_TO_STACK check low 6", @@ -220,7 +223,8 @@ BPF_EXIT_INSN(), }, .result = REJECT, - .errstr = "invalid stack off", + .errstr = "invalid write to stack", + .errstr_unpriv = "R1 stack pointer arithmetic goes out of range", }, { "PTR_TO_STACK check low 7", @@ -292,7 +296,7 @@ BPF_EXIT_INSN(), }, .result_unpriv = REJECT, - .errstr_unpriv = "invalid stack off=0 size=1", + .errstr_unpriv = "invalid write to stack R1 off=0 size=1", .result = ACCEPT, .retval = 42, }, diff --git a/tools/testing/selftests/bpf/verifier/unpriv.c b/tools/testing/selftests/bpf/verifier/unpriv.c index 2df9871b169d..c30afb09ab6a 100644 --- a/tools/testing/selftests/bpf/verifier/unpriv.c +++ b/tools/testing/selftests/bpf/verifier/unpriv.c @@ -108,7 +108,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 3 }, - .errstr_unpriv = "invalid indirect read from stack off -8+0 size 8", + .errstr_unpriv = "invalid indirect read from stack R2 off -8+0 size 8", .result_unpriv = REJECT, .result = ACCEPT, }, diff --git a/tools/testing/selftests/bpf/verifier/var_off.c b/tools/testing/selftests/bpf/verifier/var_off.c index 8504ac937809..49b78a1a261b 100644 --- a/tools/testing/selftests/bpf/verifier/var_off.c +++ b/tools/testing/selftests/bpf/verifier/var_off.c @@ -18,7 +18,7 @@ .prog_type = BPF_PROG_TYPE_LWT_IN, }, { - "variable-offset stack access", + "variable-offset stack read, priv vs unpriv", .insns = { /* Fill the top 8 bytes of the stack */ BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), @@ -63,7 +63,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "R4 unbounded indirect variable offset stack access", + .errstr = "invalid unbounded variable-offset indirect access to stack R4", .result = REJECT, .prog_type = BPF_PROG_TYPE_SOCK_OPS, }, @@ -88,7 +88,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 5 }, - .errstr = "R2 max value is outside of stack bound", + .errstr = "invalid variable-offset indirect access to stack R2", .result = REJECT, .prog_type = BPF_PROG_TYPE_LWT_IN, }, @@ -113,7 +113,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 5 }, - .errstr = "R2 min value is outside of stack bound", + .errstr = "invalid variable-offset indirect access to stack R2", .result = REJECT, .prog_type = BPF_PROG_TYPE_LWT_IN, }, @@ -138,7 +138,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 5 }, - .errstr = "invalid indirect read from stack var_off", + .errstr = "invalid indirect read from stack R2 var_off", .result = REJECT, .prog_type = BPF_PROG_TYPE_LWT_IN, }, @@ -163,7 +163,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 5 }, - .errstr = "invalid indirect read from stack var_off", + .errstr = "invalid indirect read from stack R2 var_off", .result = REJECT, .prog_type = BPF_PROG_TYPE_LWT_IN, }, @@ -189,7 +189,7 @@ BPF_EXIT_INSN(), }, .fixup_map_hash_8b = { 6 }, - .errstr_unpriv = "R2 stack pointer arithmetic goes out of range, prohibited for !root", + .errstr_unpriv = "R2 variable stack access prohibited for !root", .result_unpriv = REJECT, .result = ACCEPT, .prog_type = BPF_PROG_TYPE_CGROUP_SKB, @@ -217,7 +217,7 @@ BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "invalid indirect read from stack var_off", + .errstr = "invalid indirect read from stack R4 var_off", .result = REJECT, .prog_type = BPF_PROG_TYPE_SOCK_OPS, }, From patchwork Wed Aug 4 17:09:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ovidiu Panait X-Patchwork-Id: 492228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72F86C19F39 for ; Wed, 4 Aug 2021 17:09:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58C3461040 for ; Wed, 4 Aug 2021 17:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239797AbhHDRKH (ORCPT ); Wed, 4 Aug 2021 13:10:07 -0400 Received: from mx0a-0064b401.pphosted.com ([205.220.166.238]:55160 "EHLO mx0a-0064b401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239790AbhHDRKG (ORCPT ); Wed, 4 Aug 2021 13:10:06 -0400 Received: from pps.filterd (m0250810.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 174FpFA1032119; Wed, 4 Aug 2021 10:09:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=PPS06212021; bh=XZTSLUw4C4eeYXtd+Rlmyy4SYoT11tzDBv7rIG001+4=; b=lHEU6Dd6zda0KKH0RMnKSjxWdaJTdR/8bk7dOo8xzYT4yRMI8BqgZQ0aDy0aVFDtuVck IAbKjDwMJOmi3TvF4MNu8AkLITt1NNO1DWwDArz+23/zybatRHuEKJNFU4kC2MU3H0P7 I7DegvR/ZldtPeApU8TcASREr9Q/qBa76S10JmlxfrIG1OGAPQChrdGeY4VqlTNinkY0 V2WmmUDTAMp2bVcefTohmHx8rGN8B8PdAgXjRaN8n+2jIIymwfuI+UW5o+U16S32wupB 0+kKIrG5LsTCbLvlEg/JmeIOLXt1ua9+NFf0atSm4z4LV0U3HRvFahxIXMU7+QNUMOsZ jA== Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by mx0a-0064b401.pphosted.com with ESMTP id 3a7vt6r425-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Aug 2021 10:09:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h1y3Qs+T45MJexHpaPwNO8+VU4pCurBuadtEBB1hPY/KNdsXk5ZkFn6gPP+AU9tFRMyxvvaJr0axL5atONJUwbWDRObjiixZWUqjiY8RGcDqgdlATNm1DYe3NnqwDisw2O++vCO0uOWKq5BDNIe/z6Gl9yNLokLE6rfFWaBZPOMMjeY3sSTSHcWA6o0d59uLD0kF4e6ci00o/8FvKAsDztlXMmB8S3oeRZpERUvmcvmE1LvwYKY2a67alvKYU28GD6uzWgICUj0/qmYjklDvGs+rrI7t5LhE3M3aFzBgmbSesQMYgZ2Zf47ldiELtra3Cn9kTKYWoxs+XrIUPxGRGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XZTSLUw4C4eeYXtd+Rlmyy4SYoT11tzDBv7rIG001+4=; b=QwRUn0vnR0J2aIqzv2a8Lj6BE8YgMRAbNzyuQhPrs4pLnRgOmjrBdhBQEkJhY4U4Ny2RiEB5HmIm8ecbuc6C0wlJPILm4zNarpVyDKi8aJPQZyplNViCxppL28/lBtuKFzcme0bvhMrAqDAr0PPc2nTQTo/awnvB/gJIg7HIlxTE2htgSv/zVZGoEEZPUdsdJh8h2kGTxN1Qo9SGq1u2cQPjmLDW8yw1wR8s5zko2rIi7yaXUXgIpyXNI1C8u+BIUAauNAovoYyrbH9alTpjzXATObMSxgI9gV72NeA3aKW1Ig2cTUpF24ww40dUeIEAE3AydKDJwUoQvkNEAKp2GQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=windriver.com; Received: from DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) by DM5PR11MB1834.namprd11.prod.outlook.com (2603:10b6:3:113::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.25; Wed, 4 Aug 2021 17:09:41 +0000 Received: from DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3]) by DM4PR11MB5327.namprd11.prod.outlook.com ([fe80::ccb:2bce:6896:a0c3%7]) with mapi id 15.20.4394.017; Wed, 4 Aug 2021 17:09:41 +0000 From: Ovidiu Panait To: stable@vger.kernel.org Cc: bpf@vger.kernel.org, daniel@iogearbox.net Subject: [PATCH 5.10 6/6] selftest/bpf: Verifier tests for var-off access Date: Wed, 4 Aug 2021 20:09:17 +0300 Message-Id: <20210804170917.3842969-7-ovidiu.panait@windriver.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210804170917.3842969-1-ovidiu.panait@windriver.com> References: <20210804170917.3842969-1-ovidiu.panait@windriver.com> X-ClientProxiedBy: VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) To DM4PR11MB5327.namprd11.prod.outlook.com (2603:10b6:5:392::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from otp-linux03.wrs.com (46.97.150.20) by VI1P190CA0033.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Wed, 4 Aug 2021 17:09:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 40aa51fe-86cd-48ce-8b14-08d9576aa5d8 X-MS-TrafficTypeDiagnostic: DM5PR11MB1834: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:595; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HXYg9wNdOTnvYwKBw23QgFcpV54T8pKpanHyPXYJcYLqEUh2bHaAdExdOqerb1RRDXKYB2d0sVP8Vmqa/I1D3+Ivoy459xdtrKLNPe6vYFjCgOIy0DH5UTkuG09kx4zP3i6jSAChuyWx3gv+dC2EkLPDF2b9yk4Ny9w76IfkVYyazMZmdi+TaC0J1TVEOQtGgHnoS3/5ffPWp7x+xk/sljrd3tz9hgZKXkZZbzECHwsw2g4dU6EicY78UQEER56cFh40+Y1yo7ghZLdUi0hT+XLpi0bgO+kYeK1ETCMty/TXCG+xCeVSHHwdMMNbK8PtOBCcx1r3yFnwknHyBA7sifVzGygTZ5ayBVeAC7KjrAgvfZWtovuFFHmZazTotETPXXrGXTdIpkkEdSr+fXUMDOEB/98uz3jgccS/VMMTBMq2JoAOwIpt8Lml5Eh+504kr6fjJmeUAWAfdjgmmmkfJXgssUZbTbB0fUQx9k+GqoFvW04H4Ktpf4v/XFVpN3jKjZKStz7LeOsC+F1Ge7jv9Laf34LkNEHMg0NnwZAuMJBrtWKOkQPdBFoDYe69PvuKKCWYzDlLHSTEPlyMg7X1u0pfdgRgNYUbvL7jsTraRoWyxc1i/WMIKhBiaEw5HGPbrnRTYKveuWK+tjNtdMPHyfh6Vxolr23Syx90bgTWFGfYHZEvEVDms9lIWWcZD9F3FzU0vQ4/mYlscXoC4d9rtGu1vVPC7Kh4Dl/QNw4CbM8ixGsHfv7Eo3/Jrw2WToaThIN9GXqTW8bjWtX/HrqxnxOudFGaO0OHRGBaodfGoVA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5327.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(136003)(366004)(396003)(346002)(376002)(6666004)(38100700002)(316002)(6506007)(1076003)(86362001)(38350700002)(52116002)(83380400001)(478600001)(44832011)(2906002)(5660300002)(8936002)(956004)(6486002)(2616005)(4326008)(966005)(6916009)(186003)(36756003)(66556008)(66476007)(8676002)(6512007)(66946007)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e3H3ibKNaHS4yk3ebUiFS3HNYa8YvRIHopwTp03GX+OoMNX4zdFZXHKLxazXBsGp4OeL7nXrtpCIov4aEjLSLzNW4aMyHFtuJzBKiO04N4OKJaTUp/2E3jUAm2jruJNDaqIJKPz+Qkdlq/J1gFKtHULdzXT2hYIRU3LCdesb02eTlvXsb7IZBvMFgvnLAqOG8GJD+zd5DRp7qxxu2oUedsiIlVSiP2ofPLb3TdNrqzzUaLbE5OiRWOVLWJEuCMxuA3CjITpGRM/CxxwGevODzdWqvGUzbSwlbqUh/Be+a33bhfotEMo/7AEDgEVgdjGWbFNuH3fy0AErIkGUlt2Www83YXF86DxlOA5v9/UDnZGEJoVmJvX51U5hT6l/YYXjhiXwAywfwvClU/aM0dSa6UJ0aH6eva98Ezr/0HAnKIBBeqW+xTOSM4rieZZUvHW2oLMWvRwhcpPNzjVzU3KOetyEYcrWSaUar6tzZugPMoH+6yeWtNqNgu8UV6rHQngG7hLWsna9Zt+r/I71rPWNjA+9YJh+9IXPdLZF+FwI27PcXCoVxVW34hPfs8El1IZ70kmlNpchmJYWwBoFNvbydkEYxoMDW50vuIfsFhSRXXS9SodFTNEZssY7UrBi/2ogp2epBrRhM9E2NcMgb4Q3TH2u0Gl2zbJfxF9kudwEGSmx6Xh9jo/bb031EkqJ2DtToG6WCtJ48lZFKUeLRPirZsyq+AcNLaRWWInyPi3R+XPNm0UH2ssI28Jcb/WrPgKZJB73AdjA2B7gqtLemoowFq+yiChVvlsxg/quGGlrYbDD7XSSXqz9vBbitgzQGkYGqt5Ggr0nFGDHLRRi4CmxfZHTKAIn1pSLlzJQ6aTSeZhFCH1s57NOwZ4k9lr3lKltnrc/I5cspTIhZJVySAZQSVG6sCm+M+HePefmpo4031coOKMy+HKvB3UtA+P8hKO8JoIYbX6XMiko9ww0C8ryKh7pRolF1lxLBMCKSJIItXhl4UYZc+DLEyfkqH4QqDtgckwdiKaG6jeOAYKUmDHecnCN08mluUuCF0EmnPxU6TvBBd8ckQ0iP7gpP6fGlxavaxgnEf7fht1gYQjwCiw5HI+qcw+n34SGEkghNmo8C/HZXC6nAVc2AWYJ0bqW4hISURjqq5ZU+Oxo2Ji9Qkt8UHREQsGq7DAcG+7aqup1MpxunW650X2sIomdZHjH1EOwjGHBUuzh5ruANRz9JJcT6BslLDswF9yrzaNv5wqokTuOcQPyZtcv+GBAwvTxPmRO8huo8IkK/j5+e1lFyIrEz76SNF1sp/bcEwshMF5IcgA6MRm1H2vAglNIXHe4mN3j X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40aa51fe-86cd-48ce-8b14-08d9576aa5d8 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5327.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2021 17:09:41.1253 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5NoVPd41GRxvVenLDri8gDkHd+9utJf6rnxRegXeCxAGKv3bn13ySZcmX7PqPiDn0Ftk+fPcTypj4Cfs2C5mufkCdyn7RhasFxtZmF0UUF8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1834 X-Proofpoint-GUID: r-p1DKfXrLuC1ANLwlKr6RkxF6D48oYC X-Proofpoint-ORIG-GUID: r-p1DKfXrLuC1ANLwlKr6RkxF6D48oYC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1, Aquarius:18.0.790, Hydra:6.0.391, FMLib:17.0.607.475 definitions=2021-08-04_05,2021-08-04_03,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=994 mlxscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 phishscore=0 clxscore=1015 spamscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108040098 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andrei Matei commit 7a22930c4179b51352f2ec9feb35167cbe79afd9 upstream Add tests for the new functionality - reading and writing to the stack through a variable-offset pointer. Signed-off-by: Andrei Matei Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210207011027.676572-4-andreimatei1@gmail.com Signed-off-by: Ovidiu Panait --- .../testing/selftests/bpf/verifier/var_off.c | 99 ++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/verifier/var_off.c b/tools/testing/selftests/bpf/verifier/var_off.c index 49b78a1a261b..eab1f7f56e2f 100644 --- a/tools/testing/selftests/bpf/verifier/var_off.c +++ b/tools/testing/selftests/bpf/verifier/var_off.c @@ -31,14 +31,109 @@ * we don't know which */ BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_10), - /* dereference it */ + /* dereference it for a stack read */ + BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), + BPF_MOV64_IMM(BPF_REG_0, 0), + BPF_EXIT_INSN(), + }, + .result = ACCEPT, + .result_unpriv = REJECT, + .errstr_unpriv = "R2 variable stack access prohibited for !root", + .prog_type = BPF_PROG_TYPE_CGROUP_SKB, +}, +{ + "variable-offset stack read, uninitialized", + .insns = { + /* Get an unknown value */ + BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1, 0), + /* Make it small and 4-byte aligned */ + BPF_ALU64_IMM(BPF_AND, BPF_REG_2, 4), + BPF_ALU64_IMM(BPF_SUB, BPF_REG_2, 8), + /* add it to fp. We now have either fp-4 or fp-8, but + * we don't know which + */ + BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_10), + /* dereference it for a stack read */ BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_2, 0), + BPF_MOV64_IMM(BPF_REG_0, 0), BPF_EXIT_INSN(), }, - .errstr = "variable stack access var_off=(0xfffffffffffffff8; 0x4)", .result = REJECT, + .errstr = "invalid variable-offset read from stack R2", .prog_type = BPF_PROG_TYPE_LWT_IN, }, +{ + "variable-offset stack write, priv vs unpriv", + .insns = { + /* Get an unknown value */ + BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1, 0), + /* Make it small and 8-byte aligned */ + BPF_ALU64_IMM(BPF_AND, BPF_REG_2, 8), + BPF_ALU64_IMM(BPF_SUB, BPF_REG_2, 16), + /* Add it to fp. We now have either fp-8 or fp-16, but + * we don't know which + */ + BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_10), + /* Dereference it for a stack write */ + BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0), + /* Now read from the address we just wrote. This shows + * that, after a variable-offset write, a priviledged + * program can read the slots that were in the range of + * that write (even if the verifier doesn't actually know + * if the slot being read was really written to or not. + */ + BPF_LDX_MEM(BPF_DW, BPF_REG_3, BPF_REG_2, 0), + BPF_MOV64_IMM(BPF_REG_0, 0), + BPF_EXIT_INSN(), + }, + /* Variable stack access is rejected for unprivileged. + */ + .errstr_unpriv = "R2 variable stack access prohibited for !root", + .result_unpriv = REJECT, + .result = ACCEPT, +}, +{ + "variable-offset stack write clobbers spilled regs", + .insns = { + /* Dummy instruction; needed because we need to patch the next one + * and we can't patch the first instruction. + */ + BPF_MOV64_IMM(BPF_REG_6, 0), + /* Make R0 a map ptr */ + BPF_LD_MAP_FD(BPF_REG_0, 0), + /* Get an unknown value */ + BPF_LDX_MEM(BPF_W, BPF_REG_2, BPF_REG_1, 0), + /* Make it small and 8-byte aligned */ + BPF_ALU64_IMM(BPF_AND, BPF_REG_2, 8), + BPF_ALU64_IMM(BPF_SUB, BPF_REG_2, 16), + /* Add it to fp. We now have either fp-8 or fp-16, but + * we don't know which. + */ + BPF_ALU64_REG(BPF_ADD, BPF_REG_2, BPF_REG_10), + /* Spill R0(map ptr) into stack */ + BPF_STX_MEM(BPF_DW, BPF_REG_10, BPF_REG_0, -8), + /* Dereference the unknown value for a stack write */ + BPF_ST_MEM(BPF_DW, BPF_REG_2, 0, 0), + /* Fill the register back into R2 */ + BPF_LDX_MEM(BPF_DW, BPF_REG_2, BPF_REG_10, -8), + /* Try to dereference R2 for a memory load */ + BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_2, 8), + BPF_EXIT_INSN(), + }, + .fixup_map_hash_8b = { 1 }, + /* The unpriviledged case is not too interesting; variable + * stack access is rejected. + */ + .errstr_unpriv = "R2 variable stack access prohibited for !root", + .result_unpriv = REJECT, + /* In the priviledged case, dereferencing a spilled-and-then-filled + * register is rejected because the previous variable offset stack + * write might have overwritten the spilled pointer (i.e. we lose track + * of the spilled register when we analyze the write). + */ + .errstr = "R2 invalid mem access 'inv'", + .result = REJECT, +}, { "indirect variable-offset stack access, unbounded", .insns = {