Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp16956rdh; Tue, 13 Feb 2024 08:08:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXdJdVCgPNlDzuDTRuJwlUTSS7rNsB7ARtGirJug46tZIFxoNURp8bzmpWO4r3jTIfD9p5RcFrDTXkBK43lRh6f/r4W2hIc4ebGEVt6VA== X-Google-Smtp-Source: AGHT+IFq6dtq4kg43RspDX4bv6MyyNRL9ILgyVGvkkCGXeTp8ddadZcGeUu6lyaQwfbPrzoLYApk X-Received: by 2002:a17:906:4ac4:b0:a3d:1f80:f39d with SMTP id u4-20020a1709064ac400b00a3d1f80f39dmr665093ejt.66.1707840513763; Tue, 13 Feb 2024 08:08:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707840513; cv=pass; d=google.com; s=arc-20160816; b=HLOuRvefOB9X0BtsIJlyXny/vAgjru8vXnP3WCiLRMiiLvTdyQ/N6rMY1Um0A57z/S T3ixj9RypUgP5vH8BQbp/jGrUfSpyD3+xdh7oKJzA1WL/x7dp+9wQq4RzKyKX8pYCGH5 F8jlJdsgVMswEL/Ulp34S4ivQ7fwkqkdh/mU1u42rLDlaqIAdALDHSs1fHZghadpLnqg zaeK3eTsUA5GVlKKzjqa/JWKzVceH3JCcBiqBEZg+aB40LLt3wFa1lzdOFyK/GokBejL fPInik2aupTftjSC6xbkMHq1AQcEajU33Ba5Fn35rDLJpUyUWyVNY0I1R6hC9MBChSNA zgrQ== 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=0WiqSPMNdNFtf4Z+7IrNKYStBozC0/BYbj76H+62P/E=; fh=eQ2lSSs9nhv+XOuk/WYTZwPh4z+EhZiAFp59UzxFjF8=; b=U7Vk1WmaMlrqAMwVuCaHhTWrdu3SGV2y5BVSrKiMg84MnZ4YVf3UXEInfEnOUi/xKC fhlAC0Cm9DtwjPuNEDSgV0XxgCXIEbxgHFu+VbifgjTRYiuGV1yIKnr4/HVxg7gZHeY+ IIbINC8Wt4rtDEYW0FJbcFrcCvYFQhvlMAfpQLo7LUZcblFHjUundfVEyPwyX9jdNbd/ wIW+IAyiFrQCOUd+WZi7Ws0WgYlCLc4w04pVEQwpEZbBEiH4ZTzGdECjiZE0ZzVp9Isw 8YaNMQexBqzsPvXH6y1FpDUAyLeOJqUCM07NgRGYkYnJcG/jFPBsD/hjgVy1E1KHLFqX 4v7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HpC+xxk7; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-63864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=2; AJvYcCUb9AEAMpzlz3J8TEQ+ZElMMw06O57c1m1ghEP9dWkEBSI+SOVjlqMyMKIrTnhEGayIOXcYH/2IWdfIIbVZj8QDZGF26MGsNO2R1Bre6w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a20-20020a1709066d5400b00a381793e309si1358431ejt.292.2024.02.13.08.08.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 08:08:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HpC+xxk7; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-63864-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7B9D61F28A1E for ; Tue, 13 Feb 2024 16:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84C0860269; Tue, 13 Feb 2024 16:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HpC+xxk7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 965276025B; Tue, 13 Feb 2024 16:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707840361; cv=none; b=ckBCBAiRxImlno3/T5qO6jOrYUulbemxlWj9EFg9vkarrkn8Ru6mVnw2PPnaOhMZJCE1LRgEokghcPuUYYuGumM9BUoUtdrbZ4VP9oSo5WnUUyfKwObxICFNcv6rPkl6Y40O4LO8Xsk9tNx1GQlpf1NFe7H21CBgoDp+FGYsYsU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707840361; c=relaxed/simple; bh=8IrZp1R6Id5dnAPQaTPV1kv7PcWpRQgZiextr7aFPgs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TOlrpyAowLi9nLbdfXe/BHSQ0fHxRn83ZAiBX9J3z4lJYsawI+Jx7hpcGWJ/nUtDYgcCEHv0vWe6WXz6ANfPUX83yPyXG6WWkWyZ42W4evQGx7Sv4eEcYZTLjjOA3g0NQOJtNMsETFxTZWU0rll7EZ1w4M1UWfQZGjoWbYme3WE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HpC+xxk7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54887C433C7; Tue, 13 Feb 2024 16:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707840361; bh=8IrZp1R6Id5dnAPQaTPV1kv7PcWpRQgZiextr7aFPgs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HpC+xxk7dsmGsS1klQiOYCtvx6SRk+i18WHGYIJ9m76XsA7lICyPtbdD/Zmq9NgJg UdVSkS6nCzOyFanbdyUtMRKA6v/znfAccvaYRlsUpJSIQ/dy40h3j11X877fP+bVnS huOtfjQXil86hwRFyNJTynz/n6SmVB6+MzbrgWHU= Date: Tue, 13 Feb 2024 17:05:57 +0100 From: Greg KH To: David Laight Cc: Linux regressions mailing list , Sasha Levin , "stable@vger.kernel.org" , LKML Subject: Re: [regression] linux-6.6.y, minmax: virtual memory exhausted in i586 chroot during kernel compilation Message-ID: <2024021331-famished-underpass-1080@gregkh> References: <2024021318-shifty-daybed-fca8@gregkh> <699726f6-8f5d-4482-8c27-8ea47a483f8a@leemhuis.info> <19d0ed563ba0449dac089b95456026dd@AcuMS.aculab.com> 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: <19d0ed563ba0449dac089b95456026dd@AcuMS.aculab.com> On Tue, Feb 13, 2024 at 03:13:10PM +0000, David Laight wrote: > From: Linux regression tracking (Thorsten Leemhuis) > > Sent: 13 February 2024 15:01 > > > > On 13.02.24 15:50, Greg KH wrote: > > > On Mon, Feb 12, 2024 at 05:16:58PM +0100, Linux regression tracking (Thorsten Leemhuis) wrote: > > >> > > >> I noticed a regression report in bugzilla.kernel.org that seems to be > > >> specific to the linux-6.6.y series: > > >> > > >> Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=218484 : > > >> > > >>> After upgrading to version 6.6.16, the kernel compilation on a i586 > > >>> arch (on a 32bit chroot in a 64bit host) fails with a message: > > >>> > > >>> virtual memory exhausted: Cannot allocate memory > > >>> > > >>> this happens even lowering the number of parallel compilation > > >>> threads. On a x86_64 arch the same problem doesn't occur. It's not > > >>> clear whether some weird recursion is triggered that exhausts the > > >>> memory, but it seems that the problem is caused by the patchset > > >>> 'minmax' added to the 6.6.16 version, in particular it seems caused > > >>> by these patches: > > >>> > > >>> - minmax-allow-min-max-clamp-if-the-arguments-have-the-same-signedness.patch > > >>> - minmax-fix-indentation-of-__cmp_once-and-__clamp_once.patch > > >>> - minmax-allow-comparisons-of-int-against-unsigned-char-short.patch > > >>> - minmax-relax-check-to-allow-comparison-between-unsigned-arguments-and-signed-constants.patch > > >>> > > >>> Reverting those patches fixes the memory exhaustion problem during compilation. > > >> > > >> The reporter later added: > > >> > > >>> From a quick test the same problem doesn't occur in 6.8-rc4. > > >> See the ticket for more details. > > > > > > I think this was already fixed in 6.7 or Linus's tree, but I can't seem > > > to find the commit at the moment. > > > > I thought so as well, but was in the same situation. But your comment > > made me look again and now I found it: that was 31e97d7c9ae3de ("media: > > solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)"), which indeed is > > not yet in 6.6.y. > > The code is actually (now) doing: > clamp(b, clamp(c, a, d), d) > but previously was four nested min()/max(). > Even the a/b/c/d aren't trivial. > It always was a pretty long line, but the longer expansions made it explode. > > I was mildly surprised to see the minmax changes backported. > Not complaining though. They were needed to fix build errors in a different driver that was depending on the type checking changes in them. That's why I added them. > But 31e97d7c9ae3de needs backporting as well. Now queued up, thanks. greg k-h