From: pso@chromium.org
To: LKML <linux-kernel@vger.kernel.org>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Kees Cook <keescook@chromium.org>,
Dmitry Torokhov <dtor@chromium.org>,
Paramjit Oberoi <psoberoi@google.com>,
Paramjit Oberoi <pso@chromium.org>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>
Subject: [PATCH 1/1] pstore/ram: Ensure stable pmsg address with per-CPU ftrace buffers
Date: Tue, 11 Oct 2022 11:36:31 -0700 [thread overview]
Message-ID: <20221011113511.1.I1cf52674cd85d07b300fe3fff3ad6ce830304bb6@changeid> (raw)
In-Reply-To: <20221011183630.3113666-1-pso@chromium.org>
From: Paramjit Oberoi <psoberoi@google.com>
When allocating ftrace pstore zones, there may be space left over at the
end of the region. The paddr pointer needs to be advanced to account for
this so that the next region (pmsg) ends up at the correct location.
Signed-off-by: Paramjit Oberoi <pso@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Paramjit Oberoi <psoberoi@google.com>
---
fs/pstore/ram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index fefe3d391d3af..3bca6cd34c02a 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -554,10 +554,12 @@ static int ramoops_init_przs(const char *name,
goto fail;
}
*paddr += zone_sz;
+ mem_sz -= zone_sz;
prz_ar[i]->type = pstore_name_to_type(name);
}
*przs = prz_ar;
+ *paddr += mem_sz;
return 0;
fail:
--
2.38.0.rc1.362.ged0d419d3c-goog
next prev parent reply other threads:[~2022-10-11 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 18:36 [PATCH 0/1] pstore/ram: Ensure stable pmsg address with per-CPU ftrace buffers pso
2022-10-11 18:36 ` pso [this message]
2022-10-11 19:38 ` [PATCH 1/1] " Kees Cook
[not found] ` <CAHqLn7Hd6KaNYA=goS7=dumrG3wZedbV1+ANa+-dZzFPiP_vsQ@mail.gmail.com>
2022-10-11 20:04 ` Kees Cook
[not found] ` <CAHqLn7EG=iKmu1tMJ_Um4MmpLVztshfzACnrzcZqPvvcRRCKuQ@mail.gmail.com>
2022-10-11 22:22 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221011113511.1.I1cf52674cd85d07b300fe3fff3ad6ce830304bb6@changeid \
--to=pso@chromium.org \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=dtor@chromium.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=psoberoi@google.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).