[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <062173c3525481f5dff28787dc9d818fe97bbfa0.camel@intel.com>
Date: Fri, 11 Feb 2022 02:09:38 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "bsingharora@...il.com" <bsingharora@...il.com>,
"hpa@...or.com" <hpa@...or.com>,
"Syromiatnikov, Eugene" <esyr@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"rdunlap@...radead.org" <rdunlap@...radead.org>,
"keescook@...omium.org" <keescook@...omium.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"Eranian, Stephane" <eranian@...gle.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"fweimer@...hat.com" <fweimer@...hat.com>,
"nadav.amit@...il.com" <nadav.amit@...il.com>,
"jannh@...gle.com" <jannh@...gle.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"kcc@...gle.com" <kcc@...gle.com>, "bp@...en8.de" <bp@...en8.de>,
"oleg@...hat.com" <oleg@...hat.com>,
"hjl.tools@...il.com" <hjl.tools@...il.com>,
"Yang, Weijiang" <weijiang.yang@...el.com>,
"Lutomirski, Andy" <luto@...nel.org>,
"pavel@....cz" <pavel@....cz>, "arnd@...db.de" <arnd@...db.de>,
"Moreira, Joao" <joao.moreira@...el.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mike.kravetz@...cle.com" <mike.kravetz@...cle.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"Dave.Martin@....com" <Dave.Martin@....com>,
"john.allen@....com" <john.allen@....com>,
"mingo@...hat.com" <mingo@...hat.com>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
"corbet@....net" <corbet@....net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"gorcunov@...il.com" <gorcunov@...il.com>
CC: "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
Subject: Re: [PATCH 26/35] x86/process: Change copy_thread() argument 'arg' to
'stack_size'
On Tue, 2022-02-08 at 09:38 +0100, Thomas Gleixner wrote:
> On Sun, Jan 30 2022 at 13:18, Rick Edgecombe wrote:
> > -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;
> > }
>
> Can you please change the prototypes too for completeness sake?
In the header it's:
extern int copy_thread(unsigned long, unsigned long, unsigned long,
struct task_struct *, unsigned long);
And the various arch implementations call the stack size: arg,
kthread_arg, stk_sz, etc.
Adding names to the prototype would conflict with the some arch's names
unless they were all unified. Is it a worthwhile refactor?
Powered by blists - more mailing lists