Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp600457rdb; Thu, 1 Feb 2024 19:49:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8Cm2g4rYX4J4UYf9eiNL9Z8oPgIuD6riTbcZCgM8vYgoT278mVngA4eUugwxcYjyj06i+ X-Received: by 2002:a05:651c:1401:b0:2d0:7b89:e872 with SMTP id u1-20020a05651c140100b002d07b89e872mr377897lje.27.1706845786209; Thu, 01 Feb 2024 19:49:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706845786; cv=pass; d=google.com; s=arc-20160816; b=v/Wpjn7UjujxGSgPG7hVXR0/9JKjj00MFsu1HEE2Qd1Xft2hPjq55nmHky1+LN55dE ybZotkGeKvHRif+1p4fz9qSmVwsiQDN/xqBO+tCSuNeHXgTvrmNm4PDPxArDYUEw4qiw CJtBsotcECfOmcuKeCT69+AGSQOAdoy3IE3/9NWPLvT++X4Mgnrtx7R3cybX4lTE+Yhx KIdaq+X5DsQr8nmECdOcgjwVn4gvPYsXiWE6JHwP1Pvp9huhcJ52qNbZBLeiHp+MCzyr b4eYu2il/XTEcx5X6uLifFhoARHceMtgLWP+wo+Z6JX1kFB9OsHT/sOOcNFMZ4rmD+DU uclg== 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=MqQmRHXIGwvjNURHDffefpzXQRpdMsIdEY9A7rDu3qU=; fh=WwcMLB1CW/AkeiNwTbP/G81msl4RUM/ccudaX46LK+4=; b=E16EhJGr0ydU8nED8W514zOa4Y6Fwa6r91as1PnXrOajVP8LCl7SvGpaS1/RkSyD69 imfOSpDCmqrMBQjxbcYZSmucoQ/uqcWb19W7J6QP5Et99zwe9tJbu9qJ2s+ZLqI1UUoa E4ryR4KXbZC/LYpwzAuuDWQ+r53R4Df2LNbUygUyb4P5KFklgCfVnJQAWrAkrUap0qP+ D/Pp1QU/DkjzRmH0AQ9ERsml54ySHBM16vOiUGZhyNNZDkesMZru1xYYFYhYbdwGm4aq KP/h17hB6/z2mlH2X9PUg6FQuZYC+21fbd0x6X85en3wZluwm/j0Ld2Ubu2TFq7h5J/v kQzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=DMWQ5eFU; 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-49156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49156-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; AJvYcCUmrUATF+PvsKBhZDgRlqQglBHt03JWSY8zPas8TEXhofwry1Cbwsm6YDPTaB13VaKoVB1TCWE2MOr9t0sz9GdonT6nm8dANYpIf+1ewg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p11-20020a50cd8b000000b0055fbf613c06si404725edi.221.2024.02.01.19.49.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 19:49:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49156-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=DMWQ5eFU; 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-49156-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49156-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 ACA141F27245 for ; Fri, 2 Feb 2024 03:49:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EE49E56B; Fri, 2 Feb 2024 03:49:36 +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="DMWQ5eFU" 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 9B22FD514; Fri, 2 Feb 2024 03:49:33 +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=1706845775; cv=none; b=dHn1H08TqHLwDvCEskSJnBnmfIWjWqDhZlVLOCbtFTIXKIMjUj179t0TPdeB54xKU/0R3p/Eb00zx45VQBU9aDuS9rMwsiwKnk1TcGBHWfQRAQewSebImTmsM7RPUlAlpZrO3zzlCAtL7XoimhYuS8A6IelAsgBnATeZ5eG+k1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706845775; c=relaxed/simple; bh=Cv0w8oHTl4+0Yk8RFWfy1a7sSAUtwxQAmimPK9LrkYk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=erYsDHAqyQxoiAXVerxmM6jdxAGOza/AycLFPbP+XgnajxGXM1qHf4cb0oGsYFO8YKiR0Mk7wX8pXX5yBNvrykxg27tflDnBEebCQ5rRPn+ocNrlIAUUZPvBE0UUcaXRqe2gvz4NHEHxXuMFs0Peqjwft/2fx5lpGzVKr3RQTC4= 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=DMWQ5eFU; 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=MqQmRHXIGwvjNURHDffefpzXQRpdMsIdEY9A7rDu3qU=; b=DMWQ5eFUmYBozpEalenAa7mNXn +rWG79SC5S0FeBh7O+UjZsQpnoXvJCVVBhLw+6zi08WhASm4qSZrEBZJx/Vut++peShGggpN2wkbo TgIR+v7RncUizi5tKF1JMv1RHjABhvUhIfS07mcAJidcebQ2/Mz52bNasIXlhneFX/WRJQDltkEwX fDY5uplHT3Cdm27B9udXGf2iMRomH587+Cj+nMtZtqeoJ84zJDVK/XCsnZYBfgkVXp7X5uBWFzBKc y9huFBvzYq/oDfgjKyqdBFwezCFr/HwXNn+eLZUn0TLVOLFQvWNOnWAB+YDrY1qZVQ5bKxNzS4fgt 97mdp1ig==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rVkYP-003dd3-0Z; Fri, 02 Feb 2024 03:49:25 +0000 Date: Fri, 2 Feb 2024 03:49:25 +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: <20240202034925.GW2087318@ZenIV> References: <20240201171159.1.Id9ad163b60d21c9e56c2d686b0cc9083a8ba7924@changeid> <20240202012249.GU2087318@ZenIV> <20240202030438.GV2087318@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: Sender: Al Viro 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... > [ 45.884809] DOUG: Allocating 8768 bytes, n=548, size=16, core_note_type=1035 > [ 45.893958] DOUG: Allocating 65552 bytes, n=4097, size=16, > core_note_type=1036 0x40c, NT_ARM_ZA. /* * ZA is a single register but it's variably sized and * the ptrace core requires that the size of any data * be an exact multiple of the configured register * size so report as though we had SVE_VQ_BYTES * registers. These values aren't exposed to * userspace. */ .n = DIV_ROUND_UP(ZA_PT_SIZE(SME_VQ_MAX), SVE_VQ_BYTES), .size = SVE_VQ_BYTES,