Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp590882rdb; Thu, 1 Feb 2024 19:17:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmnPlBO69wZKZoZw42Xbu5gH/rCnEFyAWs1WwViv5fI06ybzZu9tMS8V1UEeE3FXgDQm5A X-Received: by 2002:a17:906:300f:b0:a37:e01:4cdf with SMTP id 15-20020a170906300f00b00a370e014cdfmr134850ejz.30.1706843830629; Thu, 01 Feb 2024 19:17:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706843830; cv=pass; d=google.com; s=arc-20160816; b=jpA23evRF9RuOPrxwy1tlqRzxKRum0P1q7IArsWeSqFw1slBBHFy0PUd6p5dmjLqos 1G8vVSahatRbYoSTEEKQrS7hfbUdgndV8ivPEvt/eo0dONEf0r1aRD86xkzeAyjYBmXJ V4XayGecCXoCCALfQDsy7SG65dTIiEGVXuYW2soJbKMcHr0G7K42DKTXvLR72tUw9twq vT4QNT+jHGIXjeOMrdmumANnEZ/xWgU7YqAVvniWJcsnBOeNgzTQBYoxp/em3CJrSSVj 9EIWpY4YMQXXStWM32QwUt+15aB5XZUksX2+Joam4LLr9SmR5Wy8n+1tVbufcwrG1zCP Zu/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=nr60hQses4C7qPIpWX7Pk8oBCIoPSvq+zV4pLC1HFKM=; fh=pjKT13pf0ovcRXDuE2ERtopRDuZoSNzHMxDMRABUVwM=; b=Ga9L7ubQ6C8vOwfAc4Qd6jwDXM4VkBMivVbug5eWhF/biUczcv8aXwu9wMiGbGnO1F ZTD8kLRy8OCE7nO++VAYdeYTaB+3R1ZMf5KP8ExGH8Bv8FwQdn4/+L+4IooTxUhOIxws 4uKoTUMRh3nFlr/mlmdwKhfPYWQktNIkc6hSCfmpQUMgc4A6oGtPiSgBUaT/7TuC12jA a523EQm0q4iwUBNbxqyYrpzHai2LhBYuyV0Tc+LNA6uB+TCO6Hd8uZLER+oM7IIjlp+g S3Lv8AU5rSx2I9YMIn73D6ZUZ0v8+bQanawjx37DgqozvgmRwKgkj8eEpF8WAuM5paXh QrTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lLeycbEt; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-49139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=1; AJvYcCVB+pYxMdkfrTkuuiIXNeKMSuyFG9mhGs5i7Rp2aC2IdbpAmeBljGBEoACUvLMYIA5K+Zhcxcj96hi/mQHOllrRtplNlKoqDwfEcGHMZg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v17-20020a17090606d100b00a331d7fb523si409749ejb.185.2024.02.01.19.17.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 19:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lLeycbEt; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-49139-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49139-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 E76F61F27E51 for ; Fri, 2 Feb 2024 03:16:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55ED1E57C; Fri, 2 Feb 2024 03:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lLeycbEt" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4E77C131 for ; Fri, 2 Feb 2024 03:16:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706843771; cv=none; b=RJuRckb5586zrv2qV4rJvj0o9XnqOQEyVl057czkMFy1nx7ne5jEhdqirPHVWSh3kGt15f99C645WgPTeMAQ8qZ5ecmHn2as6yfIy5Dy6bTYYpTAD9RBJ7z7nPLr3rlQxV6zfyEdwdo6lsSNLJwJUTSXsuLhoDJM4oYtsjaV2B0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706843771; c=relaxed/simple; bh=lmKganrCDfRPsqDCh+yUbHYT43Bc6KQUR1LqIUskJ7Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Mb4ZYmddGkBsd7UTi9cAxg0htzpYK0IsjD4ZBEdMiQg2RYMX/Ews2KHdXcP9/K2xox0B4Q2kL4d+13dwer/45cLCKgJrmzYUEYcPJ8c8lMHa2lxajFL1HprDUh+s1vjfTYtj1Sc0+4xaxaZnYYcl5McDdNoMXUiSPXzfSZ7Hxck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=lLeycbEt; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso224655266b.2 for ; Thu, 01 Feb 2024 19:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706843767; x=1707448567; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nr60hQses4C7qPIpWX7Pk8oBCIoPSvq+zV4pLC1HFKM=; b=lLeycbEtUk+SKcSsn+p5vsLyuKmNvuNrTwqAEYtgYPyzGLS300A2ehw5+3fTHR9vSz DS++S5EuRXdNrp+A53fKXyc02QjTnJy5yHAUaI+Bum/X/5VVSnBddp6D9ZUaAQrMhlK2 sdKpoVPnXG8yzskO5PbvgBdiLNrsmKIltSMgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706843767; x=1707448567; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nr60hQses4C7qPIpWX7Pk8oBCIoPSvq+zV4pLC1HFKM=; b=HY9TsejewHZpGhe1RxI9kOHldz4xw9CYb05MIYgkqCHO9R/IaAvPMvcyMhZQ06/an2 VW2/jAM7l60ewjKdLnCzlY/aJ7++khxIE9GJHpqJ1F2SMuxsZdVE2iQLcu6mTzoo9M1H VP+AWpisCYp45G9K2xxzUPWoqZhvdGL58ikfvw//tR5am9/kaDdPY2XuTQXS2MFhDUMb DTB8oZKps4xhYlZM/vTobTucG/tiX2tF9mXUj6bNdwlRSBfzXHVhcqHv3VYP1jusTLv0 cpk0HSVFLo+I86ZAumunKMF0Lo3ADu9fQGwX85BGl94ogfJ41xxPz+ZcURJDFcRHhIPm vMRQ== X-Gm-Message-State: AOJu0Yy5Lrl/fs2X2K4b6k14UkjZ4hsUxsuHZduuo2zUTVrFS0HbTUnU bKEBAIj+gXkyd8nMZGWy46MgTr/iMthlsNMhWRr55pOcHxM5iCLzLDZF4i7AvY5Px5WkWvx+SdR KC0Eq X-Received: by 2002:a17:906:19d0:b0:a36:71c1:1244 with SMTP id h16-20020a17090619d000b00a3671c11244mr5197112ejd.37.1706843766874; Thu, 01 Feb 2024 19:16:06 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXux94+eLuSb1wcUI4f7RiJz+fsAaEK3U70HSWFMdONDGDXiWa2xUf6dRPhbkOxVNvKTfRK1SV/jD3NGBntgJILNhOJCB88tzAM6kUw Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44]) by smtp.gmail.com with ESMTPSA id tx8-20020a1709078e8800b00a316ecc4badsm399395ejc.56.2024.02.01.19.16.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 19:16:05 -0800 (PST) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-55818b7053eso9356a12.0 for ; Thu, 01 Feb 2024 19:16:04 -0800 (PST) X-Received: by 2002:a50:c346:0:b0:55f:be05:8f21 with SMTP id q6-20020a50c346000000b0055fbe058f21mr46623edb.1.1706843764683; Thu, 01 Feb 2024 19:16:04 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240201171159.1.Id9ad163b60d21c9e56c2d686b0cc9083a8ba7924@changeid> <20240202012249.GU2087318@ZenIV> <20240202030438.GV2087318@ZenIV> In-Reply-To: <20240202030438.GV2087318@ZenIV> From: Doug Anderson Date: Thu, 1 Feb 2024 19:15:48 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] regset: use vmalloc() for regset_get_alloc() To: Al Viro Cc: Christian Brauner , Eric Biederman , Jan Kara , Kees Cook , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Feb 1, 2024 at 7:04=E2=80=AFPM Al Viro wr= ote: > > On Thu, Feb 01, 2024 at 06:54:51PM -0800, Doug Anderson wrote: > > > What the hell? Which regset could have lead to that? > > > It would need to have the total size of register in excess of > > > 256K. Seriously, which regset is that about? Note that we > > > have just made sure that size is not greater than that product. > > > size is unsigned int, so it's not as if a negative value passed > > > to function could get through that test only to be interpreted > > > as large positive later... > > > > > > Details, please. > > > > I can continue to dig more, but it is easy for me to reproduce this. > > On the stack is elf_core_dump() and it seems like we're getting a core > > dump of the chrome process. So I just arbitrarily look for the chrome > > GPU process: > > > > $ ps aux | grep gpu-process > > chronos 2075 3.0 1.1 34075552 95372 ? S > /opt/google/chrome/chrome --type=3Dgpu-process ... > > > > Then I send it a quit: > > > > $ kill -quit 2075 > > > > I added some printouts for this allocation and there are a ton. Here's > > all of them, some of which are over 256K: > > 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=3D17474, size=3D16, core_note_type=3D1029 [ 45.884809] DOUG: Allocating 8768 bytes, n=3D548, size=3D16, core_note_t= ype=3D1035 [ 45.893958] DOUG: Allocating 65552 bytes, n=3D4097, size=3D16, core_note_type=3D1036 -Doug