Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp77509lqp; Tue, 11 Jun 2024 15:31:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdrsLzGqJzmPrPNIIDy3skA129qwfNPArg5+ZcEgGFIoLlqrnuuYDguTsONX6oiumxWzl5My+fGGhrFnMQgd2DPkzhLEORfInJmeWKqQ== X-Google-Smtp-Source: AGHT+IGqnu0kPnx7VeaLwSzjlMwbJvumJeVHHH/nHVxiEGn7b3CUMBFS42XBOAqgzx5rbDdxKO3j X-Received: by 2002:a17:906:f0c5:b0:a6f:37b7:52f1 with SMTP id a640c23a62f3a-a6f47c7d9b8mr4171966b.14.1718145071322; Tue, 11 Jun 2024 15:31:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718145071; cv=pass; d=google.com; s=arc-20160816; b=Hv6pbemAGyNmEFyF6KcAINTJ84WqylNTrJcijPJKsk6qj/3na3+UI03LVuheIh4KRU hvn+Ke/hZ1nSh1aeA1NWPUha2mn/QT1FbZFvIh01hk6ZpHBKRgP/60ZaOWuk5gKCkHRw 4L4QblhQpcOkNOjCidGJekJa4QA6JxxDi4XsTjDX1DAIMFzW4aOwjn7YLY747mUnAW/T JOxN8p0RVQhIMM4+n05J7/FfhTUlgXxxeV4oj+xBG47yaaVUAGq1P7km1z514JKovkqQ hiBkrODUadgk49d15EHZQjjul1HSocitrYwkxDlww/iHmSuQ7Xt40oUgjnnSChYx1/e/ fTqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=ok2MKULO7j+R803Dv0pCyxD0Tsi34X/FMLE9fjFYjwM=; fh=afHPGF9vLSEFjouS/tHcTvl5ueugue6kQh7ueEKwBLE=; b=UFkW2Ytt2dP4RglgPNRSLFc+Yar5Un/odZPI0ee2weyCE4Qt4JQ/hVaSxmQWSjz+rs iI+Qov8D5g6RS+qDpyicle4jH7BeSGqdKkQ4k4SNS/XKUNXkmwfFidIIDfBJoZC7iEun CC12MPQ8pOzCOu3xYnE+AOI7pQEtT+/Lc6ZuaRFBjgd97X+wsf6NRt1BowiQUvcH7sVq iUWGwObjvGDV4sF+QtW4kH+NTBknv/MBOC76MZIfjfQZ927y7VO8+3IqgGqRqN1g5DI9 e7Ggoqeucm4kOBBzO6kaD7XFXNJk8ST7/d40ZmfKuopCG1ptwWPcvJ3jckY1z7Mxnul/ keLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XFW4sFsl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210666-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f116dc86esi327591666b.788.2024.06.11.15.31.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 15:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210666-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=@gmail.com header.s=20230601 header.b=XFW4sFsl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-210666-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210666-linux.lists.archive=gmail.com@vger.kernel.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 D712A1F251BA for ; Tue, 11 Jun 2024 22:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A54FC15573C; Tue, 11 Jun 2024 22:30:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XFW4sFsl" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (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 0AAD2155323; Tue, 11 Jun 2024 22:30:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718145055; cv=none; b=DUGI5FfszJoKVJBwiJKr7D5lBFQfMhHnmWr25wN+vyr/6rspi05HVFNrc+RUMEh//+ffHvR8PlnAmMZbmoEROltJEPqiIAk8ZIGzlPn5QIQdeLyZEXwee6ZAHcMXwg7k6WmmeacLHp1A+fra5Ydz+l+sFGR2KzNaABZF8a8kXwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718145055; c=relaxed/simple; bh=v7Eu8b2RCHal5BXVjZ9R+lgux523O4WrZatSWiPWOUk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lP2sqpJ6om8z7nDwvB45mcYA7rytK7KNmQLvBLFvFvb9KdlMPl4vrlAA1P4kYXYqxRgkJOhs+tFyvHzmgxSW1OJTOaRJWNhDIvkcAHcbsX4G4v0FbSKCNhVry9ALrXBo1jgPEmT/2UQusOJ4LCXcEGIr2ZdRDazl63n6np5/FZs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XFW4sFsl; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-7041ed475acso3365159b3a.2; Tue, 11 Jun 2024 15:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718145053; x=1718749853; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=ok2MKULO7j+R803Dv0pCyxD0Tsi34X/FMLE9fjFYjwM=; b=XFW4sFslK4ogTo+slAwX4LmXTk5wblJwqvzeClBN3pshDXDj8SzU75YFV5VvlYJR+L a3HtPiARaKEbH2zE5CZs1GtdMhiPkf1atSqkMZVT+bXX9zeyluKPO4cqbgMaC7G3XX/t 7iwlUJ2xN1XISlrGbWfqBtUo7yoWym9xguODq57ABUoaASb8sl64MpCzw4ndlqTcZnvd rc2SeuTM+egEpxwbqd3IZ3E2PO6h+nLISY6frTA64kpcGkyX21NXA09aD8Cf3pp9j+Or 4IdfFaF9itD18onaej5Q4Ey3YKZz5HmgVNKCMbs/F5n8qFggCMdryqCnTxivLpodHIap 15mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718145053; x=1718749853; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ok2MKULO7j+R803Dv0pCyxD0Tsi34X/FMLE9fjFYjwM=; b=YGzzoorH4Q7AmYQwLNS4ple2EG7H/X5d9O2gj7fAeg8CXmKPqQLKPfM3u27kmwfri+ hE763cYYlydX5/SHUPjyIy/bfvCWy62rp/fMC+HzzzlbxoBp9ekBuyiSUHQrl1jl5DgL iB1v3pEOI1/MG73VjR56oUSQvoxG1etQttd74Cjwa75xzRg8ESQS+E5vqzP19VWu2nhY gEoIK0S++gXuuWKOkHMjamJLT0FigKrSx3wW/bbcsi+FEVkYNbcMBVPDbxVbfAX3fG2J PSF+e5rJ0k6E3rTMmXkhNA57rH9s7yoJhvO05qiPX/DZRz94Zb45GGe46usg7ZTcpOCS Qz8A== X-Forwarded-Encrypted: i=1; AJvYcCXlyTa20QiEjvgXh1/VwzaPit1qdhnh4ULOJZdf7dXb7+ZWINDD3kO+T5SEcfmI1c8EyY9Z850xFiNnGJPwZReisyF0PKTG8CfhcnB/5OxphBQTVfI5QolxYzp26vOsaNIStQd1Fcx8NW4FKfw6L+t+velgAhT5myz8kXGBCPWie7No43zD30SSDSl9nOUaadZb X-Gm-Message-State: AOJu0YzIF7WSSKyqPF7Qa7bMNjypY5swn1RjG41o5tbn8tR74PvVBzwd JenqgpUHexPfvwfT0XtB7z/wzo7ly4kboGAoxDJugPOPU4/6K0VU X-Received: by 2002:a05:6a20:8402:b0:1b5:8d94:907a with SMTP id adf61e73a8af0-1b8a9b9e15amr308855637.14.1718145053070; Tue, 11 Jun 2024 15:30:53 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7042b71ef12sm6050678b3a.44.2024.06.11.15.30.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Jun 2024 15:30:52 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Tue, 11 Jun 2024 15:30:50 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] pstore/ramoops: Add ramoops.mem_name= command line option To: Steven Rostedt , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org, Ross Zwisler , wklin@google.com, Vineeth Remanan Pillai , Joel Fernandes , Suleiman Souhlal , Linus Torvalds , Catalin Marinas , Will Deacon , Ard Biesheuvel , Mike Rapoport References: <20240611215610.548854415@goodmis.org> <20240611215801.605742243@goodmis.org> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkR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+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240611215801.605742243@goodmis.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/11/24 14:56, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Add a method to find a region specified by reserve_mem=nn:align:name for > ramoops. Adding a kernel command line parameter: > > reserve_mem=12M:4096:oops ramoops.mem_name=oops > > Will use the size and location defined by the memmap parameter where it > finds the memory and labels it "oops". The "oops" in the ramoops option > is used to search for it. > > This allows for arbitrary RAM to be used for ramoops if it is known that > the memory is not cleared on kernel crashes or soft reboots. > > Signed-off-by: Steven Rostedt (Google) Reviewed-by: Guenter Roeck > --- > Changes since v3: https://lore.kernel.org/linux-trace-kernel/20240606150316.916395285@goodmis.org > > - Change type of start and size to phys_addr_t > > fs/pstore/ram.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c > index b1a455f42e93..4311fcbc84f2 100644 > --- a/fs/pstore/ram.c > +++ b/fs/pstore/ram.c > @@ -50,6 +50,10 @@ module_param_hw(mem_address, ullong, other, 0400); > MODULE_PARM_DESC(mem_address, > "start of reserved RAM used to store oops/panic logs"); > > +static char *mem_name; > +module_param_named(mem_name, mem_name, charp, 0400); > +MODULE_PARM_DESC(mem_name, "name of kernel param that holds addr"); > + > static ulong mem_size; > module_param(mem_size, ulong, 0400); > MODULE_PARM_DESC(mem_size, > @@ -914,6 +918,16 @@ static void __init ramoops_register_dummy(void) > { > struct ramoops_platform_data pdata; > > + if (mem_name) { > + phys_addr_t start; > + phys_addr_t size; > + > + if (reserve_mem_find_by_name(mem_name, &start, &size)) { > + mem_address = start; > + mem_size = size; > + } > + } > + > /* > * Prepare a dummy platform data structure to carry the module > * parameters. If mem_size isn't set, then there are no module