All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared
@ 2017-03-30  9:31 kbuild test robot
  2017-03-30  9:45 ` Dmitry Safonov
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2017-03-30  9:31 UTC (permalink / raw)
  To: Dmitry Safonov; +Cc: kbuild-all, linux-kernel, tipbuild, Thomas Gleixner

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/mm
head:   693bcce23a1f830d64480cad10f4004e520965fd
commit: 693bcce23a1f830d64480cad10f4004e520965fd [1/1] x86/mm: Make in_compat_syscall() work during exec
config: x86_64-randconfig-x012-201713 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 693bcce23a1f830d64480cad10f4004e520965fd
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   arch/x86/kernel/process_64.c: In function '__set_personality_ia32':
>> arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared (first use in this function)
     task_pt_regs(current)->orig_ax = __NR_ia32_execve;
                                      ^~~~~~~~~~~~~~~~
   arch/x86/kernel/process_64.c:541:35: note: each undeclared identifier is reported only once for each function it appears in

vim +/__NR_ia32_execve +541 arch/x86/kernel/process_64.c

   535		set_thread_flag(TIF_IA32);
   536		clear_thread_flag(TIF_X32);
   537		if (current->mm)
   538			current->mm->context.ia32_compat = TIF_IA32;
   539		current->personality |= force_personality32;
   540		/* Prepare the first "return" to user space */
 > 541		task_pt_regs(current)->orig_ax = __NR_ia32_execve;
   542		current->thread.status |= TS_COMPAT;
   543	#endif
   544	}

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31204 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared
  2017-03-30  9:31 [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared kbuild test robot
@ 2017-03-30  9:45 ` Dmitry Safonov
  2017-03-31  7:25   ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Safonov @ 2017-03-30  9:45 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kbuild test robot, kbuild-all, linux-kernel, tipbuild

On 03/30/2017 12:31 PM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/mm
> head:   693bcce23a1f830d64480cad10f4004e520965fd
> commit: 693bcce23a1f830d64480cad10f4004e520965fd [1/1] x86/mm: Make in_compat_syscall() work during exec
> config: x86_64-randconfig-x012-201713 (attached as .config)
> compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> reproduce:
>         git checkout 693bcce23a1f830d64480cad10f4004e520965fd
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
>    arch/x86/kernel/process_64.c: In function '__set_personality_ia32':
>>> arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared (first use in this function)
>      task_pt_regs(current)->orig_ax = __NR_ia32_execve;
>                                       ^~~~~~~~~~~~~~~~
>    arch/x86/kernel/process_64.c:541:35: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +/__NR_ia32_execve +541 arch/x86/kernel/process_64.c
>
>    535		set_thread_flag(TIF_IA32);
>    536		clear_thread_flag(TIF_X32);
>    537		if (current->mm)
>    538			current->mm->context.ia32_compat = TIF_IA32;
>    539		current->personality |= force_personality32;
>    540		/* Prepare the first "return" to user space */
>  > 541		task_pt_regs(current)->orig_ax = __NR_ia32_execve;
>    542		current->thread.status |= TS_COMPAT;
>    543	#endif
>    544	}

There was this chunk in the patch, maybe it could be done nicer,
but I didn't find the nicer way.
I checked it compilation/work with(out) ia32/x32/64-bit configs
before sending.

--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -486,6 +486,10 @@ __switch_to(struct task_struct *prev_p, struct 
task_struct *next_p)
  	return prev_p;
  }

+#define __NR_execve		59
+#define __NR_x32_execve		520
+#define __NR_ia32_execve	11
+
  void set_personality_64bit(void)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared
  2017-03-30  9:45 ` Dmitry Safonov
@ 2017-03-31  7:25   ` Thomas Gleixner
  2017-03-31 10:08     ` Dmitry Safonov
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2017-03-31  7:25 UTC (permalink / raw)
  To: Dmitry Safonov; +Cc: kbuild test robot, kbuild-all, linux-kernel, tipbuild

On Thu, 30 Mar 2017, Dmitry Safonov wrote:
> > vim +/__NR_ia32_execve +541 arch/x86/kernel/process_64.c
> > 
> >    535		set_thread_flag(TIF_IA32);
> >    536		clear_thread_flag(TIF_X32);
> >    537		if (current->mm)
> >    538			current->mm->context.ia32_compat = TIF_IA32;
> >    539		current->personality |= force_personality32;
> >    540		/* Prepare the first "return" to user space */
> >  > 541		task_pt_regs(current)->orig_ax = __NR_ia32_execve;
> >    542		current->thread.status |= TS_COMPAT;
> >    543	#endif
> >    544	}
> 
> There was this chunk in the patch, maybe it could be done nicer,
> but I didn't find the nicer way.
> I checked it compilation/work with(out) ia32/x32/64-bit configs
> before sending.

Yeah, I know and it's just crap. WTF is wrong with:

#ifdef CONFIG_IA32_EMULATION
#include <asm/unistd_32_ia32.h>
#endif

It's not rocket science, really.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared
  2017-03-31  7:25   ` Thomas Gleixner
@ 2017-03-31 10:08     ` Dmitry Safonov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Safonov @ 2017-03-31 10:08 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kbuild test robot, kbuild-all, linux-kernel, tipbuild

On 03/31/2017 10:25 AM, Thomas Gleixner wrote:
> On Thu, 30 Mar 2017, Dmitry Safonov wrote:
>>> vim +/__NR_ia32_execve +541 arch/x86/kernel/process_64.c
>>>
>>>    535		set_thread_flag(TIF_IA32);
>>>    536		clear_thread_flag(TIF_X32);
>>>    537		if (current->mm)
>>>    538			current->mm->context.ia32_compat = TIF_IA32;
>>>    539		current->personality |= force_personality32;
>>>    540		/* Prepare the first "return" to user space */
>>>  > 541		task_pt_regs(current)->orig_ax = __NR_ia32_execve;
>>>    542		current->thread.status |= TS_COMPAT;
>>>    543	#endif
>>>    544	}
>>
>> There was this chunk in the patch, maybe it could be done nicer,
>> but I didn't find the nicer way.
>> I checked it compilation/work with(out) ia32/x32/64-bit configs
>> before sending.
>
> Yeah, I know and it's just crap. WTF is wrong with:

Oh, here it is the nicer way.
I've forgot that `git grep` doesn't look into generated files.

> #ifdef CONFIG_IA32_EMULATION
> #include <asm/unistd_32_ia32.h>
> #endif
>
> It's not rocket science, really.

Sorry about that, I'll resend.


-- 
              Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-31 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  9:31 [tip:WIP.x86/mm 1/1] arch/x86/kernel/process_64.c:541:35: error: '__NR_ia32_execve' undeclared kbuild test robot
2017-03-30  9:45 ` Dmitry Safonov
2017-03-31  7:25   ` Thomas Gleixner
2017-03-31 10:08     ` Dmitry Safonov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.