public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: pso@chromium.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dtor@chromium.org>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH] pstore/ram: Fix pmsg address when per-cpu ftrace buffers are enabled
Date: Thu, 26 May 2022 14:47:26 -0700	[thread overview]
Message-ID: <Yo/1btY2tKiDDCle@google.com> (raw)
In-Reply-To: <20220525151809.1.I43128ef59eb08247ec093f8b19d05aa91f721afb@changeid>

On Wed, May 25, 2022 at 03:18:55PM -0700, pso@chromium.org wrote:
> From: Paramjit Oberoi <pso@chromium.org>
> 
> 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>

This looks correct to me.

Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.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.36.1.124.g0e6072fb45-goog
> 

Thanks.

-- 
Dmitry

      reply	other threads:[~2022-05-26 21:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 22:18 [PATCH] pstore/ram: Fix pmsg address when per-cpu ftrace buffers are enabled pso
2022-05-26 21:47 ` Dmitry Torokhov [this message]

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=Yo/1btY2tKiDDCle@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=dtor@chromium.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pso@chromium.org \
    --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