Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp606018rdb; Thu, 1 Feb 2024 20:05:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFt4OAkltfJ5lMcRMNT1Y1YCxrskZRoI3LAWJui01GYNuF1rpKW1z40kciazhlpTP39rQhz X-Received: by 2002:a17:907:7799:b0:a2d:5392:6cc0 with SMTP id ky25-20020a170907779900b00a2d53926cc0mr543039ejc.60.1706846730194; Thu, 01 Feb 2024 20:05:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706846730; cv=pass; d=google.com; s=arc-20160816; b=pohSMWK2lFzA9ZleMBcov9P2ee1ERjW6dyrSZEo7fVAJ+cwvvF3JDdHHHQrW2ffWMm j3PpiyEozTxl3pClfwHxNXPTo4ml2dYL0LzTT1xM2jH2BK7Q90HpKGVoHL+7WFuOY8Jc FRaDsj3ivvSi/ZHP1p8nkxs45EEg+CF4Y0FSFZAvFYnb2omVAZXIb+6uPvOyrvByRJWV 754cCJ/P3WUNrHIarQuHxfACWl0LckeFMjOdyprIYI2fOoea9rA8LWRUFCb06biU8vgD sA4/fz6gCGXz2ZxZQ0nt8w7A2q0isMHjzSRbvgL6fzkFmYSn6kLyI3UwxFKV8qRODTPC 8ggg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=zprcRbdEZTEbzRJzXIqOfmdBLyrHEeb0z5ZjrW+eJjk=; fh=6cKeGf1OX5ShKhsChIy5vhDpUt/fR4z+7+eYyFojNJc=; b=R8sXibpuO/0ajveAeTGoPdX1PLkcfTtW7RMoLaf6BogyUa4K4IlOTAguE+KbuTQSjk qNH15f9HlcDo/VD4kegMeI3Oi+v0Uebez75Ja/tVrdG9jSbpAWAU46DOExJZiLy45Xfo tvrYSj+MJ0AzOM63ELY2Dc9My5zAdQ9Bs+PTEkGsJQ5K84OuNehfKseO7SYh8LQFfU7Y oW8FyhedQ/8OtkcpmWXJ3Y0l6elRyS6GsEIP20BQUwELRbGxroIP+EtJCtZEorjUB+Oa spiYbZn54+/Qd6w9Ufjj/FwDqzThhlOhm2zMVE86kJKREt5zzxHOJYErI94WU+erp5L+ LfEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=pIco9+AE; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-49170-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCX2dUSk7L/XCLb/0k/trSD+//pSk9OccMZnrcAd1tWHveF4EOLYNorGv+GM52kz/1+utYDaJ0QJJuemzqv8RTGlyZBikDUn7mgzRIVEpg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s17-20020a170906bc5100b00a3657aa02a9si427244ejv.508.2024.02.01.20.05.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 20:05:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49170-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=@linux.org.uk header.s=zeniv-20220401 header.b=pIco9+AE; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-49170-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk 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 ED2891F27A27 for ; Fri, 2 Feb 2024 04:05:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8448F4E9; Fri, 2 Feb 2024 04:05:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="pIco9+AE" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (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 82244E549; Fri, 2 Feb 2024 04:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706846713; cv=none; b=pEf18maCz62ErsJgI4knNR5EVI56hPbMM20FB3I/aCHJgSWYBLK7j9t1EgJUY/sgXY+X8OUfCAJenW/5g+M+xM5iHPxUZXQNXTbOqyYk3ZJW1U7yHAFgVMwzye1cypXvpYKcyuCSRmiJscVO2C06T6rbH+OHuhthYt1RxGP1bFo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706846713; c=relaxed/simple; bh=hZfxudAQbzcTFkLzrUZ/iFfqiq5eoB8LM/fFig+PAHA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uBMoMYYBb2zR97aJvt0THOGBr1gL4bsr3gTXc8ZQ11FxIVZw2Dex8yrD+tx+8Pme0IZn4cqNg60sqy5cMdqxNL09EOPdyYq8sayb2h6ktkS99RTxeO0kzbC+CUFAv/cqaII09sAUjfU+x+Bp51kJWOrvqPGk+6/V1MSmFcobhrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=pIco9+AE; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zprcRbdEZTEbzRJzXIqOfmdBLyrHEeb0z5ZjrW+eJjk=; b=pIco9+AEcGpi1eJkqd1+TWTTQ/ XggxqzL2w7JuIlqFb/qCdHy0ULmOVossWG+kEFJsaGwMh+RytusUgg82M15TvEDjlqwGslNf7cvUq sPt2Vassayxn3kWT9oVofZJaRl0DIN7pORLgWXb+9VTqqAlio+oguHQ5mP/B5DZuelRkEJdARnyFU m/G0i2qfxHjXcpG4x8OeVf8YUMVphbhJ7Uxp1eVbk/1W+xGbO+bqjutgFRWwu6i/wdiHFEvnCchz4 ZhCB1hItyVOF2KQdksSMyIe3+2vMkZTegZ2UOl9ci4kUZVIH/f16rNHViC/gdF6VL8VPSjwmx0o57 Hxxlk+WA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rVknX-003e9i-0F; Fri, 02 Feb 2024 04:05:03 +0000 Date: Fri, 2 Feb 2024 04:05:03 +0000 From: Al Viro To: Doug Anderson Cc: Christian Brauner , Eric Biederman , Jan Kara , Kees Cook , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] regset: use vmalloc() for regset_get_alloc() Message-ID: <20240202040503.GX2087318@ZenIV> References: <20240201171159.1.Id9ad163b60d21c9e56c2d686b0cc9083a8ba7924@changeid> <20240202012249.GU2087318@ZenIV> <20240202030438.GV2087318@ZenIV> <20240202034925.GW2087318@ZenIV> 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: <20240202034925.GW2087318@ZenIV> Sender: Al Viro On Fri, Feb 02, 2024 at 03:49:25AM +0000, Al Viro wrote: > On Thu, Feb 01, 2024 at 07:15:48PM -0800, Doug Anderson wrote: > > > > > > Well, the next step would be to see which regset it is - if you > > > see that kind of allocation, print regset->n, regset->size and > > > regset->core_note_type. > > > > Of course! Here are the big ones: > > > > [ 45.875574] DOUG: Allocating 279584 bytes, n=17474, size=16, > > core_note_type=1029 > > 0x405, NT_ARM_SVE > [REGSET_SVE] = { /* Scalable Vector Extension */ > .core_note_type = NT_ARM_SVE, > .n = DIV_ROUND_UP(SVE_PT_SIZE(SVE_VQ_MAX, SVE_PT_REGS_SVE), > SVE_VQ_BYTES), > .size = SVE_VQ_BYTES, > > IDGI. Wasn't SVE up to 32 * 2Kbit, i.e. 8Kbyte max? Any ARM folks around? > Sure, I understand that it's variable-sized and we want to allocate enough > for the worst case, but can we really get about 280Kb there? Context switches > would be really unpleasant on such boxen... FWIW, this apparently intends to be "variable, up to SVE_PT_SIZE(...) bytes"; no idea if SVE_PT_SIZE is the right thing to use here.