All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	Pekka Enberg <penberg@kernel.org>,
	Jacob Shin <jacob.shin@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, mm: Avoid step_size overflow and add comments
Date: Wed, 21 Aug 2013 09:34:30 +0200	[thread overview]
Message-ID: <20130821073430.GC27495@gmail.com> (raw)
In-Reply-To: <1377022270-20303-1-git-send-email-yinghai@kernel.org>


* Yinghai Lu <yinghai@kernel.org> wrote:

> Current code

"Current code has two problems:"

> 1. shift step_size directly, and this could have overflow problem
>    after we shift step_size several times.

The most important piece of information is not explained: 
under what circumstances can this happen currently, what 
are the symptoms if this happens, roughly what kind of 
systems are affected, etc?

I mean the kind of information you'd put into a BIOS errata 
description or into any software changelog. You wouldn't 
primarily write about the mechanics of the change, but 
about the _actual impact_ of the change, to end users, 
right?

> 2. use MACRO to have shift to set to 5, but there is not
>    explanation about selection.
> 
> We can fix them with:
> 1. Add get_new_step_size(), and check overflow by comparing new_size
>    with old step_size.
> 2. add comment in it about why we are using 5.
> 
> That will make code more readable while not increasing size of
> init_mem_mapping().

Well, it gets not just more readable at a small size 
increase, but also the above unexplained overflow bug will 
be fixed as well, right?

Thanks,

	Ingo

      reply	other threads:[~2013-08-21  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 18:11 [PATCH] x86, mm: Avoid step_size overflow and add comments Yinghai Lu
2013-08-21  7:34 ` Ingo Molnar [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=20130821073430.GC27495@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jacob.shin@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=yinghai@kernel.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.