From: Michal Hocko <mhocko@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: Luis Felipe Sandoval Castro
<luis.felipe.sandoval.castro@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, vbabka@suse.cz, mingo@kernel.org,
rientjes@google.com, n-horiguchi@ah.jp.nec.com,
salls@cs.ucsb.edu, Cristopher Lameter <cl@linux.com>
Subject: Re: [PATCH v1] mm/mempolicy.c: Fix get_nodes() off-by-one error.
Date: Fri, 13 Oct 2017 10:04:03 +0200 [thread overview]
Message-ID: <20171013080403.izjxlrf7ap5zt2d5@dhcp22.suse.cz> (raw)
In-Reply-To: <20171012152825.GJ5109@tassilo.jf.intel.com>
On Thu 12-10-17 08:28:25, Andi Kleen wrote:
> On Thu, Oct 12, 2017 at 10:46:33AM +0200, Michal Hocko wrote:
> > [CC Christoph who seems to be the author of the code]
>
> Actually you can blame me. I did the mistake originally.
> It was found many years ago, but then it was already too late
> to change.
>
> > Andi has voiced a concern about backward compatibility but I am not sure
> > the risk is very high. The current behavior is simply broken unless you
> > use a large maxnode anyway. What kind of breakage would you envision
> > Andi?
>
> libnuma uses the available number of nodes as max.
>
> So it would always lose the last one with your chance.
I must be missing something because libnuma does
if (set_mempolicy(policy, bmp->maskp, bmp->size + 1) < 0)
so it sets max as size + 1 which is exactly what the man page describes.
> Your change would be catastrophic.
I am not sure which change do you mean here. I wasn't proposing any
patch (yet). All I was saying is that the docuementation diagrees with
the in kernel implementation. The only applications that would break
would be those which do not comply to the documentation AFAICS, no?
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-10-13 8:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 13:36 [PATCH v1][cover-letter] mm/mempolicy.c: Fix get_nodes() off-by-one error Luis Felipe Sandoval Castro
2017-10-06 13:36 ` [PATCH v1] " Luis Felipe Sandoval Castro
2017-10-12 8:46 ` Michal Hocko
2017-10-12 9:14 ` Vlastimil Babka
2017-10-12 9:29 ` Michal Hocko
2017-10-12 15:28 ` Andi Kleen
2017-10-13 8:04 ` Michal Hocko [this message]
2017-10-19 3:48 ` Sandoval Castro, Luis Felipe
2017-10-19 4:28 ` Andi Kleen
2017-10-06 22:12 ` [PATCH v1][cover-letter] " Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2017-07-18 13:39 [PATCH v1] " Luis Felipe Sandoval Castro
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=20171013080403.izjxlrf7ap5zt2d5@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luis.felipe.sandoval.castro@intel.com \
--cc=mingo@kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=salls@cs.ucsb.edu \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).