From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 518B2C4360F for ; Thu, 4 Apr 2019 07:53:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2ABF020882 for ; Thu, 4 Apr 2019 07:53:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726923AbfDDHxK (ORCPT ); Thu, 4 Apr 2019 03:53:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43812 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfDDHxK (ORCPT ); Thu, 4 Apr 2019 03:53:10 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hBxAR-0000ST-TQ; Thu, 04 Apr 2019 09:52:12 +0200 Date: Thu, 4 Apr 2019 09:52:11 +0200 (CEST) From: Thomas Gleixner To: Steven Rostedt cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Andy Lutomirski , Roland McGrath , Oleg Nesterov , linux-arch@vger.kernel.org, Peter Zijlstra , "Gustavo A. R. Silva" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Dominik Brodowski , Andy Lutomirski , Kees Cook , "Eric W. Biederman" , "Dmitry V. Levin" , Palmer Dabbelt , Alexey Dobriyan , Al Viro , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/6 v3] ptrace: Remove maxargs from task_current_syscall() In-Reply-To: <20190401134420.601152379@goodmis.org> Message-ID: References: <20190401134104.676620247@goodmis.org> <20190401134420.601152379@goodmis.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, 1 Apr 2019, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > task_current_syscall() has a single user that passes in 6 for maxargs, which > is the maximum arguments that can be used to get system calls from > syscall_get_arguments(). Instead of passing in a number of arguments to > grab, just get 6 arguments. The args argument even specifies that it's an > array of 6 items. > > This will also allow changing syscall_get_arguments() to not get a variable > number of arguments, but always grab 6. > > Linus also suggested not passing in a bunch of arguments to > task_current_syscall() but to instead pass in a pointer to a structure, and > just fill the structure. struct seccomp_data has almost all the parameters > that is needed except for the stack pointer (sp). As seccomp_data is part of > uapi, and I'm afraid to change it, a new structure was created > "syscall_info", which includes seccomp_data and adds the "sp" field. > > Link: http://lkml.kernel.org/r/20161107213233.466776454@goodmis.org > > Cc: Thomas Gleixner > Cc: Andy Lutomirski > Cc: Alexey Dobriyan > Cc: Oleg Nesterov > Cc: Kees Cook > Cc: Al Viro > Cc: linux-fsdevel@vger.kernel.org > Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner