Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1225778lqt; Tue, 19 Mar 2024 17:41:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXTLpaYXEtl1/6ohCU4thWqDsDky2tSdvtgLjz7kPCo6nnfXZOjtdgmeD3Ga4oGZfynBschZrl+lTXlJTnjLKhSFPQNilZo8N89my7ARQ== X-Google-Smtp-Source: AGHT+IFVk1yXeu5AsKbTIki4dICcHIKS6p7e/C9fBl6X1zzZAmQmPXjvGSTrlWLqYVjH5yYDnuFn X-Received: by 2002:a05:6870:a414:b0:21e:8afd:65d0 with SMTP id m20-20020a056870a41400b0021e8afd65d0mr17303572oal.52.1710895314608; Tue, 19 Mar 2024 17:41:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710895314; cv=pass; d=google.com; s=arc-20160816; b=aRnMKybdjGpSEZj0yXiM/+qnzK5KclfyhCWw7Sym4xpP+tc6+zB7OYB/2qymrQx6BP liKgQyhz4UxOXMiLTJOkaWwztnIL3LGGX/xHBW2ozr3X7SLykna2Y85ic9D/GfvipMb+ aGzuZMgM7hcISw2bOfFr1JGR1MasSB3iRnwu1u3zQ0UV4vK7ICUMVRkuyvLs2FTmqySd NLZLsZg1aQaS1Q9UZDqUY4EeTPyioK7mT+n1jbiGs1llo88kdtGQoZyuUHd+xnCITl8f GESLoTx6XEgF/kr940sCuhCr0djZPqagnqiKdhVG1fcli0dOtoWlOrnqvs5MgYEqOdnG Y42Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=EZfUfrj5viWlxULtRklV9dDOedx42RoHBTaefrus1wE=; fh=51iOSiMy7EQqljLDXLkeBgzt7ahLRcy+u1E50n3STos=; b=Hg7GU0WKL5LlVPjTVxP9V0axTvM0LlOntOg2WH7Rwu6mmSUhfalOqCaHVnCNsrBAZR G0GKgcswNqt7iOMZwbhuSNP1nYYBm0ayWf17P645jA3oLQGaVHMdkmYBmJaJHMMCfJpU Xz5xPWa0LedVnG+nTZ1ivHLUSuO28QCKXBGHzVDrVTMNeEFBETqtcl25Pr/5/G7l234E DwdYlg/OviVnVR8RT08+5nb5y48npVTLDZ4xeR2l5xX6lS2250b7j+e/VnlxD4Q3sC6Q YoRLSTS4FIY9cCGHHx0bQ5Ftc6yHuGxh88uTpK41pyqxHLn0h+V6h3pyknxbO74wvWii 8tSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-108273-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108273-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t20-20020a056a00139400b006e6b6700b09si1400561pfg.238.2024.03.19.17.41.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 17:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108273-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-108273-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108273-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4685C282293 for ; Wed, 20 Mar 2024 00:41:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACE21EBE; Wed, 20 Mar 2024 00:41:50 +0000 (UTC) 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 212EA4C7E; Wed, 20 Mar 2024 00:41:49 +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=1710895310; cv=none; b=aPuzcQqELS4/8bxoerH/piexXK28VNweC5ooAoAw4ptT2/Da7axFQLfnIePoj5vCMx5H+pwvsNNNj6c2Nkqn6mEJ7HRCzgkgSGgpj5sYyMcSjPdkHaf5GWm1X/ue02O2LHaJku6QBK2baGkhVhVQFJbX5LAKxzjqqJH9F6a6QeM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710895310; c=relaxed/simple; bh=ajojewtS5GOwYcGGsxv3U2sYM7eoNoLJkIimpLEMk7k=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LT2hN8FjCHqGayNtmxp2lqAfmDDEMQrIwWq46tjLrFjECqj+HmNqf3Aj/YqprObr0DYuL+Hn+eE0oZq88tROdFZcGY+Vo0y7kcn1IKaWfxaXJujRc0zZZzC2upAmv7+voyRd4xRbpgLagYD9mUZBOoyjuxhamDiPG5ebWI0UsWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A464C433F1; Wed, 20 Mar 2024 00:41:47 +0000 (UTC) Date: Tue, 19 Mar 2024 20:44:10 -0400 From: Steven Rostedt To: Kees Cook Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Joel Fernandes , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Vincent Donnefort , Daniel Bristot de Oliveira , Ingo Molnar , Peter Zijlstra , suleiman@google.com, Thomas Gleixner , Vineeth Pillai , Youssef Esmat , Beau Belgrave , Alexander Graf , Baoquan He , Borislav Petkov , "Paul E. McKenney" , David Howells Subject: Re: [PATCH 0/8] tracing: Persistent traces across a reboot or crash Message-ID: <20240319204410.6cb9842b@gandalf.local.home> In-Reply-To: <202403091234.DE25C77028@keescook> References: <20240306015910.766510873@goodmis.org> <202403091016.5CDF0E2EE@keescook> <20240309135116.40f65cee@rorschach.local.home> <202403091234.DE25C77028@keescook> X-Mailer: Claws Mail 3.19.1 (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 Sat, 9 Mar 2024 12:40:51 -0800 Kees Cook wrote: > The part I'd like to get wired up sanely is having pstore find the > nvdimm area automatically, but it never quite happened: > https://lore.kernel.org/lkml/CAGXu5jLtmb3qinZnX3rScUJLUFdf+pRDVPjy=CS4KUtW9tLHtw@mail.gmail.com/ The automatic detection is what I'm looking for. > > > Thanks for the info. We use pstore on ChromeOS, but it is currently > > restricted to 1MB which is too small for the tracing buffers. From what > > I understand, it's also in a specific location where there's only 1MB > > available for contiguous memory. > > That's the area that is specifically hardware backed with persistent > RAM. > > > I'm looking at finding a way to get consistent memory outside that > > range. That's what I'll be doing next week ;-) > > > > But this code was just to see if I could get a single contiguous range > > of memory mapped to ftrace, and this patch set does exactly that. > > Well, please take a look at pstore. It should be able to do everything > you mention already; it just needs a way to define multiple regions if > you want to use an area outside of the persistent ram area defined by > Chrome OS's platform driver. I'm not exactly sure how to use pstore here. At boot up I just need some consistent memory reserved for the tracing buffer. It just needs to be the same location at every boot up. I don't need a front end. If you mean a way to access it from user space. The front end is the tracefs directory, as I need all the features that the tracefs directory gives. I'm going to look to see how pstore is set up in ChromeOS and see if I can use whatever it does to allocate another location. -- Steve