Received: by 10.213.65.68 with SMTP id h4csp594475imn; Tue, 13 Mar 2018 14:17:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELsPJU5iZbKD2fFdqFxIWyR6/IJzeFtF9HHzQNh7tQXhjGxbBkN456kEv+bfvfZvo8Y10XbS X-Received: by 2002:a17:902:8287:: with SMTP id y7-v6mr1808769pln.85.1520975863902; Tue, 13 Mar 2018 14:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520975863; cv=none; d=google.com; s=arc-20160816; b=omSAixztbPHbmD49MLgIUrQG6ibs/b2PQWGvxDUeJn2UuBkh5H3CQxIGkvwJ7l8mzR tKYZ19E2i6p42sq4HzY4QNWQFDXC+Gpv2LvBBjGHrKxHzgwwaXB9PN6A1sdavFYzVQGm jP1Vd+oViWXVqRMcLg4SsR2QSqxONq/aoJcnLrxiJpCxTKTHHa0jBFJXrKP9/MjOS9gL vf8NS9QenUKaaUYWTPUK2l98JNqxqPYt4ilQ8tZwA3HHBQw2WJkrhmh30XRbZJrM7Kt8 X/NyWwerlkFjg4hXNRBaVJK6ycQUDPMHd75rc0DE0IeOUsCb1X9rh5UfJLnAgnOfud6r VWSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=7crhatYL5QF1vifCNWjwo15qefrn36QZYalesyaXMv4=; b=RxWqZtByDrSZO9NdLoeYypbNq3PEzUuAeqMw7X4oueWzjX59X3PcgcnThCJhcRsCj1 Zr8GqUKavCzzC7oRFVRc16O7kVJ4+Y1yPvr0YUHOA4RVUvE1XR79F6AqARt4Dz6TOTj+ vgOozoDhuafcWMQmVf82ABuJQ1G+lC8fXG3izSCKY0LoHwK+V1b0aMIpdZDdW2E8VzYF +AlwEEFTFWPRdFHLciHYhzGLvg77RwbtX/Nx1+lfWy4UuRJSmSP/Cr33nnc86LbALmHj ytm69uYphUCxlJ3AgxY35zGrYDWggjBOrAxluujLr/xqfZwmM5m96zgkU2588vXk7+1L gZjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UIiJwDYS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20-v6si705430pls.294.2018.03.13.14.17.29; Tue, 13 Mar 2018 14:17:43 -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=@google.com header.s=20161025 header.b=UIiJwDYS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752576AbeCMVQY (ORCPT + 99 others); Tue, 13 Mar 2018 17:16:24 -0400 Received: from mail-ot0-f195.google.com ([74.125.82.195]:39501 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbeCMVQX (ORCPT ); Tue, 13 Mar 2018 17:16:23 -0400 Received: by mail-ot0-f195.google.com with SMTP id h8-v6so1131375oti.6 for ; Tue, 13 Mar 2018 14:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7crhatYL5QF1vifCNWjwo15qefrn36QZYalesyaXMv4=; b=UIiJwDYSnD+G0+BNOazuQDNE0fk/V8chUWxyCI5ZqCIZ4g16nNGdnZxwcylGs47G4q vTjhWssONV3rlX/TZvoCLbXSQWqY4Sbp5FLuCn0v6FzdDvZ01FE5lxswpM12f/l0ZlkC Xfix2gR4xZFbRlTA016d0ugnI7X8fbXgGwfRrL+/wl3TywezIiRQayoPo3fJznQabaOD d4ZGHcjaGFgbDQrkvPV/EK/MoU812st0g47PSGxAwuPvwRJmb9M2LgrTN5FvBLkJuP84 npqrI4l4UiYtKFvfPzBqQ1mDPNXkFRcoWToyvDOeMhJr2oSUJLPlHorDadCNV0rx8Ss3 dcrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7crhatYL5QF1vifCNWjwo15qefrn36QZYalesyaXMv4=; b=X0Z/5uylovZQlmXsKYm/8qP6BzOo8abWH2wgEr2UerkKvlYYnzdUMN2MsOQnGzibxt Kzz7GQpEYs1Am39rlsqLp7octYoXUlX1rymy35H0LWhOFoz3SjKyZTHUV9juxBjQGLFN UpOs8cw6EStbGDyRrtAEai1Eclk6A6oP1Wy9NyAJ4Y+bW+6MTmzxRQex6qhoEFw5gmKm Xf53cHVGufo9q9MigxD1knDAWff5tAIqQk+ECUzIOYmCJbAEv+JYHZKNA4CJc9bJi1Yd yHgSHX90W8N6VhTneMklzIgn1SH7fmsBibEbAndepVe6toTFnRSjujKTTAHlSWP80+Yp YoYw== X-Gm-Message-State: AElRT7EC6VYMDQPWuVh2g54bf330yQ0C9gax0Y5oQX6xdK2aarCIV9zU PnFZ98lUx5fsKYYuL+GWdUGyR4xe5SAMWCQcoNyMWg== X-Received: by 10.157.15.8 with SMTP id 8mr1444093ott.0.1520975782347; Tue, 13 Mar 2018 14:16:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.39.84 with HTTP; Tue, 13 Mar 2018 14:16:01 -0700 (PDT) In-Reply-To: <14A5C8D0-3F9D-486F-A20C-55849D70FC80@amazon.com> References: <14A5C8D0-3F9D-486F-A20C-55849D70FC80@amazon.com> From: Jann Horn Date: Tue, 13 Mar 2018 14:16:01 -0700 Message-ID: Subject: Re: [PATCH] x86: always use SYSCALL_DEFINE* To: "Tautschnig, Michael" Cc: "x86@kernel.org" , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jaswinder Singh , Andi Kleen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 10, 2018 at 12:55 PM, Tautschnig, Michael wrote: > All syscall arguments are passed in as types of the same byte size as > unsigned long (width of full registers). Using a smaller type without a > cast may result in losing bits of information. SYSCALL_DEFINE* introduce > adequate type casts. All definitions of syscalls in x86 except for those > patched here have already been using the appropriate SYSCALL_DEFINE*. [...] > diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c > index 2f72330..d98b2a3 100644 > --- a/arch/x86/kernel/ioport.c > +++ b/arch/x86/kernel/ioport.c > @@ -23,7 +23,8 @@ > /* > * this changes the io permissions bitmap in the current task. > */ > -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) > +SYSCALL_DEFINE3(sys_ioperm, unsigned long, from, unsigned long, num, int, > + turn_on) Shouldn't this be "SYSCALL_DEFINE3(ioperm, [...]", without the "sys_"?