From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E1B7C4828D for ; Fri, 2 Feb 2024 03:16:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3414B6B0075; Thu, 1 Feb 2024 22:16:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F11C6B0078; Thu, 1 Feb 2024 22:16:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1920C6B007B; Thu, 1 Feb 2024 22:16:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 094CC6B0075 for ; Thu, 1 Feb 2024 22:16:12 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8B2F9140609 for ; Fri, 2 Feb 2024 03:16:11 +0000 (UTC) X-FDA: 81745400142.18.F04D2BF Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by imf13.hostedemail.com (Postfix) with ESMTP id 7CD8B20008 for ; Fri, 2 Feb 2024 03:16:09 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="d/VrP0Wp"; spf=pass (imf13.hostedemail.com: domain of dianders@chromium.org designates 209.85.218.41 as permitted sender) smtp.mailfrom=dianders@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706843769; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nr60hQses4C7qPIpWX7Pk8oBCIoPSvq+zV4pLC1HFKM=; b=J/LHBRNWU1+eM9h4rnvmHbg0GznE4NkQWu0e359MXZVzn+vTOq9CL9PdL1+z9lpOZ6BP5J 7Dnbv6u8ol7RDSt2jgC0vjRAHmUXLqb/vc9tF6ChPzuF0EEf5bAQUzBsGKoManimheKygg sd5dZkN9w4d3NnFBXQQGPBKNg/dpcdM= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="d/VrP0Wp"; spf=pass (imf13.hostedemail.com: domain of dianders@chromium.org designates 209.85.218.41 as permitted sender) smtp.mailfrom=dianders@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706843769; a=rsa-sha256; cv=none; b=zWkcSqPuStVS8bGgN0sD7iJ9dFmwcwMGWl3hVsHGmZtyBHavH5QiRS6HXa2zhd4EmaPY6O EpnyLtiH8AWMfTaCVuP8xPKVrq8N39zGzh2xS25sWfy1GyFqX+gO/KBvApFkZ18W+CnDth cy4lYIHaBHSNHcBOpd8NxeBfi6uDZKo= Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a364b5c5c19so272088766b.1 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=kvack.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=d/VrP0WpwtJ2V4rZ+Fh0MUHWX9LoixHzLGgBOIKqGds3W3V6WI5VARiQ+ooVnL3RLw R7BV0cxQWj3EzQAGAw4mmB3NLDXC6A1xhQKHfxrGO29nAFaToiHRpvnTkPVQh0eSJ8Re 9rx2f3dDvhTOZ0jrRzJ5+99zq8eK9+r1eHR9I= 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=Hh0n+VPs/UpwZ5kIgeKb42ImABAJDJ4Efihe7LlENntxOBh2bVGbRJTha2krxl9QYT CECKGMOR9t/fMEBM7JUGCEtux4ynecRW8kFbyJeeCP8pThGE02hLpUuNHUGjS8nQXiEM HBVDu4fk2Uu0svzI7s2XLwBajzLg+5W5ZwdROgfgdDCqlbAUtYtPjmnWsTNs8hRjg1SV H90Cw0ZaYg7aPMRc7Ise4SEcHuPtrSg2BgG+tCBmBTfQlnjKqAOOyCniLG4dLg1Y0UrS FzyX/C8AhcTpPxLDgFjdEeOMGpAl9t+SLx69JYW+RgO5IaCDh7d8u0g+CE5ing40Q9aF ukvQ== X-Gm-Message-State: AOJu0Yy9frmbrOIEnd89HrNo6RfB1DyKVwzYYU1Ay917+SKRCCXF5wXe oLH0gSL+gSvebIGosWEZRPS5Eike8r3Jtpy6yJqfYJb6UIU0uT9+3o7DabQGDzcUOZejGcmWbsP zDbhS X-Google-Smtp-Source: AGHT+IHgQG9dvjlOB/BmB4/EkSlHAVc9T8V4qXetoG/6BTLHMxWRjAI+sAVzqFZTDdNzgPaaTIulLg== X-Received: by 2002:a17:906:2e87:b0:a30:dfa9:87ba with SMTP id o7-20020a1709062e8700b00a30dfa987bamr5090319eji.53.1706843766944; Thu, 01 Feb 2024 19:16:06 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVdZHs0OfSemiuk53O1aSA4ADR7S5awHlcOEu+QtwCCG6t23/CC4VC9M4RLRbFfsxkSb0+ovfnzoiwO6KB64wUgSZ4= Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44]) by smtp.gmail.com with ESMTPSA id ks25-20020a170906f85900b00a35cb514aaesm406257ejb.82.2024.02.01.19.16.05 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-55f5d62d024so2986a12.1 for ; Thu, 01 Feb 2024 19:16:05 -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) 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 X-Rspamd-Queue-Id: 7CD8B20008 X-Rspam-User: X-Stat-Signature: hyuikwi1768wfwz4uatdomjbhzn3xocg X-Rspamd-Server: rspam01 X-HE-Tag: 1706843769-723552 X-HE-Meta: U2FsdGVkX1/P6Zgg1/6aYm/Kg7URP1evsZq2c82IbtV4iFy1lmGEyyMPO/YfLJkFCkik+xcMTZhDZM5DgwxtX4KYivn0LLTOWLqGD1mktTauve1D/InZF0yECIjvuoSO/g83y8bwmsyi16wiwlU0V/9jx114JeTruFpcRwopy+VqCGZX6QbEjWs5Cphiqjzr9Jnl0qL/ixGMSOt0GyE/Ao5BZo/+Il73QTbhnf+s5cz3xN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3kPIiRwl8WDGiwyn+k45wCgC/XFQ66cexJmcyWpcFsCud354Eo1YkNOvw/4mwVTh5TnKE+rsL8AjCNjypdqvyS X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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