From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D94EC3DA49 for ; Fri, 26 Jul 2024 13:27:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A6E426B0085; Fri, 26 Jul 2024 09:27:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1E5A6B009A; Fri, 26 Jul 2024 09:27:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8700B6B009C; Fri, 26 Jul 2024 09:27:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 61CB86B0085 for ; Fri, 26 Jul 2024 09:27:31 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D239516186E for ; Fri, 26 Jul 2024 13:27:30 +0000 (UTC) X-FDA: 82381980660.22.83F0419 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf07.hostedemail.com (Postfix) with ESMTP id 7DB544001C for ; Fri, 26 Jul 2024 13:27:27 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=V1LcRTqk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=fIk+oX9n; spf=pass (imf07.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722000445; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BK5NFgv0M2zzW/9PchXAI3ONYvtgMpMkZJxqvXnSZX0=; b=ATzNz869eEI6O0zZHmrIWvwRAzuALZSzI3yfyPIPWv+UlEJQqYpMiyxg3cqrWSf2+XpEWL hwNt+UXuyW2+1wGMwnJkXAwcv8ksBT1J6WsVpGG+EDRENjW9altY2eLFGkV4goXrsza5bw 2bro1Xvpy8wEYpq609GtIPzDje4yHO4= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=V1LcRTqk; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=fIk+oX9n; spf=pass (imf07.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1722000445; a=rsa-sha256; cv=pass; b=Y6wt4b9dxZ2bGrhG9znuRKAU2W83uqBhYM2MNvSrSB6IqFS3XPhxmAjbgbpLJF2mEYTpyT MPH7lgzVvM838R77n1dsKjE4SVnm252MuIXU/EJAcE2V2qL5+5z5Q73vabl2B9vgbd0N9O 1SOUo/IiCAd42Bj8btIa4BQhnVb/lJc= Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46Q8tZHi022703; Fri, 26 Jul 2024 13:27:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= date:from:to:cc:subject:message-id:references:content-type :in-reply-to:mime-version; s=corp-2023-11-20; bh=BK5NFgv0M2zzW/9 PchXAI3ONYvtgMpMkZJxqvXnSZX0=; b=V1LcRTqks6yFytYQ16vocD2kczjcF64 3r393uVVOeAgtT9WS43Qr6wjQA4qb8Psh5WW1IX9fxkzcf2+VItadiIceVnROri/ bz4ai8LpwSLreKaVnj1QMQAaNbzfM2LlB0z3pOgaUu/v4PZgZePL4HNzELSDnE3e 7R+1DTeDatUSrEaA2oIaHPk4yPu6RabHFCA8vNqqK15C9ZIOJSYHKaKOwqRqhPWx GIHHCccnMkExVpKQpZySH5JS0zQRdUT7Zqok40+qrB/E9VGEephJySxGk8ITUTOK cPXbRFDJBfTOpdzKuVQsGz1Z+sWoMtn4jvKinY00/EPOXzfRSFkpDNw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40hgcrnke9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jul 2024 13:27:16 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46QBiJ1w022107; Fri, 26 Jul 2024 13:27:15 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2047.outbound.protection.outlook.com [104.47.66.47]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 40h27s040n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jul 2024 13:27:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HUZVGsWbdPOKdyfC+slS5R798FCvpVqrEUPY5qGklfBnXJisnEGlQJ3XGTS5TvQ9cswaygy9Cub2bG7BXv98ga2VCxzs4zxIDO6269aCP5hmQhOfpRPOmbWspNyiaTlDRbR2gwtN8iPcw2uaRkg32by0PcDM1MoVFohHi5+MqtE0oKXkn+b6zfGXbakDr+CBZjpqclfbNmTS/I8T/qgfd2Si/mEbRBYNJ4jkrV/3eZSmsPoMMDK9MqusRaUmL9cDrZCywhyB3p0TQav5MkyYDCyEPmQuo3XDOqvl1/Eh4TgRetonBX3703d33fHu5m8jYYDQfh1wCNfgjYDKj6+F/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BK5NFgv0M2zzW/9PchXAI3ONYvtgMpMkZJxqvXnSZX0=; b=ZfeQ38kywqrCZWZO35553N0fDgkm901bTHKXel2G89hlfm+lWYJRTNTcG/EBjhuJF6CcIw/OT31L11hmx6txDYnbhLCgaWcStioyJo/JAQaExF1IkH+8awynPbA6SBOJq9OCMHaXgcreMWIJXYSau/1kXYrPmD2qaKb8fCJvFLkByhPEGiX3IZPgXs6fvUKugglqfDJxoBsgl0fTC91TdRK9nAE3+wshRj6QSOfsiX6SedhHdt0N5VXE5CQMjV9WNqNrx/09efOtPY7WX0hT/gm8QuJhTq/b7Ssm/XUqrWsQ2acQYj2Xl5MqASwGAC8EP+Qnbvr8mDrr5WFNeHgnPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BK5NFgv0M2zzW/9PchXAI3ONYvtgMpMkZJxqvXnSZX0=; b=fIk+oX9nVrM2qHNA6CjhydRq5oT7N5GePsQDatcfoP5e7J5gA8yxrcGh8wJneY5PMkluKQxC9y/v5rcn83Wnw+xo5WFp1HjxABbWexsFC+NTHPNDMyg38DuXYFgHKwa+QUu4qTzumSijWgfjEHi9Ct4VhTpG33EM8kirXmkW/og= Received: from SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) by IA0PR10MB6891.namprd10.prod.outlook.com (2603:10b6:208:431::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Fri, 26 Jul 2024 13:27:11 +0000 Received: from SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e]) by SJ0PR10MB5613.namprd10.prod.outlook.com ([fe80::4239:cf6f:9caa:940e%6]) with mapi id 15.20.7784.017; Fri, 26 Jul 2024 13:27:10 +0000 Date: Fri, 26 Jul 2024 14:27:06 +0100 From: Lorenzo Stoakes To: David Laight Cc: Linus Torvalds , Arnd Bergmann , "linux-kernel@vger.kernel.org" , Matthew Wilcox , Christoph Hellwig , Andrew Morton , Andy Shevchenko , Dan Carpenter , "Jason A . Donenfeld" , "pedro.falcato@gmail.com" , Mateusz Guzik , "linux-mm@kvack.org" Subject: Re: [PATCH 4/7] minmax: Simplify signedness check Message-ID: References: <23bdb6fc8d884ceebeb6e8b8653b8cfe@AcuMS.aculab.com> <03601661326c4efba4e618ead15fa0e2@AcuMS.aculab.com> <5a129d04e0b84b48ba6c5189a047ac8f@AcuMS.aculab.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P123CA0519.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::6) To SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR10MB5613:EE_|IA0PR10MB6891:EE_ X-MS-Office365-Filtering-Correlation-Id: b6526877-d1c4-42cc-6a8f-08dcad76a75d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?k1W49I+WrLq8WwG8OvIrhWXjYNHmPfw7pdjtLZg0bU4FAi/IS1YIibjcyDc5?= =?us-ascii?Q?AptQdpqaYQZ1xjzvZ00B8XXRaIoVtCpla4IeOJ66LDQcKWBFdz0qaLkI1+jx?= =?us-ascii?Q?Si5WrYd2MwKzq70TXrEligNp5Ox8Ea4UsmpuyKdiJBoryD7mzDsqVlizimFg?= =?us-ascii?Q?MOQ/eSzW1d8JeWVTPXSAvb53OPDqn4o1XUCFHZTKO5PUVJCD1tV1OwdBtK1y?= =?us-ascii?Q?4sQlWVfvpSXVuP6Zv9SZqYYgre5LTwwr+RIfsjaBciSiYv5OwhgOOEnKmwmP?= =?us-ascii?Q?FPylNWyi0hfQqYDPuGAi3e8hqO36+PPIUleQRv8QN7rqEtnEDSBvizI1MJQj?= =?us-ascii?Q?nTr+Z10dYO2oPYpCj6+HEkMTLSyvwf4ozkFmdM1Ynvy05Kos82cthzvV4H/F?= =?us-ascii?Q?26Q1dU2bU6AGxHVHJC3EKIyDb6XToBRYM17fm8n9q2xqruAk74J8pIo24P45?= =?us-ascii?Q?EdEpSP42O8KaqgbSt+iKcustDu63Y+UOwoFhmdJcmbG3hiTeAOkVdi2+lLGT?= =?us-ascii?Q?NrDqh8QwM/y+Z6GjsnHmXGk0PjJqrPayTg4xYAXu5vGiJzReKtw63h2UenIG?= =?us-ascii?Q?cs5g7Nn30aO2KXu/q1WsxcPJxpzQL4fZ2JJTLQa4fNWzDyr3fQeCgVoypW/x?= =?us-ascii?Q?QsUXy/yfuuL0/DfXmJ11WCMp0/rQSKL/wlf/R20/9Jcd8EIfqDTxZ5Xzgt/v?= =?us-ascii?Q?Yj6WM8sxt792+R+qzBGaztDbtbUqHJoL12KwKJYnLZ/b+C4CTD3zcUmBP0RF?= =?us-ascii?Q?Odg5Zpa9pFvKN2gYwotoXAZR63baGEG1IL2v/wVbShmlbrndKZsjCxpcF3ta?= =?us-ascii?Q?t30GMhl9TvSQF+QrVxHHItcam6Qymygu0b+RRCnIOaUXj+flOEYRub4Kxr4x?= =?us-ascii?Q?ZUFiN1cio6vfzndrWm5L3to6jLfZUr/ylDsUCFKIjOEvdK38dx3MK98JmpYy?= =?us-ascii?Q?DyMtiJuFJUnT6tMknyE0G/jnPYFOznHy031h7IFnjNZDJ21krqpq65xAAseS?= =?us-ascii?Q?K5aIXf9cDzDjfiOJQV3WPfwGl9Pb/nYxfjANVdt2CU+ZD0o8AsR+uSJYoBzo?= =?us-ascii?Q?DlsYGl7Elni2WCSLXASD6PqrSBkNAyttF5VE4Z9TvCmMbdE28uK5Q8pmVIqa?= =?us-ascii?Q?5qbBrBigHb0nhNbG0eNoAvmBlLF9VcbLrSH9FZGOTV+VRZ2A3mlu81NN2O+y?= =?us-ascii?Q?cZDtCbGdwB+Nu8unjQU0rogoSm83nsCuv6G016VACXN9ZvP8sdWRJYxrxHJv?= =?us-ascii?Q?yEj6sDMwBYKW8Pzk2iwfh/59BcRmvp9vAwgPj+PSUxpc8teNeljG2c1cuuB3?= =?us-ascii?Q?W/sXM6Ipk2kBpcosCbXc5mvMIb2DOQpx5tsWpszsuujKWw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB5613.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(1800799024)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?U6MXA9b53dPpqfFesGrOIo8oKmYCmkIaBv4WEfteaewCnqVZnABMYodaf60F?= =?us-ascii?Q?jgDLpQUucCS/hxyPaMZ31Jr26F6zyFg5czzWEu6SEYVcQvrYWS+U4vnDA9TN?= =?us-ascii?Q?GiLuZr86zXTghmGP0z0SxSBrT4H4lNeDMB1R5VkvQCiyOI1ajnw+YUG0JJF0?= =?us-ascii?Q?5z4WlAl/6d4qJrnT0LeKRXu2V+cAxpUPUBIw87bhW7PAp0NjUu+QmuqU98jj?= =?us-ascii?Q?1AS5ZPcl4AdksNkbAycxLZ5vhJ/I9w1Jsflh2YUkpQQhqNSK/jQHZqDWVwDn?= =?us-ascii?Q?7209DK6a3UuaViHSfA8i6bp4Qmvxbrldn2QrVr7BUyKt8vag13A7s8kepSDo?= =?us-ascii?Q?pyotEEEN1rAkUKXeKV/OIKL6EP2k/1M71MEccraF7pCfLi/q7VD0uK+T2HRu?= =?us-ascii?Q?BIZhSaDblAgjW3XVIIGBSzi9ZV5lf11FDUBa0NrbcOCWX4UcjCGtbs4+bIyj?= =?us-ascii?Q?MCkbxjgJCLzhNSE8o8W5wN3zWgdHgXLB7YkOcc7mnFlFK8oIbUl+ek2IzxuC?= =?us-ascii?Q?JujEhBQsQHDPwcJagABveyM4TXqQwtLgpUsMg8zuNZ8yLq3TemRTWNTAqAPk?= =?us-ascii?Q?fOGuz+llVwn2Cmu4+rPJNgCD5Y/L01m6Lb86SbHHZ/42nkHtzQG3v/35Vd0X?= =?us-ascii?Q?5AQTumtoJKvYnESSpcnlxpgO4iHkDF7z8SxoLMGNsbbDdci+TbPdedOh8A6E?= =?us-ascii?Q?z1JJNzoQc18pmb9D0i7d2K/mGVxQeTHvcRVFi0wH0SbS3nszhqmyvfzFUU0A?= =?us-ascii?Q?0TDCGajX58quZhJx2I2QIDt8/7swWYrkzGIwbjHq8pcQop3UHk7sIIWerCu2?= =?us-ascii?Q?j31k4NiFVdRwaNaxbpCtdBBH3joKPgeZVcdXkgPDroR25KNx3CE83UJE0veI?= =?us-ascii?Q?L//QAPPykPTPJ+7o0GI7hJZGscpXybAcAblnkOB6V0Y7AhkLsHnXZ/4KRHqg?= =?us-ascii?Q?VRFv2z0Pmx5h0NJqw1l6Om4Ua2hJDglpQh/bDUbx0AOBoc7B1xgqqs50GIin?= =?us-ascii?Q?MvgDuJqNcdOjMzjFLa1rudGpLVQXlSc/NQx/zpRVnwNMOibu8WH1W2N9Go41?= =?us-ascii?Q?+YsSR8eW2ORm9dkW5tL12KwYNVtZCWmzrSK1iQOtRTegAYYbdkPAPGzqYz/u?= =?us-ascii?Q?W4fRFcFaAm6r+NhY8l2iHreLWgxAlde5whLRObn06POw5ZWBij4bcHOkVLT8?= =?us-ascii?Q?p3s811wEECWh69Ol/Z3Ggd7LyzQ6aCl7hYsYDqh8OClhiRR0KPYzh+qKWueh?= =?us-ascii?Q?qwxoxHaLUd6C84VAuBuHbl9nmSdzNIDYL2UZookXAI4o7JKeav/QN8TQPOtK?= =?us-ascii?Q?zYFuUVrri3PLIH3GNnl4H3+/MTEVsOyqljW8hVIDJ9OucasOndNbHtJf1NDR?= =?us-ascii?Q?C6GN7YfXUNWe2QXHJS0/jiaVldTqo5+PsrQjVa/YLLcjooLfP8VMF+vz9bhY?= =?us-ascii?Q?rAZw6V02S/uwdbPP+cNxPv3+/EY+Vin5++BS78nFlGZdrAXC3J09ktZUglMt?= =?us-ascii?Q?w5nacRUvZZPxXi+l1tU+M08eY6KeNmdzpr4hCsXaHmCdQvRAIw81SC++0sGR?= =?us-ascii?Q?BQamBEkwXx8nzF/ex1xmLeTN/fxht7AlPcJ8Repv285u+Mu7l2kyT8R3xR6T?= =?us-ascii?Q?TI0VFySn8uK2OFp9AyCKcZ+I2apTYWs9WjKdpZUsGS+rGVqpBzie9dT0h0QZ?= =?us-ascii?Q?15Z7CA=3D=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: SB876xjmf0RZr+UDjSjgfzb1cO7SkhWHz2fwo2Oit6CB0XU7TDHB6qyN1gCDKE7K6m7oJbM0IC2rRyG3qWUqVipUaGVy4ckwF5hpuZ243vv5xNzxR7Juk4iRnq6aS0Kd/nPQi+idIaPan18SN6s5fPXIoEwvPZiWUJYinQHWwcwvZ+VfewFe4rrTXWgflVkPDcT68/Eo/96BZ08YQWs5x4SmICQdxql3RC8eMyYok50KerA2nGYZX6EQBaY4O36M+OKmVsxZz6KzCO4Qu4gJ/dYVXpQpH501lVK+oQCtGlps6YVpogkxD4jAdaypLr8iRdxDje822oMruJJ3dm3jhh63R2fu+UujANphQxlSF7lruTeU4aFjAqF5D2KJBlWqeSRIv21/hoB2IGzQd0D4Dy+8P085pFGxrRzZf6c7rLKU6vyVaOukBfCxdqiF7rpZtszZf0MKZyt1vMxJPl24HAcQ/I9R+1iGK6QV5D8gu7fsUku/wSAztsa0b7HiFcQtw+EGvLoVPm92jkAUOrLAmEzDRjXi+NY/t+zwj3slTOn7Mo+0HCdB9L4G+0UbeWdJQjH3EyFDrer10zjIwq4KnqRLge5ESHxWkmoJqQuDro8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6526877-d1c4-42cc-6a8f-08dcad76a75d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5613.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 13:27:10.7849 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uXz1hHV7apSm8txZVDLXf2p8suwuZxL7Mnz/gEHARV5vpVGiw5GfHiq6KLv7x9OA6bycQS1t7NgmZGPT67DkbUmZeJzVRYO5bjCOiYf6It0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB6891 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-26_11,2024-07-26_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407260091 X-Proofpoint-GUID: cYe1HN_Et_du5AUgSy5H6ypR_oXhtDNW X-Proofpoint-ORIG-GUID: cYe1HN_Et_du5AUgSy5H6ypR_oXhtDNW X-Rspam-User: X-Stat-Signature: 17ywthrgyhd7cmingigtfz45z4856zwg X-Rspamd-Queue-Id: 7DB544001C X-Rspamd-Server: rspam11 X-HE-Tag: 1722000447-355239 X-HE-Meta: U2FsdGVkX1/YoYqd2rb86gsj7GCSw29HMfWV2y3MZqiv0YPmxewCRl7BzARJgY5FXHTUkBYG++2lhhv1W72TB9+GBL4Xw1RC70Ow3MeQa1DYQ9C55ngIN9luppm61TSroH90oJPbjOfVpm+Mt2n5sNJArK5X5Zwwu1CxJnI8bOlhPNHx4vQ3wKIFknYS9vDju2uEBQt5iZ9h0lehsJ+pzCNH2pGdgF9Izqaw3AVmHVQJP1cfgYtLxlTsM2eB+9o4XlJ6dnYqL0tGuHahRG0uxMmFizkgzMGl8J2E62BFtIt7HNvNSLxl6eh0BQdVwgriW96g3ilUPWRh5MqsGtQX3goNSQP2RLJiy3rnJ7gBtfcTYxiTK9NXmHsbFO491fL7JvTJft9mPfyJTO12uEq2V6DmMWwOEMWd/wIVP6kB0Bgl64JEBSzfcS6AhwS14KRa4N/SBgdjt9j92viEhENFJ82XQJU03+CTbFmAKx8RvS/BLhvxBaSFshvqEpIeNxaJ0HQYDvMtT/oUCjw7o00Ic1jTEh/GV3lK9K3OTsGVFfPVQT5HNeDJ9JP9In/kwzc7e86clhvWrDcWD4DfAIqH8w9KYKsn3TDopXU6Gl9ifp2kiG0JqgXSMfvJ4srAh9+EV5EvrWUJav5A8d4odRhHnG0AvoExUtsrDLKIKNE/OL7kfoLlns/qBYK8wI68qQ934rr1m+qjms6gylTZsI5xfCJGOvi8SgC2sT9oo7FNdHfOyJA+KWbObqQwqjTC8nZDDIzg0aP2BPbNfdDYBe978yxiqLHxTj64NLO+esC3glfcQFhJR1IG3C6HsFr5eXfGiBe8PbiIC906MP9bw9mIFMhm8h0pheMY9lPB3osj2kE+sZg5zOifw/FRagGCkFPo+d650bqT+cBe6pguDr9/PyIGMKkTYvEffA7Zl350+uhpsKxCr57O0psiBTHFluBEDyt6O8Dhahqfe8D1udm qCjIICFf Zx1ic28c/BJZzBRP5LGUxs4UPcnICHDyLjcPswd68cr7RxM5zJJvz9hDmR3UeN3S+rHiqzWtgGWWN8oRYwdRxreaOex32sXIsY+ZB2kCubXl1pVe5ngzD8vdThU9A5+KUx2VD8oPWUXJw+/rIIX6QegpVLM2kxBFMz4/KWUOge2aqB+eONA0qvWEXSWPbu2rbsTdXjh1/j4OcM/8YS2MdAslLtgp8R3neZ9/fAPB+pr0SX0X2d58U9aKBK8qa7GaSIg8C/jP4k50+FCx6pUxpYyhped2F2kQiQlQre0L/HpAJsdSS7o2W86StETv7bnNTRCIF00osW6KVtdhfvch3erFPDHszDtCKjS/7E7fNXotC+5pOLNu8eVfBnsR8O//ZOvZkblF08qokvK2orhpgh7Wjeq/qPbRFKOqPbPfcGOks0hFW8MBf3sFF/hLNQnV3dLy1uZX7kL39OAOvb505hzskWtB7pYN+oc7ZnULE1n7Se+EpIm9hEbYpJXy8TmrQmQc1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Jul 26, 2024 at 12:57:43PM GMT, David Laight wrote: > From: Lorenzo Stoakes > > Sent: 26 July 2024 10:44 > > > > On Thu, Jul 25, 2024 at 10:02:45AM GMT, Linus Torvalds wrote: [snip] > > > Christ. This whole series is a nightmare of "add complexity to deal > > > with stupid issues". > > > > > > But the kernel test robot clearly found even more issues. > > > > > > I think we need to just go back to the old code. It was stupid and > > > limited and caused us to have to be more careful about types than was > > > strictly necessary. > > > > The problem is simply reverting reveals that seemingly a _ton_ of code has > > come to rely on the relaxed conditions. > > > > When I went to gather the numbers for my initial report I had to manually > > fix up every case which was rather painful, and that was just a defconfig + > > a few extra options. allmodconfig is likely to be a hellscape. > > > > I've not dug deep into the ins + outs of this, so forgive me for being > > vague (Arnd has a far clearer understanding) - but it seems that the > > majority of the complexity comes from having to absolutely ensure all this > > works for compile-time constant values. > > The problems arise due to some odd uses, not just the requirement for compile-time > constants for on-stack array sizes. Odd implies not many, same argument applies. [snip] > > > Arnd had a look through and determined there weren't _too_ many cases where > > we need this (for instance array sizes). > > > > So I wonder whether we can't just vastly simplify this stuff (and reducing > > the macro expansion hell) for the usual case, and implement something like > > cmin()/cmax() or whatever for the true-constant cases? > > I did do that in a patch set from much earlier in the year. > But Linus said they'd need to be MIN() and MAX() and that requires changes > to a few places where those are already defined. OK, so what's stopping you from doing that? In order to implement a MIN()/MAX() you'd need to change call sites only (should be a managable amount), so we can change this too? I'm concerned that a solution is being proposed here and then handwaved away... Unfortunately a revert is no longer possible (I had to fix up 33 call sites manually just for my defconfig build to compare perf before/after), so if the intent is to eliminate the complexity, then we need a practical way forward. > > > > But it was also about a million times simpler, and didn't cause build > > > time regressions. > > Just bugs because people did min_t(short, 65536, 128) and didn't expect zero. > > It has to be said that the chances of a min(negative_value, unsigned_constant) > appearing are pretty slim. > All these tests are there to trap that case. > > There is always the option of disabling the tests for 'normal' build, but > leaving them there for (say) the W=1 builds. > Then it won't matter as much if the tests slow down the build a little. Very much NAK disabling tests as a solution! Also leaving them for a build that's apparently broken... yeah not a fan. > > I think I have tried a W=1 build - but there are too many warnings/errors > from other places to get anywhere. > A lot are for 'unsigned_var >= 0' in paths that get optimised away. > The compiler doesn't help! > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) >