From patchwork Sat Mar 11 19:46:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Huey X-Patchwork-Id: 9619005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94B8C60414 for ; Sat, 11 Mar 2017 19:47:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8253828733 for ; Sat, 11 Mar 2017 19:47:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7158628734; Sat, 11 Mar 2017 19:47:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C03C28736 for ; Sat, 11 Mar 2017 19:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933808AbdCKTrm (ORCPT ); Sat, 11 Mar 2017 14:47:42 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35490 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755340AbdCKTrM (ORCPT ); Sat, 11 Mar 2017 14:47:12 -0500 Received: by mail-pg0-f68.google.com with SMTP id g2so9407548pge.2 for ; Sat, 11 Mar 2017 11:47:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kylehuey.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wf4wK8OW7G9JViiri6oNmjUXovCxRGhqQn8eYs4jmjM=; b=HHvfh5nPXq3cPyAmLbl9ECMguPP2V85yiOjINLhp/QexJ+hYWFrBhyi49SOJ5a8SVQ ea7uxbBcZaFkw8pQKFLhx9hJnjG4zJROvR8Zq23rGuAG8VNHBy3H50tbrChiQySLPium s3hKEOLPVhFftyFx7c5jvAC6sKLHP3Xq2JUVCCQ+bdhOmhmNzp8C4nXv9ixQgYA6c/LP dcU0JAOjYJICD4VKNThpoNQgH/0CXTkb1dkfPTzxTgcfV0h8ZHyG18qiO0/T3Gh+3E5E ppvE7B6ocEzRH6sARxcxZ+Ay8WSJ5qIIzSBlK/G52g3wT2AAegdZH/+dLWz+cKs8Ygby XWUQ== 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=wf4wK8OW7G9JViiri6oNmjUXovCxRGhqQn8eYs4jmjM=; b=RZSb79dVTTXbJjwjlButcqkrOuKNTy7IgA/T3HG6D489F8UHOdIVSHGMDhvmrqF03p NfHr5wwDilhjVuhL1ZPbxOS/9UrEMH1SzkdXbn36Wum67r3TWnm/YwNFOP8Gj/ZdbNQH pPpbwVVcUs0oR48AMqUr/U3LZoQfRAedWz9kKYy6/ZA975D6qkHj9dVzVk04qlWO5lNp 5qZskPjOqn9CA0NxVEyyweRD2zJsl3cHbpC54kEnSesuxfbwGha7OlkdSENyX4rNDwf9 U+xsCbxg82bjNpfuD8K4abXXp3oEyvGBdKlI125SEYIww33oJSrb7lqFKr+SsfHftMW8 wi1g== X-Gm-Message-State: AMke39lqHZhOIkfoSDKJGiwR0iyouN1bOvcSCQhfW5CTwXrbta5uWaA3+uMlXeDL28+YlA== X-Received: by 10.99.108.74 with SMTP id h71mr26813475pgc.99.1489261630629; Sat, 11 Mar 2017 11:47:10 -0800 (PST) Received: from minbar.home.kylehuey.com (c-50-150-100-179.hsd1.ca.comcast.net. [50.150.100.179]) by smtp.gmail.com with ESMTPSA id t67sm25421584pfd.76.2017.03.11.11.47.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 11 Mar 2017 11:47:10 -0800 (PST) From: Kyle Huey X-Google-Original-From: Kyle Huey To: Robert O'Callahan , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Borislav Petkov , Peter Zijlstra , Boris Ostrovsky , Len Brown , Dmitry Safonov , "Rafael J. Wysocki" , David Matlack , Nadav Amit , Andi Kleen Cc: linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-kselftest@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH v15 1/9] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Date: Sat, 11 Mar 2017 11:46:54 -0800 Message-Id: <20170311194702.28754-2-khuey@kylehuey.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170311194702.28754-1-khuey@kylehuey.com> References: <20170311194702.28754-1-khuey@kylehuey.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the SYSCALL_DEFINE2 macro instead of manually defining it. Signed-off-by: Kyle Huey --- arch/x86/kernel/process_64.c | 3 ++- arch/x86/um/syscalls_64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index d6b784a5520d..9a72612b25ee 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -32,16 +32,17 @@ #include #include #include #include #include #include #include #include +#include #include #include #include #include #include #include #include @@ -616,17 +617,17 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) default: ret = -EINVAL; break; } return ret; } -long sys_arch_prctl(int code, unsigned long addr) +SYSCALL_DEFINE2(arch_prctl, int, code, unsigned long, addr) { return do_arch_prctl(current, code, addr); } unsigned long KSTK_ESP(struct task_struct *task) { return task_pt_regs(task)->sp; } diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index 10d907098c26..2041acd77e73 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -2,16 +2,17 @@ * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #include #include +#include #include #include /* XXX This should get the constants from libc */ #include long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) { unsigned long *ptr = addr, tmp; long ret; @@ -68,17 +69,17 @@ long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr) case ARCH_GET_GS: ret = put_user(tmp, addr); break; } return ret; } -long sys_arch_prctl(int code, unsigned long addr) +SYSCALL_DEFINE2(arch_prctl, int, code, unsigned long, addr) { return arch_prctl(current, code, (unsigned long __user *) addr); } void arch_switch_to(struct task_struct *to) { if ((to->thread.arch.fs == 0) || (to->mm == NULL)) return;