From patchwork Thu Nov 17 02:06:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Huey X-Patchwork-Id: 9433415 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 B1D9E60469 for ; Thu, 17 Nov 2016 02:09:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0AC929030 for ; Thu, 17 Nov 2016 02:09:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9571E291E7; Thu, 17 Nov 2016 02:09:05 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 37D1129030 for ; Thu, 17 Nov 2016 02:09:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933262AbcKQCIq (ORCPT ); Wed, 16 Nov 2016 21:08:46 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34246 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754194AbcKQCG1 (ORCPT ); Wed, 16 Nov 2016 21:06:27 -0500 Received: by mail-pg0-f67.google.com with SMTP id e9so15804329pgc.1 for ; Wed, 16 Nov 2016 18:06:27 -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=5KgLdyChb1VY+oibCuz3BVzfWUbYmQCXEpcAiNqEPHw=; b=XE2hxVeUOlLoS9Md5MQJk4Rmo3klqBDAzeu+nj1/YgXQaZTOMX7430ucqUe3aaJd7r vFFRXtD8pt51k6gdz48pxzKd3lslbODmHJefeq2z1ATWWqJvqyC6dXrfordV3QC59jRa IafSyFIR2H8XC8hYm524jOT+GEITtjlrNPHs+Nif8sxKJNZ93CrP1/l/y+Qm03QihtST wRUka/pzu+M22LTP7R36EPbg4Pe10gXEOTjzsojL+LXgZBGqpncmf3iwpIcpi5rALpkY joyDh2KYgc0lJN+2HKNBncltOH3xoJsjmNU1i27wHRb1ps4MMueuS/5/kVDj0tpg8qQs WRFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5KgLdyChb1VY+oibCuz3BVzfWUbYmQCXEpcAiNqEPHw=; b=OJCq2zfcqyj0qDMhIvN2vwcT9zRyPZxQkuh3WZcg/H7zovd/wv586QRb0gPE6A8vxt OMsE40ZD/69NONKNtTnex+HlAj2nVN1F9T985k0Mx9P4jVWX3HgP+1KZU1sOEySqg3xw TV41UZn+yaqwdEIYvPC/sCEj8mz7+vPjOFElXG3+R9QMf5O/wl4Mm5nyjRh7uoW7nMSb uLw5GtgAQzKViA2uL5VUGAOM06bXouXOgrBVqgt1gK+MTIkFJrLzrggeB2TRtjx3Jm9K zhA9IPT/0eG5nqwPibapRhqNjY1p+4s5EH2bF7TLeUUQgIQn53+EHx36FealyAxpqinX 8+fg== X-Gm-Message-State: ABUngvfToxeKsdlhAqGD3Lu2uZ9oGZ7SMbZyvJl/RVJzIEwr+Z+EfwLu8XhYfDLXL7gIYw== X-Received: by 10.99.242.5 with SMTP id v5mr1638903pgh.181.1479348386726; Wed, 16 Nov 2016 18:06:26 -0800 (PST) Received: from minbar.hsd1.ca.comcast.net (c-73-162-102-141.hsd1.ca.comcast.net. [73.162.102.141]) by smtp.gmail.com with ESMTPSA id y20sm805793pfj.26.2016.11.16.18.06.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Nov 2016 18:06:26 -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 , "Rafael J. Wysocki" , Dmitry Safonov , David Matlack , Nadav Amit Cc: linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH v12 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Date: Wed, 16 Nov 2016 18:06:04 -0800 Message-Id: <20161117020610.5302-2-khuey@kylehuey.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161117020610.5302-1-khuey@kylehuey.com> References: <20161117020610.5302-1-khuey@kylehuey.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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(-) base-commit: 961b708e95181041f403251f660bc70be3ff6ba3 diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index b3760b3..2718cf9 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -30,16 +30,17 @@ #include #include #include #include #include #include #include #include +#include #include #include #include #include #include #include #include @@ -607,17 +608,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 e655227..ab3f7f4 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -1,16 +1,17 @@ /* * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #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; @@ -67,17 +68,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;