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


Groups > linux.kernel > #1315651 > unrolled thread

[PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed.

Started by<mika.penttila@nextfour.com>
First post2016-01-23 16:10 +0100
Last post2016-01-26 03:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed. <mika.penttila@nextfour.com> - 2016-01-23 16:10 +0100
    Re: [PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed. Laura Abbott <labbott@redhat.com> - 2016-01-25 19:50 +0100
      Re: [PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed. David Rientjes <rientjes@google.com> - 2016-01-26 03:40 +0100

#1315651 — [PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed.

From<mika.penttila@nextfour.com>
Date2016-01-23 16:10 +0100
Subject[PATCH 3/4] arm64: let set_memory_xx(addr, 0) succeed.
Message-ID<qU7Z8-4tS-1@gated-at.bofh.it>
From: Mika Penttilä <mika.penttila@nextfour.com>

This makes set_memory_xx() consistent with x86.

Signed-off-by: Mika Penttilä mika.penttila@nextfour.com

---
 arch/arm64/mm/pageattr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
index 3571c73..52220dd 100644
--- a/arch/arm64/mm/pageattr.c
+++ b/arch/arm64/mm/pageattr.c
@@ -51,6 +51,9 @@ static int change_memory_common(unsigned long addr, int numpages,
 		WARN_ON_ONCE(1);
 	}
 
+	if (!numpages)
+		return 0;
+
 	if (start < MODULES_VADDR || start >= MODULES_END)
 		return -EINVAL;
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1317174

FromLaura Abbott <labbott@redhat.com>
Date2016-01-25 19:50 +0100
Message-ID<qUUn8-8cw-9@gated-at.bofh.it>
In reply to#1315651
On 01/23/2016 07:05 AM, mika.penttila@nextfour.com wrote:
> From: Mika Penttilä <mika.penttila@nextfour.com>
>
> This makes set_memory_xx() consistent with x86.
>
> Signed-off-by: Mika Penttilä mika.penttila@nextfour.com
>
> ---
>   arch/arm64/mm/pageattr.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
> index 3571c73..52220dd 100644
> --- a/arch/arm64/mm/pageattr.c
> +++ b/arch/arm64/mm/pageattr.c
> @@ -51,6 +51,9 @@ static int change_memory_common(unsigned long addr, int numpages,
>   		WARN_ON_ONCE(1);
>   	}
>
> +	if (!numpages)
> +		return 0;
> +
>   	if (start < MODULES_VADDR || start >= MODULES_END)
>   		return -EINVAL;
>
>

I think this is going to conflict with Ard's patch
lkml.kernel.org/g/<1453125665-26627-1-git-send-email-ard.biesheuvel@linaro.org>

Can you rebase on top of that?

Thanks,
Laura

[toc] | [prev] | [next] | [standalone]


#1317475

FromDavid Rientjes <rientjes@google.com>
Date2016-01-26 03:40 +0100
Message-ID<qV1HY-4RV-5@gated-at.bofh.it>
In reply to#1317174

[Multipart message — attachments visible in raw view] — view raw

On Mon, 25 Jan 2016, Laura Abbott wrote:

> On 01/23/2016 07:05 AM, mika.penttila@nextfour.com wrote:
> > From: Mika Penttilä <mika.penttila@nextfour.com>
> > 
> > This makes set_memory_xx() consistent with x86.
> > 
> > Signed-off-by: Mika Penttilä mika.penttila@nextfour.com
> > 
> > ---
> >   arch/arm64/mm/pageattr.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c
> > index 3571c73..52220dd 100644
> > --- a/arch/arm64/mm/pageattr.c
> > +++ b/arch/arm64/mm/pageattr.c
> > @@ -51,6 +51,9 @@ static int change_memory_common(unsigned long addr, int
> > numpages,
> >   		WARN_ON_ONCE(1);
> >   	}
> > 
> > +	if (!numpages)
> > +		return 0;
> > +
> >   	if (start < MODULES_VADDR || start >= MODULES_END)
> >   		return -EINVAL;
> > 
> > 
> 
> I think this is going to conflict with Ard's patch
> lkml.kernel.org/g/<1453125665-26627-1-git-send-email-ard.biesheuvel@linaro.org>
> 
> Can you rebase on top of that?
> 

Also, I think patch 2 and 3 can be folded together since the change is the 
same to both functions.

I think the changelog should be expanded to explain that 
charge_memory_common() with numpages == 0 should be a no-op.

When both of those are done, and it's rebased as requested, feel free to 
add my:

	Acked-by: David Rientjes <rientjes@google.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web