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


Groups > linux.kernel > #1318815

Re: [PATCH] x86/mm: avoid premature success when changing page attributes

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mm: avoid premature success when changing page attributes
Date 2016-01-27 11:10 +0100
Message-ID <qVvd2-1UN-31@gated-at.bofh.it> (permalink)
References <qUSEI-6QD-65@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 25 Jan 2016, Jan Beulich wrote:

Sorry, that changelog does not make any sense.

> Since successful return from __cpa_process_fault() makes
> __change_page_attr() exit early (and successfully), its caller needs to

That has nothing to do with a successful return from __cpa_process_fault().

__change_page_attr() always returns immediately after calling
__cpa_process_fault() no matter what the return code is.

> be instructed to continue its iteration by adjusting ->numpages.

And how is that instruction working?

> While this already happens on one of __cpa_process_fault()'s successful exit
> paths, the other needs this done similarly.

Why?

> This was in particular a problem when the top level caller passed zero for
> "checkalias" (becoming the "primary" value for the other two mentioned
> functions), as is the case in change_page_attr_set_clr() when the OR of
> "mask_set" and "mask_clr" equals _PAGE_NX, as e.g. passed from
> set_memory_{,n}x().

This is completely unparseable.

Can you please describe the failure and the solution in a way, which lets one
figure out what that means w/o studying the code in detail?

Thanks,

	tglx

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


Thread

[PATCH] x86/mm: avoid premature success when changing page  attributes "Jan Beulich" <JBeulich@suse.com> - 2016-01-25 18:00 +0100
  Re: [PATCH] x86/mm: avoid premature success when changing page  attributes Thomas Gleixner <tglx@linutronix.de> - 2016-01-27 11:10 +0100
    Re: [PATCH] x86/mm: avoid premature success when changing page  attributes "Jan Beulich" <JBeulich@suse.com> - 2016-01-27 11:50 +0100
      Re: [PATCH] x86/mm: avoid premature success when changing page  attributes Thomas Gleixner <tglx@linutronix.de> - 2016-01-27 12:00 +0100
        Re: [PATCH] x86/mm: avoid premature success when changing page  attributes "Jan Beulich" <JBeulich@suse.com> - 2016-01-27 12:20 +0100
        [PATCH v2] x86/mm: avoid premature success when changing page  attributes "Jan Beulich" <JBeulich@suse.com> - 2016-01-27 12:30 +0100

csiph-web