Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1689328pxb; Fri, 20 Aug 2021 11:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy38r+PlzlOAhJqM60gb3kZLhjzGGpc/CZw1rYvegObkOr1w4ySjj5/dsIKWwOZPXkCxN6F X-Received: by 2002:a05:6e02:1c08:: with SMTP id l8mr14533647ilh.134.1629483806261; Fri, 20 Aug 2021 11:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629483806; cv=none; d=google.com; s=arc-20160816; b=dtLWbA7AaNv8PnKYeMDkDMDRqfOrExiD2fsnvlUtrWma+V7rDK1xPnghUmAzCCFjYy 5abhA03tm+rjU1LBt6uR3nkZ2UP8mWir9Cj0SifgWhcR3P49Tz2oghjOzVkdDykWp/aQ 0ssSfC6G9ptYV+LHuc9xMi8Sx+b5Ow8z/YGwS1NINJ5UHw8VIVrZzHVNn7JkBuA8WK0x 963uNDplmmrNRblmU/Jus6N2GtT0cEABMXMgKEU1VGEXYpn6bidKH/JHwETlwZ0XhPuf Q1N148+QVfAJLswVTo5h/3hWVxll1hgy1WzclLpKXDmjQ6s9B2g7i7+/dB34n0ENQpR2 FQXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Hmz0CakBpn98itioacSyHH5q9grnBVUDOws+5hGo4JU=; b=baPOdUtCkZTNEBHbmyK0YENDKqe+AUfG018tyc55qCyxKC2VoRrpGKNJjCd/fy3qyt YPslWB9Z3dX6d13MtMEGuVzBxSWJTaq6hGmQ25fsM8c2KNi35E4zrqc5a2yw/yPu03lP 5X4f5eRnnIwkak6VxKb+Eec+OecnN+IBlVEV4MiIGhPvqMEYRrC0OmVTuV+oKOfH1fjt 0SdFTlleo7qIrxpxXJjq2eFMiXSObQTcgWGtM6+0e8elIY9q6EZgDoD4J4sdA0EJ+k6F g1ejnwnhhz0BtUhCV7mn3ofWZCCpCAdiIYW0psar1N7TVV9H7X8SiuIQKqGJGKMmtdWT WRBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si6863351iop.31.2021.08.20.11.23.13; Fri, 20 Aug 2021 11:23:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238460AbhHTSWM (ORCPT + 99 others); Fri, 20 Aug 2021 14:22:12 -0400 Received: from mga05.intel.com ([192.55.52.43]:22429 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238325AbhHTSVa (ORCPT ); Fri, 20 Aug 2021 14:21:30 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10082"; a="302407837" X-IronPort-AV: E=Sophos;i="5.84,338,1620716400"; d="scan'208";a="302407837" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2021 11:18:51 -0700 X-IronPort-AV: E=Sophos;i="5.84,338,1620716400"; d="scan'208";a="533074764" Received: from yyu32-desk.sc.intel.com ([143.183.136.146]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2021 11:18:51 -0700 From: Yu-cheng Yu To: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Dave Martin , Weijiang Yang , Pengfei Xu , Haitao Huang , Rick P Edgecombe Cc: Yu-cheng Yu Subject: [PATCH v29 24/32] x86/process: Change copy_thread() argument 'arg' to 'stack_size' Date: Fri, 20 Aug 2021 11:11:53 -0700 Message-Id: <20210820181201.31490-25-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210820181201.31490-1-yu-cheng.yu@intel.com> References: <20210820181201.31490-1-yu-cheng.yu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The single call site of copy_thread() passes stack size in 'arg'. To make this clear and in preparation of using this argument for shadow stack allocation, change 'arg' to 'stack_size'. No functional changes. Signed-off-by: Yu-cheng Yu --- arch/x86/kernel/process.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 1d9463e3096b..e6e4d8bc9023 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -116,8 +116,9 @@ static int set_new_tls(struct task_struct *p, unsigned long tls) return do_set_thread_area_64(p, ARCH_SET_FS, tls); } -int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, - struct task_struct *p, unsigned long tls) +int copy_thread(unsigned long clone_flags, unsigned long sp, + unsigned long stack_size, struct task_struct *p, + unsigned long tls) { struct inactive_task_frame *frame; struct fork_frame *fork_frame; @@ -158,7 +159,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, if (unlikely(p->flags & PF_KTHREAD)) { p->thread.pkru = pkru_get_init_value(); memset(childregs, 0, sizeof(struct pt_regs)); - kthread_frame_init(frame, sp, arg); + kthread_frame_init(frame, sp, stack_size); return 0; } @@ -191,7 +192,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, */ childregs->sp = 0; childregs->ip = 0; - kthread_frame_init(frame, sp, arg); + kthread_frame_init(frame, sp, stack_size); return 0; } -- 2.21.0