From patchwork Tue Nov 8 18:39:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Huey X-Patchwork-Id: 9417923 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 07C0260512 for ; Tue, 8 Nov 2016 18:43:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE0F4285AE for ; Tue, 8 Nov 2016 18:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2861286E9; Tue, 8 Nov 2016 18:43:18 +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 81DCE285AE for ; Tue, 8 Nov 2016 18:43:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753403AbcKHSlj (ORCPT ); Tue, 8 Nov 2016 13:41:39 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32977 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753306AbcKHSkc (ORCPT ); Tue, 8 Nov 2016 13:40:32 -0500 Received: by mail-pf0-f193.google.com with SMTP id 144so12086240pfv.0 for ; Tue, 08 Nov 2016 10:40:06 -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=dubtWHk6ju/tTASyyfgTyGdgbeKGpb8YdQJbbHvvOYc=; b=Xro5/SiircNmmvM2jDLhSepqBdtqDYTADNqPuoMT8fqDtm6YSqhRs4kw7Kzmsiur+0 bCVtjgfPh4Nr44/jK2p0Bh7X8WZCilpe1OQMEnOVfrY729Hc/u0bPZwd6DHGXzQ4n+hl MCnnRNVGxU8snlBW5RXcmXyq9LefBmW9/T5KYrIbYD9Gxy19ZLLAe8Q+BhoqHRZj2/7h WTZbFyHtwxAWuzbaJi+UWiyHcqdwE3XKuBbMZaL8N0FXHRDggX2cQ06L3+POcicPjjnz G4h3eBPVMAk/2sD594Hbio7L6Xp5kn1q8lunDP8XGiPyhvy1aHO8NVR4iwN/g9e/MqO3 0f8g== 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=dubtWHk6ju/tTASyyfgTyGdgbeKGpb8YdQJbbHvvOYc=; b=Bm1JRGmcntk2IeeifBruN1tem1NlTlDWO1kFYbh5gNSxH6xkJot/5xRsFHJ4UDAMyt SD+9MF8w3zVarxgjY/G3mW1K0FNfRHDyTpE65PVA9Mfy0PH3M6GgTmqLbk8Ptu3q9nrt zcIbt+JO7bd10QK5IaPmay0/j19Plcvs1FbZ8Aq/XNk4QWgl+HlakHWnjLy9dTDfxmyC 8KiEBiOJRAM8v1BFmBcAV6KeJ9gCCTdEYQhorbWSsfYh95gj7kOAAZMFcEhZMqk3pIXM i2K4Nln2reTVs7zveZh+uAe0+Hn2hTmXMB4JE4GA7kmeRdpKPEFB/eC1vWMt3Gc31Nbv 73BA== X-Gm-Message-State: ABUngvdUdyvo6/TwIJ2kB7JmvTBPY7Lc5Y7HS075QaLf/Zi4qeXGJ3Iq7hBKQq0tHfHdwA== X-Received: by 10.98.14.197 with SMTP id 66mr25557066pfo.123.1478630406194; Tue, 08 Nov 2016 10:40:06 -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 a7sm49773845pfl.87.2016.11.08.10.40.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Nov 2016 10:40:05 -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 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 v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Date: Tue, 8 Nov 2016 10:39:50 -0800 Message-Id: <20161108183956.4521-2-khuey@kylehuey.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161108183956.4521-1-khuey@kylehuey.com> References: <20161108183956.4521-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 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: e3a00f68e426df24a5fb98956a1bd1b23943aa1e 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;