All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH 5/5] arm64: make sys_call_table const
Date: Fri,  9 Jan 2015 15:57:28 +0000	[thread overview]
Message-ID: <1420819048-3515-6-git-send-email-catalin.marinas@arm.com> (raw)
In-Reply-To: <1420819048-3515-1-git-send-email-catalin.marinas@arm.com>

From: Mark Rutland <mark.rutland@arm.com>

As with x86, mark the sys_call_table const such that it will be placed
in the .rodata section. This will cause attempts to modify the table
(accidental or deliberate) to fail when strict page permissions are in
place. In the absence of strict page permissions, there should be no
functional change.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c
index dec351a9f3d6..75151aaf1a52 100644
--- a/arch/arm64/kernel/sys.c
+++ b/arch/arm64/kernel/sys.c
@@ -49,7 +49,7 @@ asmlinkage long sys_rt_sigreturn_wrapper(void);
  * The sys_call_table array must be 4K aligned to be accessible from
  * kernel/entry.S.
  */
-void *sys_call_table[__NR_syscalls] __aligned(4096) = {
+void * const sys_call_table[__NR_syscalls] __aligned(4096) = {
 	[0 ... __NR_syscalls - 1] = sys_ni_syscall,
 #include <asm/unistd.h>
 };

WARNING: multiple messages have this Message-ID (diff)
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] arm64: make sys_call_table const
Date: Fri,  9 Jan 2015 15:57:28 +0000	[thread overview]
Message-ID: <1420819048-3515-6-git-send-email-catalin.marinas@arm.com> (raw)
In-Reply-To: <1420819048-3515-1-git-send-email-catalin.marinas@arm.com>

From: Mark Rutland <mark.rutland@arm.com>

As with x86, mark the sys_call_table const such that it will be placed
in the .rodata section. This will cause attempts to modify the table
(accidental or deliberate) to fail when strict page permissions are in
place. In the absence of strict page permissions, there should be no
functional change.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm64/kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c
index dec351a9f3d6..75151aaf1a52 100644
--- a/arch/arm64/kernel/sys.c
+++ b/arch/arm64/kernel/sys.c
@@ -49,7 +49,7 @@ asmlinkage long sys_rt_sigreturn_wrapper(void);
  * The sys_call_table array must be 4K aligned to be accessible from
  * kernel/entry.S.
  */
-void *sys_call_table[__NR_syscalls] __aligned(4096) = {
+void * const sys_call_table[__NR_syscalls] __aligned(4096) = {
 	[0 ... __NR_syscalls - 1] = sys_ni_syscall,
 #include <asm/unistd.h>
 };

  parent reply	other threads:[~2015-01-09 15:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 15:57 [PATCH 0/5] arm64 compat syscall table clean-up Catalin Marinas
2015-01-09 15:57 ` Catalin Marinas
2015-01-09 15:57 ` [PATCH 1/5] compat: Declare compat_sys_sigpending and compat_sys_sigprocmask prototypes Catalin Marinas
2015-01-09 15:57   ` Catalin Marinas
2015-01-26 17:32   ` Catalin Marinas
2015-01-26 17:32     ` Catalin Marinas
2015-01-26 21:48   ` Andrew Morton
2015-01-26 21:48     ` Andrew Morton
2015-01-09 15:57 ` [PATCH 2/5] syscalls: Declare sys_*stat64 prototypes if __ARCH_WANT_(COMPAT_)STAT64 Catalin Marinas
2015-01-09 15:57   ` Catalin Marinas
2015-01-26 17:31   ` Catalin Marinas
2015-01-26 17:31     ` Catalin Marinas
2015-01-26 21:49   ` Andrew Morton
2015-01-26 21:49     ` Andrew Morton
2015-01-09 15:57 ` [PATCH 3/5] arm64: Implement the compat_sys_call_table in C Catalin Marinas
2015-01-09 15:57   ` Catalin Marinas
2015-01-09 15:57 ` [PATCH 4/5] arm64: Remove asm/syscalls.h Catalin Marinas
2015-01-09 15:57   ` Catalin Marinas
2015-01-09 15:57 ` Catalin Marinas [this message]
2015-01-09 15:57   ` [PATCH 5/5] arm64: make sys_call_table const Catalin Marinas

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=1420819048-3515-6-git-send-email-catalin.marinas@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    /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.