Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp620311pxb; Tue, 1 Feb 2022 07:08:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6dfHQ/L0MIatlL8Q5VDgTBwlLVDOGACcfcKKSJxLeCsWHKS941JNNcHMvDtvZz5gUW4Do X-Received: by 2002:a17:907:3d8f:: with SMTP id he15mr21437032ejc.623.1643728120520; Tue, 01 Feb 2022 07:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643728120; cv=none; d=google.com; s=arc-20160816; b=ua4wGQtK3N/dOg8ojHyLjoXrNby6ItxDmEzlTQMppkVUGcfJGavihLUD0Dm6ITDH0F 3YVAuDIyMLR+VJW2Jirhdo7Xn4PXQ9IyxjRaEI8WFUUNRh5R6yhWqZE5b9Q5c690Vu53 t938GibGDZ2m6HKbKz87Q+LjAqLFzI4hvxyCvl5S3uvZ8Auc5Nr6VzvBR96Tv6RCihfB gaxBxFSjlpA0MtaYJwxz4r2UWxGnOOH9mVk78rWq5MORFTULyYRYZ9iva/FwfN6v7wTW htCh1IO82T7ZNpGD8lNo8HmfkecOfcFtARIR4+jEv8OByzkEyogbnrBlBYgPD9JWP7/q Qluw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=OVbE6NmN88KPcXBJH43vKbgLgCyQ5FxAv31KNVUVXgg=; b=LAL494YRhv65zrAlUTEjcRjGDd9GNktFwmIQOkzDTrM5QfUtWpgcaHiuD5ufLeHNWd XlUccLlAnZ4QoodhC2wlw1351qUhXejA4ZVMh5CgONU/65V9DpBCTM5lLBkQHAmfobn4 a27CUejgNTXIPs9mHdt21L8ycwWwHf+bWKjSDZNEx0yIhv01aho36b3E2iHE27+rVMs9 sUBbmBkeHDdMhq0v8kaiWV8OYDJ41HMkekD6pptjrweHc3syMUwwG9RIFGXSw6MGHTyJ q1TT5Uxj7ACNy+PFcJXWUe9W7YqTS8ZZcJw8yD60xFbHxc5fSGacwCEBWhesm+FCv4T0 L9tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LyiqoGcv; 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=pass (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 z3si9823962edc.168.2022.02.01.07.08.14; Tue, 01 Feb 2022 07:08:40 -0800 (PST) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=LyiqoGcv; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356529AbiA3VZ4 (ORCPT + 99 others); Sun, 30 Jan 2022 16:25:56 -0500 Received: from mga06.intel.com ([134.134.136.31]:52202 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356742AbiA3VY5 (ORCPT ); Sun, 30 Jan 2022 16:24:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643577897; x=1675113897; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iszGpgXYExAyyOaulmbapPJ8Xs6AdZ3T2R4pfVKChQc=; b=LyiqoGcvCHzEL9hklGwbcMREkI05p57QPrZxJFs2mBQP1ZKm4GoBLIDp bnLBOyZ5wmD5H0iBqR5iZ9YF4ZreI4KcdRINaY6jv5NC0XHt/dfLIMzV6 uNsZyMN4OlQtrQUTowTTFuk90uxhwLz9tt8iFfnFbMYRJFIqtXARPv23X VQrSbmFrtzB4WPTKpkFqnXBORKi8kAmoUHKhe3ARQWqLu+/KGvuc1+g/5 7gP73ikOO/2XkOuQM2mzba71hVkHDlv//m83z4LcaKTKV+Em6Emthl1LY 2wSnEaZ46qwtXUFe0/LcPzOdpsFmbZJkQw3DInzzOG58H/HXKd8YVX8A5 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10243"; a="308104971" X-IronPort-AV: E=Sophos;i="5.88,329,1635231600"; d="scan'208";a="308104971" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2022 13:22:07 -0800 X-IronPort-AV: E=Sophos;i="5.88,329,1635231600"; d="scan'208";a="536856908" Received: from avmallar-mobl1.amr.corp.intel.com (HELO rpedgeco-desk.amr.corp.intel.com) ([10.209.123.171]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2022 13:22:06 -0800 From: Rick Edgecombe 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 , "Kirill A . Shutemov" , joao.moreira@intel.com, John Allen , kcc@google.com, eranian@google.com Cc: rick.p.edgecombe@intel.com, Yu-cheng Yu Subject: [PATCH 26/35] x86/process: Change copy_thread() argument 'arg' to 'stack_size' Date: Sun, 30 Jan 2022 13:18:29 -0800 Message-Id: <20220130211838.8382-27-rick.p.edgecombe@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220130211838.8382-1-rick.p.edgecombe@intel.com> References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yu-cheng Yu 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 Signed-off-by: Rick Edgecombe --- 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 81d8ef036637..82a816178e7f 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -130,8 +130,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; @@ -175,7 +176,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; } @@ -208,7 +209,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.17.1