Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2357488lqp; Sun, 24 Mar 2024 15:30:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbnEMFL6d0e8ySKTauL+JNK4Lrsp9h1unPWxsD1lYdcucHkr55uFgXiCpY4bLww9y53H19m39fc1/UNT91sFH9+rtwLpCYXgwbqvPVZA== X-Google-Smtp-Source: AGHT+IHOOd6hYaoO92gOq4otvVn/M42HGxGBoszlBrojPURI8yo6W8rKSjn2MPthNVI2axCH5Qbm X-Received: by 2002:a9d:7d17:0:b0:6e6:ba9d:f85f with SMTP id v23-20020a9d7d17000000b006e6ba9df85fmr6394676otn.28.1711319433325; Sun, 24 Mar 2024 15:30:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711319433; cv=pass; d=google.com; s=arc-20160816; b=RzzteuwimmwPNHXmBlNiz4A+PPmGtLBthBNBVinRXwzMWGRFxi7N1swQMGKkkVVRxi KfJ4w/AFcoydxRB1kaVUxYJXP6wKAEdNNV0J0rhFLbKK9TW+zTMUutEN4LxwQA3RkJqr N3zYNt9B69eORwS/zwgETvB5tGewiN/9HCzGo881SWJSgZ6C+njuf/tOSIZjFmkQ+WYo PCvPdPdpdFdxwMELpSC2/A0wnaDRXx3l4utKRUsJa4wpr0FUDFU4dymmjo0zj3Dahz+2 EGqN35oYcVgWYUBE8fB5hQy8eSTmzAyMwxCdwnqP2laLf9Jsz7KygfX9uzMacvq3xQj2 ZOCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=XN/b84E1fN88I7UISctQ3MOJIhEnzz6w5cJNphmYJYc=; fh=GPJ2dXP+z1NyX2EC3l6CqNfsf4SBkWaeB7yAtE3mXVM=; b=FMiZscL93SBvk6VUJpi8Sy6qgV/jhfMmXgEi5fdGZnmoFTaapBTAQCti+ZAKAkfjRF f8dXjMozse2riqvw+GpoZ5RrSFqkX5khV6oDJPc38rlQNTmyr4CFlMLXCjUFDyWTCb4M u37Zp/0okomD5qA3IAU9lXNYoRhoOiTVXzAPqpTlv8glaVScUHJpq7Xk72488buqwyqx ijjWkNv8xQz3j4Ogdhvt7kMW7TpTElTK8DBJDUgsp++M12iZGu26yb6XZlp2vcR/xIAL 1jUiz3tONtMh5Vcbi2vfAviVYqMbbjlkdMyR+rkksxc8s4fqwXpItOzODUKKQdvJ3gqD qytw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-112879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ke20-20020a056214301400b00690c81e3728si6548334qvb.423.2024.03.24.15.30.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 15:30:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-112879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0BA641C210F5 for ; Sun, 24 Mar 2024 22:30:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F21D3F8D4; Sun, 24 Mar 2024 22:30:25 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3A0933F7 for ; Sun, 24 Mar 2024 22:30:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319424; cv=none; b=N+W31PWcHWfJp5/maWqKtkUjp1Eb7G4jzrKi2kJ9CYjUxf2I3WwP6rYVHLs83AkRj1kjU582Zvbok0+We6FKjsLNh8zWoOCrfLiE5YCPpZe1SOkcNeY3+NWkCgVkfuTT9oNNrJsFLREJKX3nzmsXtZ9AIFA4s7jXaM4NHsS4yuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319424; c=relaxed/simple; bh=XN/b84E1fN88I7UISctQ3MOJIhEnzz6w5cJNphmYJYc=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=UBbizTXyAr5y5Wj65SsFqU8FJIU05JUqWvRBNL0gzbdE7hpcLCuFqI2+RG6TSQdvYJWFl1le1THFeNt28CNY8Ar8vF/mqUYm2bMDkNUB5Z7grtpcqp5nxed67Zv1pts9504yT3lclxPsvNFr8YPu7wzM5y2qlOlYJBq+xp8tes0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-26-FBwm8NwCNmyzjd2yhbJJSw-1; Sun, 24 Mar 2024 22:30:18 +0000 X-MC-Unique: FBwm8NwCNmyzjd2yhbJJSw-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 24 Mar 2024 22:29:47 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sun, 24 Mar 2024 22:29:47 +0000 From: David Laight To: 'Alexei Starovoitov' CC: Puranjay Mohan , Ilya Leoshkevich , "David S. Miller" , David Ahern , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , "H. Peter Anvin" , "Jean-Philippe Brucker" , Network Development , bpf , LKML Subject: RE: [PATCH bpf] bpf: verifier: prevent userspace memory access Thread-Topic: [PATCH bpf] bpf: verifier: prevent userspace memory access Thread-Index: AQHae1YhECDY/uuUVEW0JBnf8hxKG7FHVPhwgAAMGgCAABvX8A== Date: Sun, 24 Mar 2024 22:29:47 +0000 Message-ID: References: <20240320105436.4781-1-puranjay12@gmail.com> <1686adb401b34adaa3b703ec1a8ffe49@AcuMS.aculab.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 RnJvbTogQWxleGVpIFN0YXJvdm9pdG92DQo+IFNlbnQ6IDI0IE1hcmNoIDIwMjQgMjA6NDMNCj4g DQo+IE9uIFN1biwgTWFyIDI0LCAyMDI0IGF0IDE6MDXigK9QTSBEYXZpZCBMYWlnaHQgPERhdmlk LkxhaWdodEBhY3VsYWIuY29tPiB3cm90ZToNCj4gPg0KPiA+IEZyb206IEFsZXhlaSBTdGFyb3Zv aXRvdg0KPiA+ID4gU2VudDogMjEgTWFyY2ggMjAyNCAwNjowOA0KPiA+ID4NCj4gPiA+IE9uIFdl ZCwgTWFyIDIwLCAyMDI0IGF0IDM6NTXigK9BTSBQdXJhbmpheSBNb2hhbiA8cHVyYW5qYXkxMkBn bWFpbC5jb20+IHdyb3RlOg0KPiA+ID4gPg0KPiA+ID4gPiBUaGUgSklUcyBuZWVkIHRvIGltcGxl bWVudCBicGZfYXJjaF91YWRkcmVzc19saW1pdCgpIHRvIGRlZmluZSB3aGVyZQ0KPiA+ID4gPiB0 aGUgdXNlcnNwYWNlIGFkZHJlc3NlcyBlbmQgZm9yIHRoYXQgYXJjaGl0ZWN0dXJlIG9yIFRBU0tf U0laRSBpcyB0YWtlbg0KPiA+ID4gPiBhcyBkZWZhdWx0Lg0KPiA+ID4gPg0KPiA+ID4gPiBUaGUg aW1wbGVtZW50YXRpb24gaXMgYXMgZm9sbG93czoNCj4gPiA+ID4NCj4gPiA+ID4gUkVHX0FYID0g IFNSQ19SRUcNCj4gPiA+ID4gaWYob2Zmc2V0KQ0KPiA+ID4gPiAgICAgICAgIFJFR19BWCArPSBv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