Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1575827

Re: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic function

From Mark Salyzyn <salyzyn@android.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic function
Date 2017-02-07 17:10 +0100
Message-ID <t8gv8-56A-3@gated-at.bofh.it> (permalink)
References <t5vTI-2Xq-5@gated-at.bofh.it> <t5vTI-2Xq-13@gated-at.bofh.it> <t6xTs-1sC-3@gated-at.bofh.it> <t89N0-zo-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/07/2017 12:51 AM, 岩松信洋 / IWAMATSU,NOBUHIRO wrote:
> Hi,
>
> Thanks for your review.
>
>> -----Original Message-----
>> From: Mark Salyzyn [mailto:salyzyn@android.com]
>> Sent: Friday, February 03, 2017 7:13 AM
>> To: 岩松信洋 / IWAMATSU,NOBUHIRO; Anton Vorontsov; Colin Cross; Kees Cook;
>> Tony Luck
>> Cc: linux-kernel@vger.kernel.org; Hiraku Toyooka; 阿口誠司 / AGUCHI,
>> SEIJI; Shuah Khan
>> Subject: Re: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic
>> function
>>
>> On 01/30/2017 05:58 PM, Nobuhiro Iwamatsu wrote:
>>> +
>>> +	if (zap && *paddr + sz - cxt->phys_addr > cxt->size) {
>>> +		dev_err(dev, "no room for %s mem region (0x%zx@0x%llx) in
>> (0x%lx@0x%llx)\n",
>>> +			name, sz, (unsigned long long)*paddr,
>>> +			cxt->size, (unsigned long long)cxt->phys_addr);
>>> +		return -ENOMEM;
>>> +	}
>>> +
>> Why not allow this limit check for ramoops_init_prsz call?
>>
> This code is controlled by flag of zap.
> If zap is false, __ramoops_init_prz() is worked same as original ramoops_init_przs().
>
> Best regards,
>    Nobuhiro

I agree, preserve functionality as is. Please consider removing the need  
for zap && in a future patch, as I _believe_ (untested, and no deep  
dive) that the limit check is relevant for the zap is false path as well  
and may have been an oversight.

-- Mark

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 2nd 0/4] pstore: ramoops: support multiple pmsg instances Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-01-31 03:00 +0100
  [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic function Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-01-31 03:00 +0100
    Re: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic  function Mark Salyzyn <salyzyn@android.com> - 2017-02-02 23:20 +0100
      RE: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic  function 岩松信洋 / IWAMATSU,NOBUHIRO          <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-02-07 10:00 +0100
        Re: [PATCH v4 2nd 1/4] ramoops: Add __ramoops_init_prz() as generic  function Mark Salyzyn <salyzyn@android.com> - 2017-02-07 17:10 +0100
  [PATCH v4 2nd 4/4] selftests/pstore: add testcases for multiple pmsg instances Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-01-31 03:00 +0100
  [PATCH v4 2nd 2/4] pstore: support multiple pmsg instances Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-01-31 03:00 +0100
    Re: [PATCH v4 2nd 2/4] pstore: support multiple pmsg instances Kees Cook <keescook@chromium.org> - 2017-02-01 21:30 +0100
      RE: [PATCH v4 2nd 2/4] pstore: support multiple pmsg instances 岩松信洋 / IWAMATSU,NOBUHIRO          <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-02-07 09:50 +0100
    Re: [PATCH v4 2nd 2/4] pstore: support multiple pmsg instances Mark Salyzyn <salyzyn@android.com> - 2017-02-02 23:20 +0100
      RE: [PATCH v4 2nd 2/4] pstore: support multiple pmsg instances 岩松信洋 / IWAMATSU,NOBUHIRO          <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-02-07 09:50 +0100
  [PATCH v4 2nd 3/4] ramoops: support multiple pmsg instances Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com> - 2017-01-31 03:10 +0100

csiph-web