From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 2D5B336C9EB for ; Fri, 12 Jun 2026 18:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781290307; cv=none; b=rhTBcPOLO01OmEdogyBte7YzS3eI2RXUwNKOs4UpNWlOAUBzzCYV5l8Phfv+kD7LqstmNtC3Xtm8Rcoymi6gaUAvWMm54p3kBXO0S2YYz2TkFBTMXYm0pdGStSC07hvn/N3f54pa2+LFn3WGfSHoVI6b1/PfT+XBltpRBrw8uZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781290307; c=relaxed/simple; bh=UVZnS+cxrUgk09IfSFs4XQu3BwQJa5EZDtbMkhqj+Ik=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mtqYYXqJFhJH59j+pr4aDfLKlusUZ9JHGxJrFFP/jX7Z6D38k9Rrkn0qBEO0Ol4GgNkvGv99Un0t77Ikw/QcmJlRZJ0aur577pmPKSQu4lQArXeLimpz9QI+zvLDUUOgGKOCWMzl6aewfaZNKizeQj1D7iQrK2vHCxXk/J8WdmU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=McIzn+iX; arc=none smtp.client-ip=209.85.219.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="McIzn+iX" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-8ccef25789fso10335276d6.3 for ; Fri, 12 Jun 2026 11:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1781290305; x=1781895105; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=4fdlV1svnoMA4warxZ5zK3ylIeyyzAc6d3U562SAKBc=; b=McIzn+iX5lFLHwb08mWgHxkXZs9m6+GCc0PqKBx3IbbWuGR2kc3qS/B5DJv42A66le kyDW0+3iv2jgdVKjMDRCknD2oZUJRSBGM2JjFYpskhKWIFwSkburBXhArWoDFIVqMWfU a7Tgnx5chg0c8rr+X1dOmmGao5vFRSFq8gFs8wWsxGWfGe/VGeZ5RCzlOtIojS82u5F8 IHwXRP/7uuQjAmUAnH+RlOK9LqNOwKdxvCw+D8FgnKkJsqK9DCLvpElU06qaZn4g3wgT UP4+yMvJw9cGSp/zBHbhB4KGpKpqf2XNcbfmR+mh87e70K8VErjJjJvdGEMurHZDGZL2 DcKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781290305; x=1781895105; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4fdlV1svnoMA4warxZ5zK3ylIeyyzAc6d3U562SAKBc=; b=YeUmTeZDj/7our8muzOifynTLTkd5GSFcIWWe3L68/sHtKxVvMp6V6zBj8hsGLdwqY ACZch8pG9g7jRFYMp2aZ7SKfjzTbUk0xQN6N6K3WmXkBNlA2CKJO3QgnINr+PCBRDx4K SqX0OuURPxXqOnYMDOsUq2XXUelY9kg9m7in7IpIox+im9hJdTxDhc4E/2WLZN5I34UN SxTrKhHCEDU6kFBO4vL9JqWMGovTrlbv52IAylRZ7nESWIdH8u9ROQoOZSiLxmETuK8Z vkPEbS/A4cpTfdSq862g0ERH9MEFLc0dFUwWNDKQYGKtNL9oLeqdBoi5NEp6G/7oGBO1 lUAQ== X-Forwarded-Encrypted: i=1; AFNElJ/8zb7Dz5NyY1NUo4TqlIynpPJMdUfjtPwiIAshqXmHW9bZF/yov2IWR90oy0Z71fe+FmyH4EFYjnX7UQY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+OFzKIirPiLRvHRseU2UarDgTJgGv+TaaWcVEJHYR4+tjRcmU O8sJKPSekYs03lvMtf/0ygJhm8MN8nkYDgdtmv9mBZBmyF7zQc58FPrPcJIJHBX8LyA= X-Gm-Gg: Acq92OFNtCHzRwRUYUHz8XJ7RzYooL7UxiHMS51D+7zJDpsw4wK6TZfoh/aafn0FTCl ZLuyFayhLJbJ0gqobwkGZkIQmyAIPcCy8eEGX0Op1+lZJ6DJG+ijEKWtQwErMj7EpPyHlyrLO2q xWGKjmuupA3PnhAiONKNskPTWqKmX6+5qsRhTG0riegrX3hw0oQTTRS68bIbNSuzi045dzGGAl1 YyxKXQ4CY8ZiEU6O22tNMInyIVPwWhcZjr+pcEh5VNgeX+8zumXUTHIUgbrah70vuvje504fTOs hxNxbgBAV3h3lPPV1nQZeKnxv+d0riZsUQLVc1FGKoEBo64ZRY9MYllPzLbZL3DqX3bXeUZMgcJ PHdxXWaZqRRSlOfsfWkc50891JUd1SMtA1A/fEu48qzcEGbusbG2I1Ma/Hi4qSYtshTO7EnwD6/ 80OZHX7Uc88JOriSiquKAxJMEzfOQwJhScU9gWXQnY+uhTnuG0QmI= X-Received: by 2002:ad4:5d6f:0:b0:8ce:c19a:3f03 with SMTP id 6a1803df08f44-8d32c010a68mr65033106d6.10.1781290305055; Fri, 12 Jun 2026 11:51:45 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8d2fdc9e3cesm31734306d6.0.2026.06.12.11.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2026 11:51:44 -0700 (PDT) Date: Fri, 12 Jun 2026 18:51:43 +0000 From: Pasha Tatashin To: =?utf-8?B?TWljaGHFgiBDxYJhcGnFhHNraQ==?= Cc: Pasha Tatashin , Mike Rapoport , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Pratyush Yadav , Alexander Graf , linux-kernel@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [PATCH v2] pstore: add a KHO backend Message-ID: References: <20260605121040.1177072-1-mclapinski@google.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 06-12 20:49, Michał Cłapiński wrote: > On Fri, Jun 12, 2026 at 8:38 PM Pasha Tatashin > wrote: > > > > On 06-12 19:57, Michał Cłapiński wrote: > > > On Fri, Jun 12, 2026 at 7:21 PM Pasha Tatashin > > > wrote: > > > > > > > > On 06-12 17:42, Mike Rapoport wrote: > > > > > Hi, > > > > > > > > > > On Fri, Jun 05, 2026 at 02:10:40PM +0200, Michal Clapinski wrote: > > > > > > Up to this point to preserve late shutdown logs in memory, users had to > > > > > > predefine a memory region using ramoops. This commit changes this by > > > > > > preserving a buffer using kexec-handover. > > > > > > > > > > > > pstore_kho supports preserving only 1 dmesg buffer. > > > > > > It gets replaced with the new buffer on every kexec, so the user has to > > > > > > copy the file out of pstore after every kexec. > > > > > > There is no erase() support. > > > > > > > > > > Sorry I didn't jump at v1. > > > > > > > > > > pstore does not really need a KHO backend. It can use ram backend with > > > > > reserve_mem and reserve_mem can be preserved with KHO already. > > > > > > > > I just tested it, and it works well, I think it would be fine for > > > > Google's requirements: > > > > > > > > CONFIG_PSTORE=y > > > > CONFIG_PSTORE_RAM=y > > > > CONFIG_PSTORE_CONSOLE=y > > > > > > Is it common to write to this console? I think what I typically see in > > > the console are error logs that are also in dmesg, so if I preserve > > > console logs and dmesg I just have 2 files where one is a subset of > > > lines from the other. > > > > We need either your KHO backend, or the following patch: > > https://lore.kernel.org/all/20260612172623.1218280-1-pasha.tatashin@soleen.com/ > > > > We need all dmesg messages. > > We get all of the dmesg messages if you compile with > > CONFIG_PSTORE=y > CONFIG_PSTORE_RAM=y Ah awesome, thanks! My patch is not needed, I will reply to it. Pasha > > and the cmdline: > reserve_mem=2M:2M:dmesg_buffer ramoops.mem_name=dmesg_buffer > ramoops.max_reason=5 ramoops.console_size=0 > ramoops.record_size=2097152 ramoops.ftrace_size=0 ramoops.pmsg_size=0 > (the diff between yours and mine is I set console_size to 0 and > record_size to 2M, you do it the other way round). > > Dmesg is kept in "record_size". We don't need to preserve the console > at all (unless there is something in console that isn't in dmesg but > I've never seen that). > > > > > > > > With the following parameters: > > > > 'reserve_mem=2M:2M:dmesg_buffer ramoops.mem_name=dmesg_buffer ramoops.max_reason=5 ramoops.console_size=2097152 ramoops.record_size=0 ramoops.ftrace_size=0 ramoops.pmsg_size=0' > > > > > > > > KHO preserves pstore properly. However, we need one patch that would > > > > allow for ramoops console to capture the output even when quiet is > > > > provided. > > > > > > > > Pasha