Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp892700lqh; Sun, 5 May 2024 06:39:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUK4IxFRajtJfdcmtJdCDo/jR5Kaxp3O8wlev3XkktZfNOmZfVzR6QTk2knkX9Ys5BNuetCXsxhZwl/NiI5lxs+qoUIJoSLSETPt2SI1Q== X-Google-Smtp-Source: AGHT+IHG1yBzP7O5EWtTIH49JfcSl22TG2Q2NhBGCszgF9kwhh9Pm+e5NrqNf2DwfExUcVOo0UwF X-Received: by 2002:a05:6a20:9155:b0:1a9:c80a:c152 with SMTP id x21-20020a056a20915500b001a9c80ac152mr8050288pzc.21.1714916380934; Sun, 05 May 2024 06:39:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714916380; cv=pass; d=google.com; s=arc-20160816; b=eL3pttBEKM9Dtngj9RBfTJ56gkEilzjJAwtQLyKJCXgfLfWODWtknttanTqO0VpvpF XTg6Jrsn37cVRlAoBwpOiylpNjeI9hAFGOJ4B7Yf49pX4hmrV7fF5nl4va9XHjGBBPWU DRRTR9jQhIeYO7HXKcNDCvdyiAKx7KJywK614fl6502DBZFJg3dEsWc3+kECH/hfeFG0 5ZjXa07TaifObZKsKWveHs/n0k9pI27mBASP0HwNFQgIXcMxlMi5D2WiKN6cLPo+kJ40 DsuZiQTaOYswaGg/CCpwL3EQe2PXFZIjf/DW4ghFvqDgnghJgftkv//V1gTi+fLNsEmi J4BA== 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=MGNVhHHDkYMXHSgTk7UxWt8BeGW9WOX4CbqGNRY3E0k=; fh=c/ihBcYGTesmdLM9GS//GTMuE0or853ybgh/sHC0Tb0=; b=v1AFsQJo3K0oZWkzWdk5FdlHBLCW1VvQwmPTPEs2rPh1Zbz0yEmju3NWlHxFaUP6BY sykzAhfj1xd3SPlRn0BKb5Je4ETAchePdyd9zRsIAigwNyzxnRpKDZvtll58f3mxNwSp vm3Cb3tyXJOvT75X5cP0ZHOvOtX5iUbzapia1dcosJzhRTXIZ5tNrBKOa4mJ00Xz1C15 MRn5pFtybhctI+/DB/1AUBpGBWMrN1Ss3g+P/OjjuNMGrfQGC57erp/Y6DP8gMD9wWJi YcuSlz/1GWM24BUE138OPe/gX/lIqx3otU3YyPTNazLqIUPt71gxbkQGbI19JBx0qNNw jZdQ==; 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-168983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cc11-20020a17090af10b00b002b439ecfbb8si4852823pjb.71.2024.05.05.06.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 06:39:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-168983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168983-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 39E3AB21385 for ; Sun, 5 May 2024 13:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97AE51E869; Sun, 5 May 2024 13:39:27 +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 7BD801BC5C for ; Sun, 5 May 2024 13:39:25 +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=1714916367; cv=none; b=nytIR/tDgJHTE4hMKiUo/KDBd/xUpYo+8Rj1aqFY/duBxZoxJEvkWkHa9ZzympjWoGjNAXF7UeKEw3sDhnXYYQx7E4JjQJXVeVekk2BUWBTwp6KvCN6GVtLKNy84uECNSgUXAkRCB9W/g6qLO8O0+YCTKHH5Q7UPgXGyNP/hnqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714916367; c=relaxed/simple; bh=MGNVhHHDkYMXHSgTk7UxWt8BeGW9WOX4CbqGNRY3E0k=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=oM/1bVdcJjmWokMACzanwusYvOxzQTiS5ZiYoREj/zDWf1oOhAOu35UejRPN5kynFnLCR1PJ5KceWmxBEHv37eQq9oZ10z4WP0iSXqw52t/TgWPkiIN5plePoHdFxPzWQVJ2YLuuG90IEl3IP4SpEJfBdI3MgV6jmshvuu+BY10= 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-124-vwaktAuzPpq_9ysQnuYoWQ-1; Sun, 05 May 2024 14:39:22 +0100 X-MC-Unique: vwaktAuzPpq_9ysQnuYoWQ-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, 5 May 2024 14:38:48 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sun, 5 May 2024 14:38:48 +0100 From: David Laight To: 'Kees Cook' , Andy Shevchenko CC: Hsin-Yu.Chen , "andy@kernel.org" , "akpm@linux-foundation.org" , "linux-hardening@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 2/2] string: improve strlen performance Thread-Topic: [PATCH 2/2] string: improve strlen performance Thread-Index: AQHanKLZPFuACoaESk2KpN/2ErXiirGIqNYw Date: Sun, 5 May 2024 13:38:48 +0000 Message-ID: <7c1565516531425c8f7cf5ffd5582741@AcuMS.aculab.com> References: <20240502141359.89567-1-harry021633@gmail.com> <202405020809.C8973634BF@keescook> In-Reply-To: <202405020809.C8973634BF@keescook> 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 RnJvbTogS2VlcyBDb29rDQo+IFNlbnQ6IDAyIE1heSAyMDI0IDE2OjExDQo+IA0KPiBPbiBUaHUs IE1heSAwMiwgMjAyNCBhdCAwNjowMzowNFBNICswMzAwLCBBbmR5IFNoZXZjaGVua28gd3JvdGU6 DQo+ID4gT24gVGh1LCBNYXkgMiwgMjAyNCBhdCA1OjU54oCvUE0gQW5keSBTaGV2Y2hlbmtvDQo+ ID4gPGFuZHkuc2hldmNoZW5rb0BnbWFpbC5jb20+IHdyb3RlOg0KPiA+ID4gT24gVGh1LCBNYXkg MiwgMjAyNCBhdCA1OjE04oCvUE0gSHNpbi1ZdS5DaGVuIDxoYXJyeTAyMTYzM0BnbWFpbC5jb20+ IHdyb3RlOg0KPiA+DQo+ID4gQW5kIG9uIHRvcCBvZiB0aGF0LCBjaGVjayB3aGF0IHRoaXMgY29k ZSB3aWxsIGRvIG9uIHRoZSBhcmNoaXRlY3R1cmVzDQo+ID4gdGhhdCBkbyBub3Qgc3VwcG9ydCB1 bmFsaWduZWQgYWNjZXNzLiBJZiBldmVyeXRoaW5nIGlzIGZpbmUsIG1lbnRpb24NCj4gPiB0aGlz IGluIHRoZSBjb21taXQgbWVzc2FnZS4gQnR3LCB5b3VyIGNvbW1pdCBtZXNzYWdlIG5lZWRzDQo+ ID4gZWxhYm9yYXRpb24sIGUuZy4sIHBvaW50aW5nIHRvIHRoZSB0ZXN0IGNhc2UgKHdoaWNoIGlz IGFic2VudCBpbiB0aGlzDQo+ID4gcGF0Y2gsIEkgYXNzdW1lIGl0J3MgYWxyZWFkeSBpbiB0aGUg a2VybmVsPykgYW5kIHN0ZXAtYnktc3RlcA0KPiA+IGluc3RydWN0aW9ucyBvbiBob3cgeW91IGdv dCB0aGUgbWVudGlvbmVkIHJlc3VsdHMgd2l0aCBkZXRha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