From: Russell King - ARM Linux <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
To: Laura Abbott <labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
Martin Schwidefsky
<schwidefsky-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Heiko Carstens
<heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
Alexander Shishkin
<alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Daniel Borkmann <daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>,
Jessica Yu <jeyu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Takashi Iwai <tiwai-IBi9RG/b67k@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>l
Subject: Re: [PATCHv2 01/14] treewide: Move set_memory_* functions away from cacheflush.h
Date: Thu, 2 Mar 2017 12:07:09 +0000 [thread overview]
Message-ID: <20170302120709.GL21222@n2100.armlinux.org.uk> (raw)
In-Reply-To: <1488413706-9739-2-git-send-email-labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Wed, Mar 01, 2017 at 04:14:53PM -0800, Laura Abbott wrote:
> diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
> index 02454fa..1cb9d11 100644
> --- a/arch/arm/include/asm/cacheflush.h
> +++ b/arch/arm/include/asm/cacheflush.h
> @@ -16,6 +16,7 @@
> #include <asm/shmparam.h>
> #include <asm/cachetype.h>
> #include <asm/outercache.h>
> +#include <asm/set_memory.h>
>
> #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
>
> @@ -478,26 +479,6 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size)
> : : : "r0","r1","r2","r3","r4","r5","r6","r7", \
> "r9","r10","lr","memory" )
>
> -#ifdef CONFIG_MMU
> -int set_memory_ro(unsigned long addr, int numpages);
> -int set_memory_rw(unsigned long addr, int numpages);
> -int set_memory_x(unsigned long addr, int numpages);
> -int set_memory_nx(unsigned long addr, int numpages);
> -#else
> -static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
> -#endif
> -
> -#ifdef CONFIG_STRICT_KERNEL_RWX
> -void set_kernel_text_rw(void);
> -void set_kernel_text_ro(void);
> -#else
> -static inline void set_kernel_text_rw(void) { }
> -static inline void set_kernel_text_ro(void) { }
> -#endif
> -
> void flush_uprobe_xol_access(struct page *page, unsigned long uaddr,
> void *kaddr, unsigned long len);
>
> diff --git a/arch/arm/include/asm/set_memory.h b/arch/arm/include/asm/set_memory.h
> new file mode 100644
> index 0000000..5aa4315
> --- /dev/null
> +++ b/arch/arm/include/asm/set_memory.h
> @@ -0,0 +1,32 @@
> +/*
> + * Copyright (C) 1999-2002 Russell King
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef _ASMARM_SET_MEMORY_H
> +#define _ASMARM_SET_MEMORY_H
> +
> +#ifdef CONFIG_MMU
> +int set_memory_ro(unsigned long addr, int numpages);
> +int set_memory_rw(unsigned long addr, int numpages);
> +int set_memory_x(unsigned long addr, int numpages);
> +int set_memory_nx(unsigned long addr, int numpages);
> +#else
> +static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
> +#endif
> +
> +#ifdef CONFIG_STRICT_KERNEL_RWX
> +void set_kernel_text_rw(void);
> +void set_kernel_text_ro(void);
> +#else
> +static inline void set_kernel_text_rw(void) { }
> +static inline void set_kernel_text_ro(void) { }
> +#endif
> +
> +#endif
Acked-by: Russell King <rmk+kernel-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>
Thanks.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Laura Abbott <labbott@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>,
Mark Rutland <mark.rutland@arm.com>,
Arnd Bergmann <arnd@arndb.de>, David Airlie <airlied@linux.ie>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Wim Van Sebroeck <wim@iguana.be>,
Guenter Roeck <linux@roeck-us.net>,
linux-watchdog@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Daniel Borkmann <daniel@iogearbox.net>,
Jessica Yu <jeyu@redhat.com>, Takashi Iwai <tiwai@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-arch@vger.kernel.org, linux-s390@vger.kernel.org,
x86@kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv2 01/14] treewide: Move set_memory_* functions away from cacheflush.h
Date: Thu, 2 Mar 2017 12:07:09 +0000 [thread overview]
Message-ID: <20170302120709.GL21222@n2100.armlinux.org.uk> (raw)
Message-ID: <20170302120709.yMrr2zQMWtWNdfRn62NAIAJGl08xHEMMSxpY_ElkVQs@z> (raw)
In-Reply-To: <1488413706-9739-2-git-send-email-labbott@redhat.com>
On Wed, Mar 01, 2017 at 04:14:53PM -0800, Laura Abbott wrote:
> diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
> index 02454fa..1cb9d11 100644
> --- a/arch/arm/include/asm/cacheflush.h
> +++ b/arch/arm/include/asm/cacheflush.h
> @@ -16,6 +16,7 @@
> #include <asm/shmparam.h>
> #include <asm/cachetype.h>
> #include <asm/outercache.h>
> +#include <asm/set_memory.h>
>
> #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
>
> @@ -478,26 +479,6 @@ static inline void __sync_cache_range_r(volatile void *p, size_t size)
> : : : "r0","r1","r2","r3","r4","r5","r6","r7", \
> "r9","r10","lr","memory" )
>
> -#ifdef CONFIG_MMU
> -int set_memory_ro(unsigned long addr, int numpages);
> -int set_memory_rw(unsigned long addr, int numpages);
> -int set_memory_x(unsigned long addr, int numpages);
> -int set_memory_nx(unsigned long addr, int numpages);
> -#else
> -static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
> -static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
> -#endif
> -
> -#ifdef CONFIG_STRICT_KERNEL_RWX
> -void set_kernel_text_rw(void);
> -void set_kernel_text_ro(void);
> -#else
> -static inline void set_kernel_text_rw(void) { }
> -static inline void set_kernel_text_ro(void) { }
> -#endif
> -
> void flush_uprobe_xol_access(struct page *page, unsigned long uaddr,
> void *kaddr, unsigned long len);
>
> diff --git a/arch/arm/include/asm/set_memory.h b/arch/arm/include/asm/set_memory.h
> new file mode 100644
> index 0000000..5aa4315
> --- /dev/null
> +++ b/arch/arm/include/asm/set_memory.h
> @@ -0,0 +1,32 @@
> +/*
> + * Copyright (C) 1999-2002 Russell King
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef _ASMARM_SET_MEMORY_H
> +#define _ASMARM_SET_MEMORY_H
> +
> +#ifdef CONFIG_MMU
> +int set_memory_ro(unsigned long addr, int numpages);
> +int set_memory_rw(unsigned long addr, int numpages);
> +int set_memory_x(unsigned long addr, int numpages);
> +int set_memory_nx(unsigned long addr, int numpages);
> +#else
> +static inline int set_memory_ro(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_rw(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
> +static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
> +#endif
> +
> +#ifdef CONFIG_STRICT_KERNEL_RWX
> +void set_kernel_text_rw(void);
> +void set_kernel_text_ro(void);
> +#else
> +static inline void set_kernel_text_rw(void) { }
> +static inline void set_kernel_text_ro(void) { }
> +#endif
> +
> +#endif
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Thanks.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2017-03-02 12:07 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 0:14 [PATCHv2 00/14] set_memory_* functions header refactor Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 0:14 ` [PATCHv2 01/14] treewide: Move set_memory_* functions away from cacheflush.h Laura Abbott
2017-03-02 0:14 ` Laura Abbott
[not found] ` <1488413706-9739-2-git-send-email-labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-02 12:07 ` Russell King - ARM Linux [this message]
2017-03-02 12:07 ` Russell King - ARM Linux
2017-03-02 14:11 ` Mark Rutland
2017-03-02 14:11 ` Mark Rutland
2017-03-02 0:14 ` [PATCHv2 02/14] arm: Use set_memory.h header Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 12:01 ` Russell King - ARM Linux
2017-03-02 12:01 ` Russell King - ARM Linux
2017-03-02 0:14 ` [PATCHv2 03/14] arm64: " Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 14:07 ` Mark Rutland
2017-03-02 14:07 ` Mark Rutland
2017-03-02 15:06 ` Catalin Marinas
2017-03-02 15:06 ` Catalin Marinas
2017-03-02 0:14 ` [PATCHv2 04/14] s390: " Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 0:14 ` [PATCHv2 05/14] x86: " Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 8:01 ` Ingo Molnar
2017-03-02 8:01 ` Ingo Molnar
2017-03-02 0:14 ` [PATCHv2 06/14] agp: " Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-02 0:14 ` [PATCHv2 07/14] drm: " Laura Abbott
2017-03-02 0:14 ` Laura Abbott
2017-03-05 1:08 ` kbuild test robot
2017-03-05 1:08 ` kbuild test robot
2017-03-02 0:15 ` [PATCHv2 08/14] intel_th: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 11:06 ` Alexander Shishkin
2017-03-02 11:06 ` Alexander Shishkin
2017-03-02 0:15 ` [PATCHv2 09/14] watchdog: hpwdt: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 14:48 ` Guenter Roeck
2017-03-02 14:48 ` Guenter Roeck
2017-03-02 0:15 ` [PATCHv2 10/14] bpf: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 20:26 ` Daniel Borkmann
2017-03-02 20:26 ` Daniel Borkmann
2017-03-05 3:01 ` kbuild test robot
2017-03-05 3:01 ` kbuild test robot
2017-03-02 0:15 ` [PATCHv2 11/14] module: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 17:09 ` Jessica Yu
2017-03-02 17:09 ` Jessica Yu
2017-03-02 0:15 ` [PATCHv2 12/14] PM / hibernate: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
[not found] ` <1488413706-9739-1-git-send-email-labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-02 0:15 ` [PATCHv2 13/14] ALSA: hda: " Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 0:15 ` [PATCHv2 14/14] treewide: Decouple cacheflush.h and set_memory.h Laura Abbott
2017-03-02 0:15 ` Laura Abbott
2017-03-02 12:06 ` Russell King - ARM Linux
2017-03-02 12:06 ` Russell King - ARM Linux
2017-03-02 14:12 ` Mark Rutland
2017-03-02 14:12 ` Mark Rutland
2017-03-02 15:05 ` Catalin Marinas
2017-03-02 15:05 ` Catalin Marinas
[not found] ` <1488413706-9739-15-git-send-email-labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-04 22:57 ` kbuild test robot
2017-03-04 22:57 ` kbuild test robot
2017-03-05 0:03 ` kbuild test robot
2017-03-05 0:03 ` kbuild test robot
2017-03-02 7:34 ` [PATCHv2 00/14] set_memory_* functions header refactor Heiko Carstens
2017-03-02 7:34 ` Heiko Carstens
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=20170302120709.GL21222@n2100.armlinux.org.uk \
--to=linux-i+ivw8tiwo2tmtq+vha3yw@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
--cc=daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=heiko.carstens-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=jeyu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=schwidefsky-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tiwai-IBi9RG/b67k@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.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 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).