From patchwork Mon Jul 16 10:23:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Firoz Khan X-Patchwork-Id: 141988 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2242383ljj; Mon, 16 Jul 2018 03:24:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfrYpO4Pyh8hfYD1q2ryNeNC0QIMXhU3VzrG6HT1PLUXNmEZ6+pjE+578uNeD/+hkPAJzES X-Received: by 2002:a17:902:6802:: with SMTP id h2-v6mr15878246plk.113.1531736687875; Mon, 16 Jul 2018 03:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531736687; cv=none; d=google.com; s=arc-20160816; b=pXab1ojcbW+pj6/2KW6g60vBYX4Mt2nzUb53KtnqZwnLGcUqbYgedHhHXWmULamub+ F9tnGPaobd5CufZgFYScudgSxl5qN+tjgqT8J6xpZywnpzJm2ar9Uw0ymHVBS+yUv6EG 8eEcraYt4ZRVUMO9NyGTuzcqEbBDEqQ5S1gDlNt38hHoECsXymxKP6UI89saWkTPH/nI iSOUSqTlSIqH8nLngYhzLiujDzHa/cY1XCMCyEScKSk8yv7/OW8Ud1uU8lQK2Gp9ROG6 qkDIGtZO6tKP62zQxW+mDjyjCmu8XpiqyN5n/4P7PnnKAXTTNZVomB8R/skLAHqchO/J XMhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=kqx6+HVyTwzi/G2p/wSX/U5PscpYTK71wMljHdL85IQ=; b=iFLJd+pA+XRsX/RQErs37wBbzlGIK43bMbUaBjh1LFweEzpgOn9dcm9dONKr+aMuMG J+Y/IUKb/qLz2/LxrkRQHQc5iqqkNaIG+Ucfici1VW26t4+ZiQKkBO0qv4K+rGF84IyI jTbwWVYYjKtY9ctLovYvGUpeWticowrLFJi9alDe8Oyyt6qZF1D9pl158FgDxEilVh55 q5ne6qKlaQ/YABCIOHaQPuNOZyxzukzFZR/b8JLnUFvSSd2J5Cn5j4mB1+gKIMGCqRJw dQeM+cZkr2LXhK9SCSXmcU1nGAUybhTN320F03b0XUhUyerZhVNkKJQBqbQAId/eoSdc 0KOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DV77A1Xz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a16-v6si28888190pff.43.2018.07.16.03.24.47; Mon, 16 Jul 2018 03:24:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DV77A1Xz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730444AbeGPKva (ORCPT + 31 others); Mon, 16 Jul 2018 06:51:30 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35418 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730092AbeGPKv3 (ORCPT ); Mon, 16 Jul 2018 06:51:29 -0400 Received: by mail-pl0-f66.google.com with SMTP id w3-v6so1939545plq.2 for ; Mon, 16 Jul 2018 03:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kqx6+HVyTwzi/G2p/wSX/U5PscpYTK71wMljHdL85IQ=; b=DV77A1XzrXuA1OKNKPvXD3Hf6DYVDpcD03aJP6qZs/dcYRAdVt29sFT4BcM5FF01Q3 lmTXnFqKgXgc/hcd3aLkxaNmv4i3cxij9n+liS+8WaA08B1QejY1eZJZ2llVZgNa0nOc s4CkSbAxWUvYjjYrraESsa1WGQFk72Y8Zx98c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kqx6+HVyTwzi/G2p/wSX/U5PscpYTK71wMljHdL85IQ=; b=Rgl4K3AAiKNUZ0HU/kBn3o6MPWQka1L2O2KsG7sRe2xXfd3WdROf0XDCWDe6/DBjNo VTQz6JJSRdm765WP3v3iJPjJT9OxzhDHXjiu5Tu5//tnxFvRNtHO5voaeSoy3Uff3By9 LCigzUlqcKsLqtsLCRg7NmlrXRNxJGvlUWVLYz/QqmqCF1wuQxG5SuGp6KQ/IIjwe/4S er6LwOvN9kvO/N5JuLJrA/0RrOgLxHotG1WjlBpqVUNLi7V/VQGxj7FPDlyOJb1a2YBW Gwt2jTg6p1oCQb63dbyAkEa9/Ywc8O23JCVM4PHBi/LGg7ioMbyrrx9wboO7LOOcwn4Y b5YA== X-Gm-Message-State: AOUpUlG1cpIicD9GRkPWCbzLrL5RTQXvK2jHVXSGKRipe2Ynzff6pgXT Dqdsxhx8v2YwAFBnhcQ3uupkUA== X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr715820plb.108.1531736684778; Mon, 16 Jul 2018 03:24:44 -0700 (PDT) Received: from qualcomm-HP-ZBook-14-G2.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id l27-v6sm17808087pfi.42.2018.07.16.03.24.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jul 2018 03:24:44 -0700 (PDT) From: Firoz Khan 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 Subject: [PATCH 2/6] alpha: Add CONFIG_OSF4_COMPAT for compat syscall support Date: Mon, 16 Jul 2018 15:53:54 +0530 Message-Id: <1531736638-15294-3-git-send-email-firoz.khan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531736638-15294-1-git-send-email-firoz.khan@linaro.org> References: <1531736638-15294-1-git-send-email-firoz.khan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- arch/alpha/kernel/osf_sys.c | 9 ++++++--- arch/alpha/kernel/systbls.S | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) -- 2.7.4 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