Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1331920rdb; Mon, 19 Feb 2024 11:36:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU8mwEYxL6v411OfYQYQDXOGEzmXbUemAkMgOg16800KXiL9KhLQWbKmniIPv3OKVvVDeKWsnuNGI1dldo54l4Xpf3xzJ/uKOTG1Mx/JQ== X-Google-Smtp-Source: AGHT+IFzrPU1SFQea52eO/25bEoh2nLBfJ5R+2iD53c+XZR6I5I9hXFgf9Xgu3sOADBdM6PYmjrf X-Received: by 2002:ac8:58cc:0:b0:42e:259a:66c with SMTP id u12-20020ac858cc000000b0042e259a066cmr261248qta.32.1708371368402; Mon, 19 Feb 2024 11:36:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708371368; cv=pass; d=google.com; s=arc-20160816; b=E2Lc5DV/yzMfAm/n+UQ6zCUbxGMJbuzPwhGFNqscFl7/Xc9i874hf18p/2a+6K/c2v G91MvycVOZLVVZQlhVoXpP/yMLtyaIYmFnK0eNbrn/Qn0Mq8js1oOZWPOW7dL9uS8OTn m+kqt1gBzvRoNHJSE2BHv5M3j4IjodSwhYUT8yH0NKRPCVbUaONB5XwJZn1+WNGMryYl L6xajPdFzXkwjhVlX/WZJNu8dzTJaihmZxha5P+xxNqC9oeP7P+Rz8dQ/X3PkMCFepzu /ENJqGk4qrl2g2aKaiRRZg4Tt/jVklk1QaI89dck3V507+gmFy0OcTID5+onRlO0vcHR 0/DA== 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=+5margOpW4CvmYp3SbztDJ9DbM635NMYbVyCCAkM8Cw=; fh=vRTM1l0msNfKR2q+0q6bB0W2cmVg9A1bvCCVQ7AIJ9g=; b=NxrAgifINxppem2hk1s+LSae4Rd1AaeZnACMpR5BPMQgVeuaqfk8gljxJl/TT5ay2f Pv/VIEoDwa6GgKnAlbNXmjdPYYfFfeICteYOMtVTFj259QS/SnAT1t5ozym536hNMokR rOKSEMErZmtRRkFyzmUlbQJ+O6e+3MGRWVhNK0ymMv8FTfkhrhwAJEuS7xfoILxTsQ2w A547Hzqy7yF7T0MUEdss8O+MCVouaAvZizvUhYGN/Y2PscpV2TzIQwl89xpNHGclVgpH FR/8r+GNWye1LC8H9M+v/b11b3tGaZQTd1oEGYf2XB8IOsOFxEEWatyPy9VvSlv/hkOh Wfnw==; 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-71876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c13-20020a05622a058d00b0042dfd627880si5613891qtb.16.2024.02.19.11.36.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 11:36:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-71876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71876-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8B2141C220C1 for ; Mon, 19 Feb 2024 19:35:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16E95524B1; Mon, 19 Feb 2024 19:35:37 +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 A097D4F602 for ; Mon, 19 Feb 2024 19:35:34 +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=1708371336; cv=none; b=jQIuKqJ/rnMKTNWvgoiV9LWmjxdVPWrNDpEEgLEYEWn7pXE2K9xL7VvMQnSiCi4UxstuijGFht8uXjjZXkuT7tXBXex+xhkvG/Ieo7TslgP35W7e48J4NzQdCyzVZo6OSu9Nw1cC2rPFpiTZwtOEiXGqxkiFFS1PPpMbca+odQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708371336; c=relaxed/simple; bh=+5margOpW4CvmYp3SbztDJ9DbM635NMYbVyCCAkM8Cw=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=Gk6zo3S20AUHLi6EUE0gpVy7ii3Ks1sCYSpqFEg0FRUwdW+32a9+CH2WrsKGZo4sh2v0elUVHUMZ3v5Ta18PjoiPCLsaXLSZaBM+b/MjN7UmgaP+V2MHjDR4ITZMlJpbrTwh7IWdoMIZB/T2pPzx1oH63UEYWKgeishbHt753ks= 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-314-iR3pvq1wNXunpGpx55236w-1; Mon, 19 Feb 2024 19:35:25 +0000 X-MC-Unique: iR3pvq1wNXunpGpx55236w-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 19 Feb 2024 19:35:24 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Mon, 19 Feb 2024 19:35:24 +0000 From: David Laight To: 'Arnd Bergmann' , Andi Kleen , "Arnd Bergmann" CC: Alexander Viro , Christian Brauner , Jan Kara , Nathan Chancellor , Nick Desaulniers , "Bill Wendling" , Justin Stitt , Kees Cook , Andrew Morton , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "llvm@lists.linux.dev" Subject: RE: [PATCH] fs/select: rework stack allocation hack for clang Thread-Topic: [PATCH] fs/select: rework stack allocation hack for clang Thread-Index: AQHaYlVmebUOAwzLC0yN/tKvvf8iVrESDxTg Date: Mon, 19 Feb 2024 19:35:24 +0000 Message-ID: <029aeaa162a64758a548938d5b382cb3@AcuMS.aculab.com> References: <20240216202352.2492798-1-arnd@kernel.org> <3a829098-612b-4e5a-bcec-3727acee7ff8@app.fastmail.com> In-Reply-To: <3a829098-612b-4e5a-bcec-3727acee7ff8@app.fastmail.com> 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: quoted-printable From: Arnd Bergmann > Sent: 18 February 2024 10:30 >=20 > On Sun, Feb 18, 2024, at 11:19, Andi Kleen wrote: > > I suspect given the larger default stack now we could maybe just increa= se the > > warning limit too, but that should be fine. >=20 > I don't think we have increased the default stack size in decades, > it's still 8KB on almost all 32-bit architectures (sh, hexagon and m68k > still allow 4KB stacks, but that's probably broken). I would actually > like to (optionally) reduce the stack size for 64-bit machines > from 16KB to 12KB now that it's always vmapped. Hasn't the stack for (some) ppc64 been increased to 32k to try to stop some recursive network code (of some kind) exploding the stack. (This causes grief when the stack size is doubled for kasan!) I really don't understand why the change isn't deemed necessary for some cpu types (I think ones that are likely to have less processors and less memory) because a small amount of the same workload would explode a the smaller stack. OTOH more pressure really ought to be applied to remove the recursion. Unless you are trying to calculate the ackerman function (don't!) it is usually not to difficult to convert recursion to a loop. More than one level is really asking for trouble. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)