linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Firoz Khan <firoz.khan@linaro.org>
To: linux-alpha@vger.kernel.org, rth@twiddle.net,
	ink@jurassic.park.msu.ru, mattst88@gmail.com
Cc: y2038@lists.linaro.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, arnd@arndb.de,
	deepa.kernel@gmail.com, Firoz Khan <firoz.khan@linaro.org>
Subject: [PATCH 2/6] alpha: Add CONFIG_OSF4_COMPAT for compat syscall support
Date: Mon, 16 Jul 2018 15:53:54 +0530	[thread overview]
Message-ID: <1531736638-15294-3-git-send-email-firoz.khan@linaro.org> (raw)
In-Reply-To: <1531736638-15294-1-git-send-email-firoz.khan@linaro.org>

Removed the CONFIG_OSF4_COMPAT check from systbls.S and
kept it in osf_sys.c, so it will provide the same system
call support. To do so, we can keep a generic formatted
system call table file across all architectures.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
---
 arch/alpha/kernel/osf_sys.c | 9 ++++++---
 arch/alpha/kernel/systbls.S | 5 -----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 6e92175..696a6b7 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1349,7 +1349,6 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 }
 
 #ifdef CONFIG_OSF4_COMPAT
-
 /* Clear top 32 bits of iov_len in the user's buffer for
    compatibility with old versions of OSF/1 where iov_len
    was defined as int. */
@@ -1366,27 +1365,31 @@ osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
 	}
 	return 0;
 }
+#endif
 
 SYSCALL_DEFINE3(osf_readv, unsigned long, fd,
 		const struct iovec __user *, vector, unsigned long, count)
 {
+#ifdef CONFIG_OSF4_COMPAT
 	if (unlikely(personality(current->personality) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
+#endif
+
 	return sys_readv(fd, vector, count);
 }
 
 SYSCALL_DEFINE3(osf_writev, unsigned long, fd,
 		const struct iovec __user *, vector, unsigned long, count)
 {
+#ifdef CONFIG_OSF4_COMPAT
 	if (unlikely(personality(current->personality) == PER_OSF4))
 		if (osf_fix_iov_len(vector, count))
 			return -EFAULT;
+#endif
 	return sys_writev(fd, vector, count);
 }
 
-#endif
-
 SYSCALL_DEFINE2(osf_getpriority, int, which, int, who)
 {
 	int prio = sys_getpriority(which, who);
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S
index 1374e59..fcf2f60 100644
--- a/arch/alpha/kernel/systbls.S
+++ b/arch/alpha/kernel/systbls.S
@@ -132,13 +132,8 @@ sys_call_table:
 	.quad sys_osf_getrusage
 	.quad sys_getsockopt
 	.quad alpha_ni_syscall
-#ifdef CONFIG_OSF4_COMPAT
 	.quad sys_osf_readv			/* 120 */
 	.quad sys_osf_writev
-#else
-	.quad sys_readv				/* 120 */
-	.quad sys_writev
-#endif
 	.quad sys_osf_settimeofday
 	.quad sys_fchown
 	.quad sys_fchmod
-- 
2.7.4

  parent reply	other threads:[~2018-07-16 10:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 10:23 [PATCH 0/6] System call table generation support Firoz Khan
2018-07-16 10:23 ` Firoz Khan
2018-07-16 10:23 ` [PATCH 1/6] alpha: Move __IGNORE* entries to non uapi header Firoz Khan
2018-07-16 10:23   ` Firoz Khan
2018-08-11 19:28   ` Al Viro
2018-08-11 19:28     ` Al Viro
2018-08-11 20:59     ` Michael Cree
2018-08-11 20:59       ` Michael Cree
2018-08-11 22:27       ` Arnd Bergmann
2018-08-11 22:27         ` Arnd Bergmann
2018-07-16 10:23 ` Firoz Khan [this message]
2018-07-16 10:23   ` [PATCH 2/6] alpha: Add CONFIG_OSF4_COMPAT for compat syscall support Firoz Khan
2018-07-16 10:23 ` [PATCH 3/6] alpha: Unify the not-implemented system call entry name Firoz Khan
2018-07-16 10:23   ` Firoz Khan
2018-08-11  0:04   ` Al Viro
2018-08-11  0:04     ` Al Viro
2018-08-11  2:31     ` Richard Henderson
2018-08-11  2:31       ` Richard Henderson
2018-08-11  2:45       ` Al Viro
2018-08-11  2:45         ` Al Viro
2018-08-11  4:10         ` Richard Henderson
2018-08-11  4:10           ` Richard Henderson
2018-08-11 15:07           ` Al Viro
2018-08-11 15:07             ` Al Viro
2018-08-11 15:24             ` Richard Henderson
2018-08-11 15:24               ` Richard Henderson
2018-07-16 10:23 ` [PATCH 4/6] alpha: Replace NR_SYSCALLS macro from asm/unistd.h Firoz Khan
2018-07-16 10:23   ` Firoz Khan
2018-07-16 10:23 ` [PATCH 5/6] alpha: Add system call table generation support Firoz Khan
2018-07-16 10:23   ` Firoz Khan
2018-07-16 10:23 ` [PATCH 6/6] alpha: uapi header and system call table file generation Firoz Khan
2018-07-16 10:23   ` Firoz Khan
2018-07-16 16:23   ` kbuild test robot
2018-07-16 16:23     ` kbuild test robot
2018-07-16 14:09 ` [PATCH 0/6] System call table generation support Arnd Bergmann
2018-07-16 14:09   ` Arnd Bergmann

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=1531736638-15294-3-git-send-email-firoz.khan@linaro.org \
    --to=firoz.khan@linaro.org \
    --cc=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    --cc=y2038@lists.linaro.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).