All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Egorenkov <egorenar@linux.ibm.com>
To: "HAGIO KAZUHITO(萩尾 一仁)" <k-hagio-ab@nec.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"Discussion list for crash utility usage,
		maintenance and development" <crash-utility@redhat.com>
Subject: RE: [PATCH 1/1] fix left bit-shift overflow in __exclude_unnecessary_pages()
Date: Wed, 01 Sep 2021 11:27:49 +0200	[thread overview]
Message-ID: <87v93ksl0q.fsf@oc8242746057.ibm.com> (raw)
In-Reply-To: <TYYPR01MB67777DFB702E9801AA414B6ADDCD9@TYYPR01MB6777.jpnprd01.prod.outlook.com>
In-Reply-To: 

Hi Kazu,

HAGIO KAZUHITO(萩尾 一仁)	<k-hagio-ab@nec.com> writes:

> Hi Alex,
> +cc kexec list (the right one for makedumpfile patch)
>

Thanks, sorry for the mix up :(

> -----Original Message-----
>> Whenever the variables compound_order or private become greater than
>> 31, left bit-shift of 1 overflows, and nr_pages becomes zero. If nr_pages
>> becomes 0 and pages are being excluded at the end of the PFN loop, the
>> else branch of the last if statement is entered and pfn is decremented by
>> 1 because nr_pages is 0. Finally, this causes the loop variable pfn to
>> be assigned the same value as before when the next loop iteration begins
>> which results in an infinite loop.
>> 
>> This issue appeared on s390 64bit architecture with a dump of 16GB RAM.
>
> The patch looks good to me, but just out of curiosity, when do the
> compound_order or private become greater than 31 on s390?
>
> Thanks,
> Kazu
>

I added some debug statements and this what i got:

compound_order 0
compound_order 1
compound_order 2
compound_order 3
compound_order 4
compound_order 5
compound_order 6
compound_order 7
compound_order 8
private 0
private 1
private 2
private 3
private 4
private 5
private 52
private 6
private 7
private 8

It seems that not compound_order but private is at fault here and
triggers the bug. Not sure yet what that exactly means and whether we
have here another bug which triggers this one :/

Regards
Alex

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2021-09-01  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  9:10 [PATCH 1/1] fix left bit-shift overflow in __exclude_unnecessary_pages() HAGIO KAZUHITO(萩尾 一仁)
2021-09-01  9:27 ` Alexander Egorenkov [this message]
2021-09-02  2:04   ` HAGIO KAZUHITO(萩尾 一仁)
2021-09-02  6:11     ` Alexander Egorenkov

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=87v93ksl0q.fsf@oc8242746057.ibm.com \
    --to=egorenar@linux.ibm.com \
    --cc=crash-utility@redhat.com \
    --cc=k-hagio-ab@nec.com \
    --cc=kexec@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.