mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yuxiao Zhang <yuxiaozh.zhang@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Yuxiao Zhang <yuxiaozhang@google.com>,
	keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com,
	linux-hardening@vger.kernel.org,
	William Kennington <wak@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: support pmsg record size larger than kmalloc limitation
Date: Tue, 27 Jun 2023 13:28:11 -0700	[thread overview]
Message-ID: <D4435632-785B-43AC-AE21-EC9797458F42@gmail.com> (raw)
In-Reply-To: <2023062702-frosty-winking-9257@gregkh>

Thanks for the pointer, the document is very helpful. Seems that I cannot use gmail to send patches. I sent it again by git send-email. I also tested myself that the patch is well-formatted. Hopefully this time it works.

> On Jun 27, 2023, at 10:35 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> On Tue, Jun 27, 2023 at 10:05:04AM -0700, Yuxiao Zhang wrote:
>>  kfree(record->priv);
>>  kfree(record);
>>  if (rc != -EEXIST || !quiet)
>> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
>> index ade66dbe5f39..296465b14fa9 100644
>> --- a/fs/pstore/ram.c
>> +++ b/fs/pstore/ram.c
>> @@ -20,6 +20,7 @@
>> #include <linux/compiler.h>
>> #include <linux/of.h>
>> #include <linux/of_address.h>
>> +#include <linux/mm.h>
>> 
>> #include "internal.h"
>> #include "ram_internal.h"
>> @@ -268,7 +269,7 @@ static ssize_t ramoops_pstore_read(struct
>> pstore_record *record)
>>  /* ECC correction notice */
>>  record->ecc_notice_size = persistent_ram_ecc_string(prz, NULL, 0);
>> 
>> - record->buf = kmalloc(size + record->ecc_notice_size + 1, GFP_KERNEL);
>> + record->buf = kvmalloc(size + record->ecc_notice_size + 1, GFP_KERNEL);
>>  if (record->buf == NULL) {
>>  size = -ENOMEM;
>>  goto out;
> 
> Please try emailing a patch to yourself and see if you can apply it
> afterwards.  The kernel documentation has a section for how to handle
> email clients, perhaps you should read it?
> 
> thanks,
> 
> greg k-h


  reply	other threads:[~2023-06-27 20:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  1:20 Yuxiao Zhang
2023-06-27  6:20 ` Greg KH
2023-06-27 17:05   ` Yuxiao Zhang
2023-06-27 17:35     ` Greg KH
2023-06-27 20:28       ` Yuxiao Zhang [this message]
     [not found]     ` <A82AEA54-16EC-4965-B024-D4D47C200D9D@gmail.com>
2023-06-27 17:37       ` Greg KH

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=D4435632-785B-43AC-AE21-EC9797458F42@gmail.com \
    --to=yuxiaozh.zhang@gmail.com \
    --cc=gpiccoli@igalia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wak@google.com \
    --cc=yuxiaozhang@google.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

all inboxes | Powered by JetHome®