Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1000656ybb; Fri, 20 Mar 2020 11:35:40 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvMhRPCNNqWSdI96wk0VV3GpmtxMq2EhxlNDZYrKXyzfrq2kwsWpyg5xYCsWFmAPllebwN6 X-Received: by 2002:a54:4e0e:: with SMTP id a14mr7820441oiy.88.1584729339937; Fri, 20 Mar 2020 11:35:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1584729339; cv=pass; d=google.com; s=arc-20160816; b=rY4CsNiuBH50qZcWUGRVhhobhmFBRsg0GhQCTq9MgVwbw5SpNDG07e/PTupuOcE+yW FzAupOJBL3HqCHA6GfYzJCJxYadW+yHug9u3ktc+iGI8+zS919BOXjOzLxWuijyLwk6P X5/CtQC8ilYhXteN5xaQxe3Fp7fjMSYd/T0xIq2qcDuZUY1pooKSEwPiVXXBw+W6pqX4 Y9JHClM8ghH/czHqs47hQ6i98GpMuSlRyLuaSE0gzho5YYLlvw7hhmpxs2KFv0ms4Z0X Qgz+yjKraGGUJ50widuAMkbUVg+MCnd4fzHQmLVtiBtq2DZhUM0iGbYnCpqwl/QXHQRX RPGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=fGIsdNVIWwBAjXHczvKw1KrMK7d2nJTkgXva2Z4gcWs=; b=NAop52ScLfOP56DoYHPNE2huy6szeAI6vClyyhZpYIdzWYBnZ3QC4pQhWTt3VsJEAH eBlndQSmtxJiMO7U0ErnXpai5EqP7kAJRLSPx19zb9pst14NovAb4WiGnNzHtOQaAfwe uWUghK5T+8Y/mNeMbMHnNieCwg5U+7prm8l0+I7CQmPNNhswFxoopuDXMotKe0snZrWr 002S+ygypfSQXmVttH0groygJae/YYNHozUjfb9YZLC2yZ832Owc+uCPmRuWrpFk8QNp rD6gCDTcfCtPGw3aIN05txSOAcY8T2c2GkUO6N9TunFPFW6qrQg27gdmzgLuem/N/Ad0 osTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=A9iJYj3R; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b=ila7XhRI; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si3110091oie.175.2020.03.20.11.35.18; Fri, 20 Mar 2020 11:35:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=A9iJYj3R; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector2-fb-onmicrosoft-com header.b=ila7XhRI; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727265AbgCTSes (ORCPT + 99 others); Fri, 20 Mar 2020 14:34:48 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:23502 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727151AbgCTSes (ORCPT ); Fri, 20 Mar 2020 14:34:48 -0400 Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.16.0.42/8.16.0.42) with SMTP id 02KISUvn004863; Fri, 20 Mar 2020 11:34:30 -0700 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=fGIsdNVIWwBAjXHczvKw1KrMK7d2nJTkgXva2Z4gcWs=; b=A9iJYj3RZ7uprlmhr6Au1akjwIWnpC1txItRdBBGntrgQSea6ptISZDCnFa0cCBeJFOs pjLvcdrXjKBSMjlOHzGKaaZr2IXPWAbzSGp+vUqMgQJMdPRlD9UjLe1I2sfECYpDCRTC z0tQrTxfryUzFPuqqFUiVm3K+DdPnIKql5o= Received: from maileast.thefacebook.com ([163.114.130.16]) by m0001303.ppops.net with ESMTP id 2yu7ynyrxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 20 Mar 2020 11:34:30 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (100.104.31.183) by o365-in.thefacebook.com (100.104.35.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Fri, 20 Mar 2020 11:34:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YZqC6LdFWjs6QZ/g3TH+WH62L9/gTmNjs4bhUb4fQ6FGKSuKOLf0SAIdJQeiOysRp6Sx+couSEEnx3XnyBbooSsS8/s2XEXkkGOl0PIENdFwNo3yAvI5wTlE8vv9rnyL9Ojzt3xgz8bTkr79xd1sPaX0o78hR0FtfVzIvyV+AsakmXKvE7VtqQPUZnNGjF/A+MUc0PhS5eItMc/m1xzMwi+PnJyxXsecZlVlE9MtqSuD7MoErRUrjBA0X0SZYXbW3K6ZRzwBE+LbpOevKAhN6HrDCocARQvq2nWeCNiT/BSirdm1PLBRs48D3uDfBpeOn50mFtO8WX+Gd6nTxZLHYg== 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=fGIsdNVIWwBAjXHczvKw1KrMK7d2nJTkgXva2Z4gcWs=; b=hpakoFrvgrr4O3va+cuR6pbcdyxm9Nlen88xBGGkj+BT/AWN3b6UYEhiyKIGXqPNXr4gT5de9iKxfVC2V4KxQY3X4hAUa5bvIX8M9TzhDlwGqr3KrJptz1TRmnzA+WKdmlBKA/y97lD6Mbp1nFUMl87bhpd7N8HNsqDDW8ByWdsskJFafey3JQtmNesfKUcnadqQzb4tp5VBXbtG3v38luaWJuJZpjX2h3jI54jmIZ3xVFIVhXXXNJEw+4gIdGPpB/Spl1phcTTRVfSGf0F6JDZuisj8xblcKYdBWbDzFIkCyDuV9C6oz5PL6xv+lTtO9Q4/omoOW5vKcFMYo+pstQ== 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=fGIsdNVIWwBAjXHczvKw1KrMK7d2nJTkgXva2Z4gcWs=; b=ila7XhRIFPEQI7osDPR+wI73duelmocBoX2hisEwLvIv+CjEQkUIEi/FQf2wwD5nI3XgceCwB8jb512VYclymQtkFed98LY9N+cK6hzhUVs0ogf4hG/H2gRB8lkbSsbhVPhodGllU8eNLR11N+ZLamlTNAnHuUJqQorb6mKbCa8= Received: from MW3PR15MB3883.namprd15.prod.outlook.com (2603:10b6:303:51::22) by MW3PR15MB3818.namprd15.prod.outlook.com (2603:10b6:303:47::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19; Fri, 20 Mar 2020 18:34:29 +0000 Received: from MW3PR15MB3883.namprd15.prod.outlook.com ([fe80::a49b:8546:912f:dd98]) by MW3PR15MB3883.namprd15.prod.outlook.com ([fe80::a49b:8546:912f:dd98%5]) with mapi id 15.20.2835.017; Fri, 20 Mar 2020 18:34:29 +0000 Subject: Re: [PATCH] bpf: explicitly memset some bpf info structures declared on the stack To: Greg Kroah-Hartman , Daniel Borkmann CC: Alexei Starovoitov , Martin KaFai Lau , Song Liu , Andrii Nakryiko , , , , =?UTF-8?Q?Maciej_=c5=bbenczykowski?= , John Stultz , Alexander Potapenko , Alistair Delva References: <20200320094813.GA421650@kroah.com> <3bcf52da-0930-a27f-60f9-28a40e639949@iogearbox.net> <20200320154518.GA765793@kroah.com> <20200320161515.GA778529@kroah.com> <20200320162258.GA794295@kroah.com> From: Yonghong Song Message-ID: Date: Fri, 20 Mar 2020 11:34:11 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: <20200320162258.GA794295@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MWHPR22CA0024.namprd22.prod.outlook.com (2603:10b6:300:ef::34) To MW3PR15MB3883.namprd15.prod.outlook.com (2603:10b6:303:51::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from macbook-pro-52.local.dhcp.thefacebook.com (2620:10d:c090:400::5:a280) by MWHPR22CA0024.namprd22.prod.outlook.com (2603:10b6:300:ef::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.21 via Frontend Transport; Fri, 20 Mar 2020 18:34:27 +0000 X-Originating-IP: [2620:10d:c090:400::5:a280] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8c30a4d-6526-4cc6-35d6-08d7ccfd52f6 X-MS-TrafficTypeDiagnostic: MW3PR15MB3818: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-Forefront-PRVS: 03484C0ABF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(39860400002)(136003)(376002)(346002)(396003)(199004)(81166006)(8936002)(81156014)(53546011)(6506007)(2906002)(31686004)(7416002)(36756003)(4744005)(110136005)(4326008)(54906003)(8676002)(52116002)(86362001)(2616005)(316002)(6486002)(186003)(16526019)(5660300002)(6666004)(31696002)(66556008)(66476007)(6512007)(478600001)(66946007);DIR:OUT;SFP:1102;SCL:1;SRVR:MW3PR15MB3818;H:MW3PR15MB3883.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b8t+nlORG12gaTWKEihzgwvkBstUp5jSBl/sXHwb9dYIEULw0y8/f2YlM5FpHWvBYJzaY8kvEhioLjPiicRAwYvRiRvUlLwvLV0+3xfSmEItRMilrzFQXqWQTbFIlc2Kc+DaqERu0Gm+XCgoG0iYnN3S9sUlkkyZ0KOGVxJ46BBxochF7Y+51LLVmzzS/WfUP86xHDJSRYI+ZWqOgQXCRMXi6Ms5Od8i6Qi17kY7ytdqKG2Jn+2/CiU0FBpsoif6zYfvo/u3rPzgPieXkOXlUKkK/g+JhFe8/H5V4e9j13LwT23DeedpOWod3x9Owb9t4r8bB6vDmpNAcz/Y9b7BucUwYMUW+DAr6p9lqmrtShRCsk/AqC6iWf8+EvERrdl0HvZmRN4yICTSPZmkQPPSGPdC+FJrxcvVfmAK+hU/M7jQsxTLWv0CFOUDtU3Ylene X-MS-Exchange-AntiSpam-MessageData: KWDyn2sThXDVsU5n6qEoqbmdqn/mjjd4gRUIvv5JQ2zPpoD419VIkqFpcy7RxOAULTuB9lwqPU7qXQMsmSSIyXPyMpWw8eKydZRTKI9RktcWMBb5rL+OiQgvRg9bZoihD62xjl+XlLmYXZiWfvTOPi99ZzrtND94gopggqWOemxwCbQftdn5o5un0UWzN4di X-MS-Exchange-CrossTenant-Network-Message-Id: f8c30a4d-6526-4cc6-35d6-08d7ccfd52f6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2020 18:34:28.8596 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vYVLiaemsp9qmPHAgNidEZOubqBsQ94tf7Lba/Yhz4u+EdgQUdCvxRpeC9lx+ntC X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR15MB3818 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-20_06:2020-03-20,2020-03-20 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 impostorscore=0 adultscore=0 mlxlogscore=685 clxscore=1015 mlxscore=0 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003200074 X-FB-Internal: deliver Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/20/20 9:22 AM, Greg Kroah-Hartman wrote: > Trying to initialize a structure with "= {};" will not always clean out > all padding locations in a structure. So be explicit and call memset to > initialize everything for a number of bpf information structures that > are then copied from userspace, sometimes from smaller memory locations > than the size of the structure. > > Reported-by: Daniel Borkmann Signed-off-by: Greg Kroah-Hartman Acked-by: Yonghong Song