From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 39C7326F46F for ; Mon, 17 Nov 2025 17:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763401335; cv=none; b=TuCOqwfuOyQhVDcnsYgAy8BijpvpEPj+3WXoyoo31/WE/bHtT8XP1YPA1Xsl/O2/0pnE2VpOGk0I6hWeuSQxVhDWXEkIo01MUZwPoCdq8NuDwpCh2WunOQorwrvjQWSlvGBE0+WAnWPyW5DS6pCwMwI364iP3Vqvdt9+aF4aijE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763401335; c=relaxed/simple; bh=w0p1v++RTpuyBAjT0eUWhhxTf67ilWlrGRyoUiKT4a4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Dny5kQbX3oK2xYT8g3tg9T3uyV1ovcUQpFh8rvN6R3diXrog3/RAgfzT2rGJ7PMcfYRXKhE54nlQs9RA6lEEobHFqV16jIe2MoRbSw+BAtfmb91+bZ+EM0IVhdegB5g985GWo7TJTXdxnRH/Pc0KfV6kagluyse12SatKZzOs1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=DQoXvktm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="DQoXvktm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5508DC2BC86; Mon, 17 Nov 2025 17:42:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1763401334; bh=w0p1v++RTpuyBAjT0eUWhhxTf67ilWlrGRyoUiKT4a4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DQoXvktmxAfHjyepWEkf5wYROY3GpQZtVzvErgZ/AJQSG7rh1jsQznTG7YG2Q3RHC bupEyUy+IQIVzIsm/v6tS8YHFuEDcXkb4xmOZZTGkw2MZIGsRhKxLj+Z4JzNHd4y8C iuT1falMSc5bBEIunhrDSUIPbV14qD+H/leqNoa0= Date: Mon, 17 Nov 2025 09:42:11 -0800 From: Andrew Morton To: Sourabh Jain Cc: linux-kernel@vger.kernel.org, Aditya Gupta , Baoquan he , Dave Young , Hari Bathini , Jiri Bohac , Madhavan Srinivasan , Mahesh J Salgaonkar , Pingfan Liu , "Ritesh Harjani (IBM)" , Shivang Upadhyay , Vivek Goyal , linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org Subject: Re: [PATCH v5] crash: export crashkernel CMA reservation to userspace Message-Id: <20251117094211.f8b4426ddda3bc0db5a62624@linux-foundation.org> In-Reply-To: <20251117041905.1277801-1-sourabhjain@linux.ibm.com> References: <20251117041905.1277801-1-sourabhjain@linux.ibm.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Mon, 17 Nov 2025 09:49:05 +0530 Sourabh Jain wrote: > Add a sysfs entry /sys/kernel/kexec/crash_cma_ranges to expose all > CMA crashkernel ranges. > > This allows userspace tools configuring kdump to determine how much > memory is reserved for crashkernel. If CMA is used, tools can warn > users when attempting to capture user pages with CMA reservation. > > The new sysfs hold the CMA ranges in below format: > > cat /sys/kernel/kexec/crash_cma_ranges > 100000000-10c7fffff > > There are already four kexec and kdump sysfs entries under /sys/kernel. > Adding more entries there would clutter the directory. To avoid this, > the new crash_cma_ranges sysfs entry is placed in a new kexec node under > /sys/kernel/. I suggest not creating /sys/kernel/kexec in this patch. Moving everything into a new /sys/kernel/kexec is a separate patchset and a separate concept and it might never be merged - it changes ABI! So let's put crash_cma_ranges in /sys/kernel and move it to /sys/kernel/kexec within the other patchset.