Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp476499pxb; Wed, 13 Jan 2021 08:08:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1NOU5bOGmsMMDlNigU5NEJ1tYLufQQ64dS3qpgKAhGZoa9Cqkq+wLrMu5+ty60pMSP2n3 X-Received: by 2002:aa7:d593:: with SMTP id r19mr2415666edq.246.1610554139626; Wed, 13 Jan 2021 08:08:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1610554139; cv=pass; d=google.com; s=arc-20160816; b=KsYe9EAc4BiWLr9OeM5gwTHFyuPZZrQWsYGLu2zenjtMM3G4JNMiAQAXz7Ma7tzu0p pL2t48jRwZrjKm6LQkouG+QbhM68UoVWOO7oXNhuW4j2tbgj9w0kYbchHirSxqKFJ8/O fmy850sLLj5cS7QOMoKjepdlQQojK6X8yIjFuvnU4EtnN4kIfHvu8WM6zxiGwssWnf4u u1nmNkWRt7rthOakSi/WqUYPR90PKJ/v1mEUfvuuq1nrMjPxxlxPsPj388dCza/4GLhH ZHm6RCLlWjmaGga7kSSvJk3PFS4dn2t9r0I93Sn6PmWf17OdSQp6BtN5bPRenN3TeTa5 QvtA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature:dkim-signature; bh=x2JOW2zlRsUtINi/XEwulTn2Kpfd7WaL7NODJGJ3XAQ=; b=PNEyiuaemXdt7ENQgUz8ucK469wOzpFx6RTKj6u0Dl8t5LzSsvSAsykH1B0v5eXHM2 f3c5AK4/EpZOKvupY6XRIGfa7kbDnCo0tgaeL5o+XhJh4qD6dA7YDLfi8xtW8gzb775E x43j/nXW1e0YheogfcUIe1i5rPvRtcW75U62nq4+08f9J7xCSwvlVtOIqa8dyH4+7lUc vcwogpFXT+02YNzUkKZW25mSwDMPM1wy++K8avhkd7T5L3daFscVajNhFgrHa7F4SKS3 o5zz5lmVpMVKLzBdgqN/Ar5MbSQ/fFbdysKFt+y7VOgxlIqCtqeY2tMOnzDD4C3vX2pj aXEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=IdZm+tWe; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b="Vi/IsXqC"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si1134753ejr.222.2021.01.13.08.08.22; Wed, 13 Jan 2021 08:08:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=IdZm+tWe; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b="Vi/IsXqC"; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727203AbhAMQGY (ORCPT + 99 others); Wed, 13 Jan 2021 11:06:24 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:28528 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbhAMQGX (ORCPT ); Wed, 13 Jan 2021 11:06:23 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10DFPvkV022210; Wed, 13 Jan 2021 08:05:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=x2JOW2zlRsUtINi/XEwulTn2Kpfd7WaL7NODJGJ3XAQ=; b=IdZm+tWekX9tTTCs7kAu/3zG6rFll8PnFEEvL/C1bUnYkF6we5LbcVd/N/hESP1QjVT9 CNYenQkOMe7vdWAAupaycrleafmAENaojQsNd7ya3e7wvL9HILjkE6j2QJQZ1o0kEnU+ c4A+0bGkIgYSTNEIEsgwAI4TdWb0dVNAP4Q= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com with ESMTP id 361fpe5t7w-9 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 13 Jan 2021 08:05:28 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (100.104.31.183) by o365-in.thefacebook.com (100.104.36.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 13 Jan 2021 08:05:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UUXtwSX/t3KLBvccxqy1r60soZ9MYI+AisGEr+kgZrf4psXLvaSUqWBr5GBStkSiX3MVkVmTu+nq6KOaQOeXL2Mx61xcDzUUAIOlcAZlaE5b7ms8re4heAnqG69yegVRHerc73b0z7eXrnJbLooCu1CRS3l6KNbvhlvk1ayaWA9SrK9gjtIbQacldRB5zeqDHoOX5ihsEe+qQ6iGKVEzkg01hBrCd45ntxd469rnMB8ZF5v72rHulvlcpXXbYLjZJjCqdLY+PC5K+UN3//SFRxcr47UwvQwrSStDTdeDjEv5f2X7L9p4vR+N6UypYyKmhzcFQsM08dA6nK6bBzfBdg== 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=x2JOW2zlRsUtINi/XEwulTn2Kpfd7WaL7NODJGJ3XAQ=; b=RF62ne3S/vBWhGqy9Cm/G+Gb/a6czuc3hnjX3Pm3a+3eb2+aR4IujAS5hfMMQuPRVCGV6eB3LQc6JTyDN2qDaWWLBG7dnWMKfz5QG3vNF3q686VcI2pJwouPhi5GB7SlaHXAgQ22gW+wNCiaKgzQaiAqkeJFC9Y6LvOBmH9bzTwKAopgJ1pMhtR+goeL/JeQ4R88GGJsGFxR5TuulMoeGe+xmjmo3w6gS7NEUsdEtCzV13aeq8iK0qE2vHGq+V5v1uzlmDnlTYO8aMPKJHGgIRIQkVA19oLiN3O04sx/d0XuvzHcpLAeaN102NpIpk5YJv9yGpWleHjk4EltI+cNgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector2-fb-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x2JOW2zlRsUtINi/XEwulTn2Kpfd7WaL7NODJGJ3XAQ=; b=Vi/IsXqCo2I8cHpxlPYmct5gpXp5WMndGsDScecuhqGBAvpzx3lZJAbe++81o5XOEhgJj2ClYiiy+gXQV5Ob7Y+b2a+Et4oimBHIraSe2p2AKDJW/LrKxQkyal+qNgyiFQYxn9W03D2RykAwlMFTv08HPtP0GCXxFKm6CSJQBtQ= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=fb.com; Received: from BYAPR15MB4088.namprd15.prod.outlook.com (2603:10b6:a02:c3::18) by BYAPR15MB3190.namprd15.prod.outlook.com (2603:10b6:a03:111::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Wed, 13 Jan 2021 16:05:09 +0000 Received: from BYAPR15MB4088.namprd15.prod.outlook.com ([fe80::9ae:1628:daf9:4b03]) by BYAPR15MB4088.namprd15.prod.outlook.com ([fe80::9ae:1628:daf9:4b03%7]) with mapi id 15.20.3742.012; Wed, 13 Jan 2021 16:05:09 +0000 Subject: Re: [PATCH bpf v2 2/2] selftests/bpf: add verifier test for PTR_TO_MEM spill To: Gilad Reti , CC: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , Shuah Khan , , , References: <20210113053810.13518-1-gilad.reti@gmail.com> <20210113053810.13518-2-gilad.reti@gmail.com> From: Yonghong Song Message-ID: Date: Wed, 13 Jan 2021 08:05:04 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 In-Reply-To: <20210113053810.13518-2-gilad.reti@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [2620:10d:c090:400::5:e777] X-ClientProxiedBy: MWHPR07CA0010.namprd07.prod.outlook.com (2603:10b6:300:116::20) To BYAPR15MB4088.namprd15.prod.outlook.com (2603:10b6:a02:c3::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2620:10d:c085:21e1::13f6] (2620:10d:c090:400::5:e777) by MWHPR07CA0010.namprd07.prod.outlook.com (2603:10b6:300:116::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Wed, 13 Jan 2021 16:05:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81f4a268-f1d8-4c1b-2a3f-08d8b7dd0034 X-MS-TrafficTypeDiagnostic: BYAPR15MB3190: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qSp1Nwq1o9hsWksmH8mw/hQRo/szP1VL2kM86l1trVJpo1hM4xNav5dK8vFp/dRqJIz2D3UYsp/KuVNZT+BUmkFRoJe+YZgfowIQ3p9GMz8PoFmjTHSrzcM+qPiSrdA49aLAALWZz3D/w30co0tXO42+CmzNALu8WMnQNNIte6g+hrGyhwHnMB+/YRWEbxDDybyqMF310C5qgD1GPqxPHVkc6c9mUjCsCcReBV1562WHTGzcYKS40Ne9lJHS11WNrjGaFsRNKf3hy3jSXudnMu/ZCjsZu38EodebUimkdA39eOnIzg7X6E4eOPjd/s9ne48gRKDLp+Oaen5y+AJJLotVTNcRphJoQt4Z2CJj+5wJx70OOI5HU1MaoyL+YrB4zvYN3vDkdN+GVOvDhWICvoGB7RIoCxP982OXfajNCvzzUh/64VD/W16Q6W6VH7y2XR1v7dEEGGoUYqlDw80bS+kBlGeB+RmsyIQ8IJNgAVk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR15MB4088.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(39860400002)(376002)(136003)(346002)(396003)(366004)(4326008)(5660300002)(16526019)(478600001)(31686004)(86362001)(36756003)(66946007)(186003)(4744005)(316002)(83380400001)(54906003)(6666004)(66476007)(2906002)(8936002)(6486002)(31696002)(8676002)(53546011)(2616005)(7416002)(52116002)(66556008)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?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UFZIWVdl?= =?utf-8?B?ek1ZOTZodTFTdnFvTzZiQmo1ek9IdXlXT2VFamhMNHNWM2NCTzZ3MHFWSFVt?= =?utf-8?B?NHQxWEoxU1hXRHYrL1ZsYndYRHBsekFreDljMTFBMFRhdVdNMDA4VThndks0?= =?utf-8?B?WFU3eURJc1NKd0JaZCtQbUZVcW5rRG5DVDBaZ2g0WEEyZ1lTRzI2V0tJVkxE?= =?utf-8?B?ODk0dk5hZVVvbnpvWE00NzcyZlNvaFQvNCtqOHhoYTlLK1EzUnlZVk1JL0x0?= =?utf-8?B?bWlyMjZOOXZsRlVjRjNDQ2MrcWtGRGFaUjgvbnpJUGY4bUE2ekR4UnhUbHAr?= =?utf-8?B?VHJJMmtRY0FKbDRTcTNmamdYeUcyUXM0NDBTbEdqL1A3bDZqVWtJNlFuQ2Zp?= =?utf-8?B?d1FzcEVqbGtFNEJQZktXdEZvdVlNZi9pSkRocGxlckx3b002d1E0SGpXbVVL?= =?utf-8?B?amlYaUVDd2FBMUpNY2xTNWdJU0tyQTZPR3FtZW5xYkxpVzBOQzdqVzNRSFk0?= =?utf-8?B?OUQwNmNUT2cySmc9PQ==?= X-MS-Exchange-CrossTenant-AuthSource: BYAPR15MB4088.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2021 16:05:09.0770 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-Network-Message-Id: 81f4a268-f1d8-4c1b-2a3f-08d8b7dd0034 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z/Ytp9wWhei8oJwAnc56wfqKRZFI+jkfPHuWzN2Ce1YbddcwSlCbSsb4Xp+2sS57 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR15MB3190 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-13_07:2021-01-13,2021-01-13 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 impostorscore=0 malwarescore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101130096 X-FB-Internal: deliver Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/12/21 9:38 PM, Gilad Reti wrote: > Add a test to check that the verifier is able to recognize spilling of > PTR_TO_MEM registers, by reserving a ringbuf buffer, forcing the spill > of a pointer holding the buffer address to the stack, filling it back > in from the stack and writing to the memory area pointed by it. > > The patch was partially contributed by CyberArk Software, Inc. > > Signed-off-by: Gilad Reti I didn't verify result_unpriv = ACCEPT part. I think it is correct by checking code. Acked-by: Yonghong Song