Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp674936rdb; Tue, 23 Jan 2024 11:06:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzbmEEZ6E5r0xpRUHYLX7MnsXhArQWXOk9cmQfDm0Y9qsuNvCFzW8rqd5iTpdNpxkaJAcj X-Received: by 2002:ad4:5dc8:0:b0:685:aef6:fb15 with SMTP id m8-20020ad45dc8000000b00685aef6fb15mr1810145qvh.81.1706036764673; Tue, 23 Jan 2024 11:06:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706036764; cv=pass; d=google.com; s=arc-20160816; b=hNNrPKUugwxfmVa/qS8uw6yXHxlPiC3rjdqQeRB4Yq+RwdazbSSh7PrA0DKpwvKsV6 JOta60TCcM9X9Tzzk/n0sUNEwvJM3bwUDJSAatNrLpC0w5tFqz3vkxASSnMVSI2gdHy9 3TJr0pAquRjKPjzK20hHIxVO3AE9rMht9cN/HjPaGv+N0uIdUS40kqqgUBc9myGXUhL8 rxzsxweDaeIDCB24UjYrq4TIULBeoiA5/HKuFJeqGvRNpCURPKl+FxkHaRwXqGBPOP87 bRDJewbrhSCElEpIzO69l/Bv6Do0Ub6cVWeg6pQ6FnhZ3fF/NszUqQBTKm1E3LSFVHTL ZxrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/9FKmxWiB2vAaSsWA6W2r8jqoqGItDODorFRWTWYx3M=; fh=YGJYnNtbelHL84QKQDc1SxyCtwX3s2QlkGLBtNhaeTA=; b=Tcclwb38Dzsw1j5pnuUvutA/gGiEKmY3AT9xp8Xmb5ti4J3G8A6oJEFuNDzBm5BOyl Xau4VesWHNEAZRwKz7eQYovEna9jhOllYjNzxTCTrGs2FEmEV6qg+dprGNw1rOYtIbpr Tij8PER5pnJPCPlcoS0WenZ+a6M94bv800j6TmiPluP2kjUFuRu2iWMOlX4+8MpBH8jf gOyCe6YbQKi7Wk+/r0Mi21C6yHSC1mdn1vFU7kkbp0NH1Yl8V9ALq7Y277Vy27yt8p6O mOaOe8lyXx9YGnvyM+RjKbSOwRfy64cKHgyq//pOdaobJddX3l99bKA090x9f0gHhDFE nlqQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GIoAAIw0; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-35949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u17-20020a0cea51000000b0068567a251b7si8621128qvp.42.2024.01.23.11.06.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 11:06:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GIoAAIw0; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-35949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 F1E4C1C2311D for ; Tue, 23 Jan 2024 19:05:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5FC51292E8; Tue, 23 Jan 2024 19:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GIoAAIw0" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B0D7128396 for ; Tue, 23 Jan 2024 19:00:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706036427; cv=none; b=TiTO6M+g2zuK/2drOQQnJv2aRB9QD7cwpC3zt6k0+rH+GHrEMFY7BsshD28YixXM0aNOG5JetIaZOEa65bL9nK5TL/CL4+/yCvPdF3pfTZ8sCFe1gR5L5vEl24wAQEu7itDwVp4hnDYtOS29Aa4Okz6XpLUWQyhfv7xZI8wLbiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706036427; c=relaxed/simple; bh=QA2id3LqrmzYn8QBWvElp2X+uoIvf8x5U798DnB4uyg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QVURW+6ZPQZu7ldDv0AMma+pKEB0+VrkzXLZ4Fjk+ef6qAcrBPmaQhqNNwHcUXYkOTEvzv4i7o++d9IT2mabvgR1GMbLC5u95l6vZXgBfJ4FDhgpYOOEs2PwlPBil2+gg/cB+aEX+XEcANNXEjeePDZW2iKn6iZyVNsNIZaalg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=GIoAAIw0; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d70a98c189so26954525ad.1 for ; Tue, 23 Jan 2024 11:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706036413; x=1706641213; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/9FKmxWiB2vAaSsWA6W2r8jqoqGItDODorFRWTWYx3M=; b=GIoAAIw05UWSdUYUcUatVeO4/MxIT2iTCSbCVHD6OubrG91JqJiPuDMggzxlFyy4qx bd7vuTTEBRrsyydNn+Xe36GcZlHdHVS2MpRb1u5BDGgMakhyd/3eK54yQ8K6luDW3wXl JB3GS7XcXCt2r3IP/O5Rz4esZlvgk0YoNrHcg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706036413; x=1706641213; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/9FKmxWiB2vAaSsWA6W2r8jqoqGItDODorFRWTWYx3M=; b=gEoMLZ/HRsvfO4rEEyPiNTeBS9yKA6VCtrpE1UxvzwacceuBzimhWvpHUo3c/oV6Sy itpP7HZV4jDbUK7JU9pRuloANQ2IXJ/DmFS+BuvxVo7V9r0b3CLyQaHQGXpKOb26d3du 8TFUzYxCNIOoVfqS/cioqDZrAMpebVIUae+EzpAyXL5Hpnahp+UyxUbw67NcZCR03iZa Wrlp5vUj3uGtQI/yiWFCEluWHSdn7Rx1RIlIdrr1RnwULPuvraKzeyHFaakJegtBlQiQ 53T17DcM07koasfUrKGad9VgaPqT4cZPI/KQJhYT+kOQC7jyFaAObmkVpoSIZO7oMhc6 58jA== X-Gm-Message-State: AOJu0YypefzdJo/EHwGv96UgWPip0J2oWu0K0kfI+XIxOw8R9S7qrzBG Dxad8JSVYvCyF86BB5pxfmUfz7+oVoCx8bNWreaH0J5oLGhKznA/9KBOW9AG2g== X-Received: by 2002:a17:902:ea0a:b0:1d7:2bd6:23e3 with SMTP id s10-20020a170902ea0a00b001d72bd623e3mr4394412plg.5.1706036413360; Tue, 23 Jan 2024 11:00:13 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id mp11-20020a170902fd0b00b001d75ea44323sm2836158plb.21.2024.01.23.11.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 11:00:13 -0800 (PST) Date: Tue, 23 Jan 2024 11:00:12 -0800 From: Kees Cook To: Linus Torvalds Cc: linux-hardening@vger.kernel.org, Andrew Morton , "Liam R. Howlett" , Mark Brown , Mike Kravetz , Vasily Averin , Alexander Mikhalitsyn , "Gustavo A. R. Silva" , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org Subject: Re: [PATCH 34/82] ipc: Refactor intentional wrap-around calculation Message-ID: <202401231058.5C5248DC3@keescook> References: <20240122235208.work.748-kees@kernel.org> <20240123002814.1396804-34-keescook@chromium.org> <202401221713.3FCABC9290@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 23, 2024 at 10:06:12AM -0800, Linus Torvalds wrote: > So: > > - get rid of that commit message that is lying garbage > > - fix the so-called "sanitizer". > > - stop calling the unsigned wrap-around a "sanitizer" and talking > about "undefined behavior" in the same sentence, since it's neither. > > Do you really not see why I think that thing is actively *WRONG*? Yes -- I was trying to head off the confusion about what the larger goal is (trapping unexpected wrap-around) so that people don't assume I'm talking about Undefined Behavior (we don't have any UB arithmetic in the kernel, very intentionally). I did not succeed! I'll rewrite it all. -- Kees Cook