Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp106149lqo; Thu, 9 May 2024 14:10:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVlHgTIIHaCLNJvdu28x8NCOgqCJhomabX2PSijNVVJyoArOQ/hECw7NnbIFSPXkp7HjXxNrwBHJgjWj8QJlNh6HYCkdzcxuNOPRriow== X-Google-Smtp-Source: AGHT+IEfMp/kt0Q/v4GOcMURUHwkHoaTLmN6Q1eheIYcM+EVJhiXas6vSBth2v+o/FgOJbDhwEsp X-Received: by 2002:a17:903:289:b0:1e6:114c:2e54 with SMTP id d9443c01a7336-1ef44050ea8mr10251635ad.69.1715289058715; Thu, 09 May 2024 14:10:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715289058; cv=pass; d=google.com; s=arc-20160816; b=yWN5NcbBiO8IibuW9DGb5rk5VnyNoCS0TA5QKHFrKMJRGrELJAH/MYyD0tP8lMTAmT YHpE9RR3We+gKZKp+rOTnCcG4ur2Wy/vqwYexE2p9pHuBlKd73ueKV7qthqloEPnyGlD u1qbTD+BZ1ODv4Tf3+7PVqGq3VW52/73phh1bpqiA+frpDCpC4Unk+/P3aBprva9nT9O CClTML1Eq1oH2YehxwyJQbG2Vu3qjgFzqsqK73115jyefAOKiRdIN4Nlzkg8z+Z6+Viu eEwz1MImf9Yd7++mU0Zgp2vU4a4oNLbiHgtJkWsncdt8I/K3sTyvzJtJ8Li9LLFlLx0U tYnw== 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=goPKHQtoFbBJPMAI4x6He30hxH7vdSTb8jLbZxEZRIs=; fh=vLH/ZXWTBP9dmRYB8NX9Ubvmz7OhjZlP3F/wnqQqrlg=; b=FuuivVPZ9btB/1nrff8EYp0BJwUNS6JySpjhZhZSKqCFH4YEKnbje8vO4c6SXA1FKN Nfp2fohwBRPwTwa9ElaCNotwriqyAogjoIFDf3RayVqu0k3HKooRDO5O0bsFprGU3AxQ ImdxdMcclTZIaV6EixZa563If+Ta3YPklRiY4gOR5LT+zCrCsNB5yP6ViCQQ0edWLHz0 gsZ+I9tnI7HDySmZ6tmpFKHPLAcm0oNNx+fxFyrICHDBTajAAubVsEsY9HT9XJS/ARJK GS3Qi+tYVoILVLlnmNbC66hqAmh5dSsZuvKoZ8D/e4KRpluXbFo1OklsIT0+/AQ1KzNQ UvcQ==; 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-174964-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174964-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 d9443c01a7336-1ef0bad792esi20883045ad.190.2024.05.09.14.10.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174964-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-174964-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174964-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 AB9C9B2180C for ; Thu, 9 May 2024 21:07:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3DBF84E0D; Thu, 9 May 2024 21:07:33 +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 A2F0083A0A for ; Thu, 9 May 2024 21:07:31 +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=1715288853; cv=none; b=OAJFnK/BwBKrgemnpdMmcT4lUGoewCXVNFNl06qy5sidm+lGyLAnAgEMChome6ortYvlDnlNqKZw1d6HdtZGchJRwZy8H+3GM0ZRQZTavQkKIR3Bx0Gv2VRD3T/GhUzmiGEe6AmmSUv4EFgwCOQYxkAhG8aHYJT8329ux7HhIwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715288853; c=relaxed/simple; bh=goPKHQtoFbBJPMAI4x6He30hxH7vdSTb8jLbZxEZRIs=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=MGB2WcmPN7+qZy6Bg2FqBYPkE83VtqHIkomUjiW2Ogd+m19Xr2U84Z20EdGzVlnoDVcKrXiKN4xDqZf/U554Gl/zCuBPrAes6vYfXzikGCLeSc7YNgP/+OWMM2pgNC5SHapleMh2aZsWQ6Bs9BeZVyconeyhKpxy8GIK/UT/itI= 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-174-MlsT2Si9P0yTWZ8FtgmvYw-1; Thu, 09 May 2024 22:07:23 +0100 X-MC-Unique: MlsT2Si9P0yTWZ8FtgmvYw-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; Thu, 9 May 2024 22:06:54 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Thu, 9 May 2024 22:06:54 +0100 From: David Laight To: 'Linus Torvalds' , Theodore Ts'o CC: Kees Cook , Justin Stitt , Peter Zijlstra , Mark Rutland , "linux-hardening@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "llvm@lists.linux.dev" Subject: RE: [RFC] Mitigating unexpected arithmetic overflow Thread-Topic: [RFC] Mitigating unexpected arithmetic overflow Thread-Index: AQHaoibwK91jQ1nmYEmzGISNIfAGlrGPY2nw Date: Thu, 9 May 2024 21:06:54 +0000 Message-ID: <5b37e8b1da534ebb8abc9b7b0f7022d2@AcuMS.aculab.com> References: <202404291502.612E0A10@keescook> <202405081144.D5FCC44A@keescook> <202405081354.B0A8194B3C@keescook> <202405081949.0565810E46@keescook> <20240509140854.GF3620298@mit.edu> 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 Li4uDQo+IEdvaW5nIHRoZSBvdGhlciB3YXkgaXMgc2ltaWxhcjoNCj4gDQo+ICAgICAgICAgYWxs X2JpdHMgPSBsb3dfYml0cyArICgodTY0KSBoaWdoX2JpdHMgPDwgMTYpIDw8IDE2KTsNCj4gDQo+ IGFuZCBhZ2FpbiwgdGhlIGNvbXBpbGVyIHdpbGwgcmVjb2duaXplIHRoaXMgaWRpb20gYW5kIGRv IHRoZSByaWdodA0KPiB0aGluZyAoYW5kIGlmICdhbGxfYml0cycgaXMgb25seSAzMi1iaXQsIHRo ZSBjb21waWxlciB3aWxsIG9wdGltaXplDQo+IHRoZSBoaWdoIGJpdCBub2lzZSBhd2F5KS4NCg0K T24gYSAzMmJpdCBzeXN0ZW0gdGhlIGNvbXBpbGVyIG1pZ2h0IG5vdCBkbyB0aGUgZXhwZWN0ZWQg dGhpbmcuDQoNCkkgaGFkIHRlcnJpYmxlIHRyb3VibGUgd2l0aCB0aGUgMzJiaXQgZGl2X3U2NF91 MzIoKSBjb2RlIEkgd2FzDQpwbGF5aW5nIHdpdGggZ2V0dGluZyB0aGUgY29tcGlsZXIgdG8gZG8g J3NvbWV0aGluZyBzZW5zaWJsZScgZm9yDQp0aGF0Lg0KSSBqdXN0IGNvdWxkbid0IGdldCBpdCB0 byBzdG9wIGdlbmVyYXRpbmcgdHdvIDY0Yml0IHZhbHVlcw0KKGluIHR3byByZWdpc3RlciBwYWly cykgYW5kIHRoZW4gb3JpbmcgdGhlbSB0b2dldGhlci4NCkkgZGlkbid0IHRyeSB1c2luZyBhIHVu aW9uIC0gdGhhdCBtaWdodCB3b3JrLg0KT24geDY0IHRoZSBhc20gIkEiIChlZHg6ZWF4KSBhbmQg ImEiIGFuZCAiZCIgY29uc3RyYWludHMgd2lsbCBEVFJUDQpidXQgZm9yY2UgdGhlIHZhbHVlcyBp bnRvIGVkeDplYXggd2hpY2ggaXMgb2sgaWYgeW91IGFyZSBkb2luZyBkaXZpZGVzLg0KDQoJRGF2 aWQNCg0KLQ0KUmVnaXN0ZXJlZCBBZGRyZXNzIExha2VzaWRlLCBCcmFtbGV5IFJvYWQsIE1vdW50 IEZhcm0sIE1pbHRvbiBLZXluZXMsIE1LMSAxUFQsIFVLDQpSZWdpc3RyYXRpb24gTm86IDEzOTcz ODYgKFdhbGVzKQ0K