x86: Readd asmregparm
Subsystems (3)
PATCH 1/3 x86: Readd asmregparm
From: Andi Kleen <[email protected]>
For a followon patchkit of mine I need to mark all functions that can be called from assembler. But on 32bit kernels some assembler functions are called with register arguments and others with stack arguments. asmlinkage forces stack arguments.
This patch readds the recently removed asmregparm to be able to mark assembler functions called with register arguments on 32bit.
Unlike the old code it's x86 only now to prevent it from leaking.
--- arch/x86/include/asm/linkage.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
arch/x86/include/asm/linkage.h +4 -1
@@ -8,6 +8,7 @@#ifdef CONFIG_X86_32 #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0))) +#define asmregparm CPP_ASMLINKAGE __attribute__((regparm(3)))/* * Make sure the compiler doesn't do anything stupid with the
@@ -42,7 +43,9 @@__asmlinkage_protect_n (ret,"g" (arg1),"g" (arg2),"g" (arg3), \ "g" (arg4), "g" (arg5), "g" (arg6)) -#endif /* CONFIG_X86_32 */ +#else +#define asmregparm asmlinkage +#endif /* !CONFIG_X86_32 */ #ifdef __ASSEMBLY__
Signature · 1 line
1.7.4.4
PATCH 3/3 x86: Change dotraplinkage into asmregparm for 32bit
From: Andi Kleen <[email protected]>
Now with asmregparm available again it's cleaner to explicitely mark them as needing register params on 32bit.
--- arch/x86/include/asm/traps.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/include/asm/traps.h +1 -1
@@ -5,7 +5,7 @@#include <asm/siginfo.h> /* TRAP_TRACE, ... */ #ifdef CONFIG_X86_32 -#define dotraplinkage +#define dotraplinkage asmregparm#else #define dotraplinkage asmlinkage#endif
Signature · 1 line
1.7.4.4
PATCH 2/3 x86: Add missing asmlinkages/asmregparm
In reply to Andi KleenFrom: Andi Kleen <[email protected]>
Relies on the earlier patch to readd asmregparm.
This is an arch/x86 sweep to add asmlinkage or asmregparm
to all functions called by assembler code, including interrupt handlers, syscalls and others.
I need this for a followon project that requires all functions called by assembler to be marked in a special way.
The unmarked syscalls are marked asmregparm now. That's unusal for syscalls -- normally they are all asmlinkage aka stack arguments. I kept it at asmregparm to generate the same binary.
All calls with no argument are asmlinkage
All other functions that were unmarked before are asmregparm now.
On 64bit it's all a nop currently.
I verified the patch generates the same binary as before.
I kept it all in a single patch for now. Please let me know if you want it split up.
--- arch/x86/include/asm/hw_irq.h | 116 +++++++++++++++++++------------------- arch/x86/include/asm/irq.h | 2 +- arch/x86/include/asm/kprobes.h | 2 +- arch/x86/include/asm/paravirt.h | 2 +- arch/x86/include/asm/setup.h | 6 +- arch/x86/include/asm/signal.h | 2 +- arch/x86/include/asm/syscalls.h | 22 ++++---- arch/x86/include/asm/system.h | 3 +- arch/x86/kernel/apic/apic.c | 6 +- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/ioport.c | 2 +- arch/x86/kernel/irq.c | 4 +- arch/x86/kernel/irq_work.c | 2 +- arch/x86/kernel/kprobes.c | 2 +- arch/x86/kernel/process.c | 10 ++-- arch/x86/kernel/process_32.c | 2 +- arch/x86/kernel/process_64.c | 2 +- arch/x86/kernel/signal.c | 8 +- arch/x86/kernel/smp.c | 6 +- arch/x86/kernel/syscall_64.c | 2 +- arch/x86/kernel/vm86_32.c | 3 +- arch/x86/mm/tlb.c | 5 +- 23 files changed, 106 insertions(+), 107 deletions(-)
arch/x86/include/asm/hw_irq.h +58 -58
@@ -26,56 +26,56 @@#include <asm/sections.h> /* Interrupt handlers registered during init_IRQ */ -extern void apic_timer_interrupt (void ); -extern void x86_platform_ipi (void ); -extern void error_interrupt (void ); -extern void irq_work_interrupt (void ); - -extern void spurious_interrupt (void ); -extern void thermal_interrupt (void ); -extern void reschedule_interrupt (void ); -extern void mce_self_interrupt (void ); - -extern void invalidate_interrupt (void ); -extern void invalidate_interrupt0 (void ); -extern void invalidate_interrupt1 (void ); -extern void invalidate_interrupt2 (void ); -extern void invalidate_interrupt3 (void ); -extern void invalidate_interrupt4 (void ); -extern void invalidate_interrupt5 (void ); -extern void invalidate_interrupt6 (void ); -extern void invalidate_interrupt7 (void ); -extern void invalidate_interrupt8 (void ); -extern void invalidate_interrupt9 (void ); -extern void invalidate_interrupt10 (void ); -extern void invalidate_interrupt11 (void ); -extern void invalidate_interrupt12 (void ); -extern void invalidate_interrupt13 (void ); -extern void invalidate_interrupt14 (void ); -extern void invalidate_interrupt15 (void ); -extern void invalidate_interrupt16 (void ); -extern void invalidate_interrupt17 (void ); -extern void invalidate_interrupt18 (void ); -extern void invalidate_interrupt19 (void ); -extern void invalidate_interrupt20 (void ); -extern void invalidate_interrupt21 (void ); -extern void invalidate_interrupt22 (void ); -extern void invalidate_interrupt23 (void ); -extern void invalidate_interrupt24 (void ); -extern void invalidate_interrupt25 (void ); -extern void invalidate_interrupt26 (void ); -extern void invalidate_interrupt27 (void ); -extern void invalidate_interrupt28 (void ); -extern void invalidate_interrupt29 (void ); -extern void invalidate_interrupt30 (void ); -extern void invalidate_interrupt31 (void ); - -extern void irq_move_cleanup_interrupt (void ); -extern void reboot_interrupt (void ); -extern void threshold_interrupt (void ); - -extern void call_function_interrupt (void ); -extern void call_function_single_interrupt (void ); +asmlinkage extern void apic_timer_interrupt(void); +asmlinkage extern void x86_platform_ipi(void); +asmlinkage extern void error_interrupt(void); +asmlinkage extern void irq_work_interrupt(void); + +asmlinkage extern void spurious_interrupt(void); +asmlinkage extern void thermal_interrupt(void); +asmlinkage extern void reschedule_interrupt(void); +asmlinkage extern void mce_self_interrupt(void); + +asmlinkage extern void invalidate_interrupt(void); +asmlinkage extern void invalidate_interrupt0(void); +asmlinkage extern void invalidate_interrupt1(void); +asmlinkage extern void invalidate_interrupt2(void); +asmlinkage extern void invalidate_interrupt3(void); +asmlinkage extern void invalidate_interrupt4(void); +asmlinkage extern void invalidate_interrupt5(void); +asmlinkage extern void invalidate_interrupt6(void); +asmlinkage extern void invalidate_interrupt7(void); +asmlinkage extern void invalidate_interrupt8(void); +asmlinkage extern void invalidate_interrupt9(void); +asmlinkage extern void invalidate_interrupt10(void); +asmlinkage extern void invalidate_interrupt11(void); +asmlinkage extern void invalidate_interrupt12(void); +asmlinkage extern void invalidate_interrupt13(void); +asmlinkage extern void invalidate_interrupt14(void); +asmlinkage extern void invalidate_interrupt15(void); +asmlinkage extern void invalidate_interrupt16(void); +asmlinkage extern void invalidate_interrupt17(void); +asmlinkage extern void invalidate_interrupt18(void); +asmlinkage extern void invalidate_interrupt19(void); +asmlinkage extern void invalidate_interrupt20(void); +asmlinkage extern void invalidate_interrupt21(void); +asmlinkage extern void invalidate_interrupt22(void); +asmlinkage extern void invalidate_interrupt23(void); +asmlinkage extern void invalidate_interrupt24(void); +asmlinkage extern void invalidate_interrupt25(void); +asmlinkage extern void invalidate_interrupt26(void); +asmlinkage extern void invalidate_interrupt27(void); +asmlinkage extern void invalidate_interrupt28(void); +asmlinkage extern void invalidate_interrupt29(void); +asmlinkage extern void invalidate_interrupt30(void); +asmlinkage extern void invalidate_interrupt31(void); + +asmlinkage extern void irq_move_cleanup_interrupt(void); +asmlinkage extern void reboot_interrupt(void); +asmlinkage extern void threshold_interrupt(void); + +asmlinkage extern void call_function_interrupt(void); +asmlinkage extern void call_function_single_interrupt(void);/* IOAPIC */ #define IO_APIC_IRQ (x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs))
@@ -144,19 +144,19 @@ extern atomic_t irq_mis_count;extern void eisa_set_level_irq (unsigned int irq);/* SMP */ -extern void smp_apic_timer_interrupt (struct pt_regs *); -extern void smp_spurious_interrupt (struct pt_regs *); -extern void smp_x86_platform_ipi (struct pt_regs *); -extern void smp_error_interrupt (struct pt_regs *); +extern asmregparm void smp_apic_timer_interrupt(struct pt_regs *); +extern asmregparm void smp_spurious_interrupt(struct pt_regs *); +extern asmregparm void smp_x86_platform_ipi(struct pt_regs *); +extern asmregparm void smp_error_interrupt(struct pt_regs *);#ifdef CONFIG_X86_IO_APIC extern asmlinkage void smp_irq_move_cleanup_interrupt(void);#endif #ifdef CONFIG_SMP -extern void smp_reschedule_interrupt (struct pt_regs *); -extern void smp_call_function_interrupt (struct pt_regs *); -extern void smp_call_function_single_interrupt (struct pt_regs *); +extern asmregparm void smp_reschedule_interrupt(struct pt_regs *); +extern asmregparm void smp_call_function_interrupt(struct pt_regs *); +extern asmregparm void smp_call_function_single_interrupt(struct pt_regs *);#ifdef CONFIG_X86_32 -extern void smp_invalidate_interrupt (struct pt_regs *); +extern asmregparm void smp_invalidate_interrupt(struct pt_regs *);#else extern asmlinkage void smp_invalidate_interrupt(struct pt_regs *);#endif
arch/x86/include/asm/irq.h +1 -1
@@ -33,7 +33,7 @@ extern void (*x86_platform_ipi_callback)(void);extern void native_init_IRQ (void );extern bool handle_irq (unsigned irq,struct pt_regs *regs); -extern unsigned int do_IRQ (struct pt_regs *regs); +extern asmregparm unsigned int do_IRQ(struct pt_regs *regs);/* Interrupt vector management */ extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
arch/x86/include/asm/kprobes.h +1 -1
@@ -61,7 +61,7 @@ extern __visible kprobe_opcode_t optprobe_template_end;extern const int kretprobe_blacklist_size;void arch_remove_kprobe (struct kprobe *p); -void kretprobe_trampoline (void ); +asmlinkage void kretprobe_trampoline(void);/* Architecture specific copy of original instruction*/ struct arch_specific_insn {
arch/x86/include/asm/paravirt.h +1 -1
@@ -829,7 +829,7 @@ static __always_inline void arch_spin_unlock(struct arch_spinlock *lock)* functions. */ #define PV_CALLEE_SAVE_REGS_THUNK (func) \ - extern typeof(func) __raw_callee_save_##func; \ + extern asmregparm typeof(func) __raw_callee_save_##func; \ static void *__##func##__ __used = func; \ \ asm(".pushsection .text;" \
arch/x86/include/asm/setup.h +3 -3
@@ -107,11 +107,11 @@ void *extend_brk(size_t size, size_t align);extern void probe_roms (void );#ifdef __i386__ -void __init i386_start_kernel (void ); +asmlinkage void __init i386_start_kernel(void);#else -void __init x86_64_start_kernel (char *real_mode); -void __init x86_64_start_reservations (char *real_mode_data); +asmlinkage void __init x86_64_start_kernel(char *real_mode); +asmlinkage void __init x86_64_start_reservations(char *real_mode_data);#endif /* __i386__ */ #endif /* _SETUP */
arch/x86/include/asm/signal.h +1 -1
@@ -122,7 +122,7 @@ typedef unsigned long sigset_t;#ifndef __ASSEMBLY__# ifdef __KERNEL__ -extern void do_notify_resume (struct pt_regs *,void *,__u32 ); +extern asmregparm void do_notify_resume(struct pt_regs *, void *, __u32);# endif /* __KERNEL__ */ #ifdef __i386__
arch/x86/include/asm/syscalls.h +11 -11
@@ -18,23 +18,23 @@/* Common in X86_32 and X86_64 */ /* kernel/ioport.c */ asmlinkage long sys_ioperm (unsigned long ,unsigned long ,int ); -long sys_iopl (unsigned int ,struct pt_regs *); +asmregparm long sys_iopl (unsigned int ,struct pt_regs *);/* kernel/process.c */ -int sys_fork (struct pt_regs *); -int sys_vfork (struct pt_regs *); -long sys_execve (const char __user *, +asmregparm int sys_fork(struct pt_regs *); +asmregparm int sys_vfork(struct pt_regs *); +asmregparm long sys_execve (const char __user *,const char __user *const __user *,const char __user *const __user *,struct pt_regs *); -long sys_clone (unsigned long ,unsigned long ,void __user *, +asmregparm long sys_clone (unsigned long ,unsigned long ,void __user *,void __user *,struct pt_regs *);/* kernel/ldt.c */ asmlinkage int sys_modify_ldt(int, void __user *, unsigned long);/* kernel/signal.c */ -long sys_rt_sigreturn (struct pt_regs *); -long sys_sigaltstack (const stack_t __user *,stack_t __user *, +asmregparm long sys_rt_sigreturn (struct pt_regs *); +asmregparm long sys_sigaltstack (const stack_t __user *,stack_t __user *,struct pt_regs *);
@@ -49,17 +49,17 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *); asmlinkage int sys_sigsuspend(int, int, old_sigset_t); asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,struct old_sigaction __user *); -unsigned long sys_sigreturn (struct pt_regs *); +asmregparm unsigned long sys_sigreturn (struct pt_regs *);/* kernel/vm86_32.c */ -int sys_vm86old (struct vm86_struct __user *,struct pt_regs *); -int sys_vm86 (unsigned long ,unsigned long ,struct pt_regs *); +asmregparm int sys_vm86old(struct vm86_struct __user *, struct pt_regs *); +asmregparm int sys_vm86(unsigned long, unsigned long, struct pt_regs *);#else /* CONFIG_X86_32 */ /* X86_64 only */ /* kernel/process_64.c */ -long sys_arch_prctl (int ,unsigned long ); +asmlinkage long sys_arch_prctl (int ,unsigned long );/* kernel/sys_x86_64.c */ asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long,
arch/x86/include/asm/system.h +2 -1
@@ -18,6 +18,7 @@#endif struct task_struct ;/* one of the stranger aspects of C forward declarations */ +asmregparm struct task_struct *__switch_to(struct task_struct *prev,struct task_struct *next);struct tss_struct ;
@@ -148,7 +149,7 @@ do { \#ifdef __KERNEL__ -extern void native_load_gs_index (unsigned ); +extern asmlinkage void native_load_gs_index(unsigned);/* * Load a segment. Fall back on loading the zero
arch/x86/kernel/apic/apic.c +3 -3
@@ -841,7 +841,7 @@ static void local_apic_timer_interrupt(void)* [ if a single-CPU system runs an SMP kernel then we call the local * interrupt as well. Thus we cannot inline the local irq ... ] */ -void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) +asmregparm void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -1785,7 +1785,7 @@ int __init APIC_init_uniprocessor(void)/* * This interrupt should _never_ happen with our APIC/SMP architecture */ -void smp_spurious_interrupt (struct pt_regs *regs) +asmregparm void smp_spurious_interrupt(struct pt_regs *regs) {u32 v;
@@ -1811,7 +1811,7 @@ void smp_spurious_interrupt(struct pt_regs *regs)/* * This interrupt should never happen with our APIC/SMP architecture */ -void smp_error_interrupt (struct pt_regs *regs) +asmregparm void smp_error_interrupt(struct pt_regs *regs) {u32 v0, v1;u32 i =0 ;
arch/x86/kernel/head32.c +1 -1
@@ -29,7 +29,7 @@ static void __init i386_default_early_setup(void)reserve_ebda_region (); } -void __init i386_start_kernel (void ) +asmlinkage void __init i386_start_kernel(void) {memblock_init ();
arch/x86/kernel/head64.c +1 -1
@@ -53,7 +53,7 @@ static void __init copy_bootdata(char *real_mode_data) } } -void __init x86_64_start_kernel (char * real_mode_data) +asmlinkage void __init x86_64_start_kernel(char * real_mode_data) {int i;
arch/x86/kernel/ioport.c +1 -1
@@ -93,7 +93,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)* on system-call entry - see also fork() and the signal handling * code. */ -long sys_iopl (unsigned int level,struct pt_regs *regs) +asmregparm long sys_iopl (unsigned int level,struct pt_regs *regs) {unsigned int old = (regs->flags >>12 ) &3 ;struct thread_struct *t = ¤t->thread;
arch/x86/kernel/irq.c +2 -2
@@ -172,7 +172,7 @@ u64 arch_irq_stat(void)* SMP cross-CPU interrupts have their own specific * handlers). */ -unsigned int __irq_entry do_IRQ(struct pt_regs *regs) +asmregparm unsigned int __irq_entry do_IRQ(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
@@ -202,7 +202,7 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)/* * Handler for X86_PLATFORM_IPI_VECTOR. */ -void smp_x86_platform_ipi (struct pt_regs *regs) +asmregparm void smp_x86_platform_ipi(struct pt_regs *regs) {struct pt_regs *old_regs =set_irq_regs (regs);
arch/x86/kernel/irq_work.c +1 -1
@@ -9,7 +9,7 @@#include <linux/hardirq.h> #include <asm/apic.h> -void smp_irq_work_interrupt (struct pt_regs *regs) +asmregparm void smp_irq_work_interrupt(struct pt_regs *regs) {irq_enter ();ack_APIC_irq ();
arch/x86/kernel/kprobes.c +1 -1
@@ -696,7 +696,7 @@ asm(/* * Called from kretprobe_trampoline */ -static __used __kprobes void *trampoline_handler (struct pt_regs *regs) +asmregparm __used __kprobes void *trampoline_handler(struct pt_regs *regs) {struct kretprobe_instance *ri =NULL ;struct hlist_head *head, empty_rp;
arch/x86/kernel/process.c +5 -5
@@ -232,7 +232,7 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,propagate_user_return_notify (prev_p, next_p); } -int sys_fork (struct pt_regs *regs) +asmregparm int sys_fork(struct pt_regs *regs) {return do_fork (SIGCHLD , regs->sp, regs,0 ,NULL ,NULL ); }
@@ -247,13 +247,13 @@ int sys_fork(struct pt_regs *regs)* do not have enough call-clobbered registers to hold all * the information you need. */ -int sys_vfork (struct pt_regs *regs) +asmregparm int sys_vfork(struct pt_regs *regs) {return do_fork (CLONE_VFORK |CLONE_VM |SIGCHLD , regs->sp, regs,0 ,NULL ,NULL ); } -long +asmregparm long sys_clone (unsigned long clone_flags,unsigned long newsp,void __user *parent_tid,void __user *child_tid,struct pt_regs *regs) {
@@ -267,7 +267,7 @@ sys_clone(unsigned long clone_flags, unsigned long newsp,* function to call, and %di containing * the "args". */ -extern void kernel_thread_helper (void ); +asmregparm extern void kernel_thread_helper(void);/* * Create a kernel thread
@@ -303,7 +303,7 @@ EXPORT_SYMBOL(kernel_thread);/* * sys_execve() executes a new program. */ -long sys_execve (const char __user *name, +asmregparm long sys_execve (const char __user *name,const char __user *const __user *argv,const char __user *const __user *envp,struct pt_regs *regs) {
arch/x86/kernel/process_32.c +1 -1
@@ -287,7 +287,7 @@ EXPORT_SYMBOL_GPL(start_thread);* the task-switch, and shows up in ret_from_fork in entry.S, * for example. */ -__notrace_funcgraph struct task_struct * +asmregparm __notrace_funcgraph struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p) { struct thread_struct *prev = &prev_p->thread,
arch/x86/kernel/process_64.c +1 -1
@@ -370,7 +370,7 @@ void start_thread_ia32(struct pt_regs *regs, u32 new_ip, u32 new_sp)* Kprobes not supported here. Set the probe on schedule instead. * Function graph tracer not supported too. */ -__notrace_funcgraph struct task_struct * +asmregparm __notrace_funcgraph struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p) {struct thread_struct *prev = &prev_p->thread;
arch/x86/kernel/signal.c +4 -4
@@ -545,7 +545,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, }#endif /* CONFIG_X86_32 */ -long +asmregparm long sys_sigaltstack (const stack_t __user *uss,stack_t __user *uoss,struct pt_regs *regs) {
@@ -556,7 +556,7 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,* Do a signal return; undo the signal stack. */ #ifdef CONFIG_X86_32 -unsigned long sys_sigreturn (struct pt_regs *regs) +asmregparm unsigned long sys_sigreturn (struct pt_regs *regs) {struct sigframe __user *frame;unsigned long ax;
@@ -588,7 +588,7 @@ badframe: }#endif /* CONFIG_X86_32 */ -long sys_rt_sigreturn (struct pt_regs *regs) +asmregparm long sys_rt_sigreturn (struct pt_regs *regs) {struct rt_sigframe __user *frame;unsigned long ax;
@@ -831,7 +831,7 @@ static void do_signal(struct pt_regs *regs)* notification of userspace execution resumption * - triggered by the TIF_WORK_MASK flags */ -void +asmregparm voiddo_notify_resume (struct pt_regs *regs,void *unused,__u32 thread_info_flags) {#ifdef CONFIG_X86_MCE
arch/x86/kernel/smp.c +3 -3
@@ -196,7 +196,7 @@ static void native_stop_other_cpus(int wait)/* * Reschedule call back. */ -void smp_reschedule_interrupt (struct pt_regs *regs) +asmregparm void smp_reschedule_interrupt(struct pt_regs *regs) {ack_APIC_irq ();inc_irq_stat (irq_resched_count);
@@ -206,7 +206,7 @@ void smp_reschedule_interrupt(struct pt_regs *regs)*/ } -void smp_call_function_interrupt (struct pt_regs *regs) +asmregparm void smp_call_function_interrupt(struct pt_regs *regs) {ack_APIC_irq ();irq_enter ();
@@ -215,7 +215,7 @@ void smp_call_function_interrupt(struct pt_regs *regs)irq_exit (); } -void smp_call_function_single_interrupt (struct pt_regs *regs) +asmregparm void smp_call_function_single_interrupt(struct pt_regs *regs) {ack_APIC_irq ();irq_enter ();
arch/x86/kernel/syscall_64.c +1 -1
@@ -19,7 +19,7 @@ typedef void (*sys_call_ptr_t)(void);extern void sys_ni_syscall (void ); -const sys_call_ptr_t sys_call_table[__NR_syscall_max+1 ] = { +asmlinkage const sys_call_ptr_t sys_call_table[__NR_syscall_max+1] = {/* *Smells like a like a compiler bug -- it doesn't work *when the & below is removed.
arch/x86/kernel/vm86_32.c +2 -1
@@ -198,7 +198,7 @@ out:static int do_vm86_irq_handling (int subfunction,int irqnumber);static void do_sys_vm86 (struct kernel_vm86_struct *info,struct task_struct *tsk); -int sys_vm86old (struct vm86_struct __user *v86,struct pt_regs *regs) +asmregparm int sys_vm86old(struct vm86_struct __user *v86, struct pt_regs *regs) {struct kernel_vm86_struct info;/* declare this _on top_, * this avoids wasting of stack space.
@@ -227,6 +227,7 @@ out: } +asmregparm int sys_vm86(unsigned long cmd, unsigned long arg, struct pt_regs *regs) {struct kernel_vm86_struct info;/* declare this _on top_,
arch/x86/mm/tlb.c +1 -4
@@ -124,10 +124,7 @@ EXPORT_SYMBOL_GPL(leave_mm);* entry calls in with the first parameter in %eax. Maybe define * intrlinkage? */ -#ifdef CONFIG_X86_64 -asmlinkage -#endif -void smp_invalidate_interrupt (struct pt_regs *regs) +asmregparm void smp_invalidate_interrupt(struct pt_regs *regs) {unsigned int cpu;unsigned int sender;
Signature · 1 line
1.7.4.4
Quoted 7 lines · Andi Kleen
From: Andi Kleen <[email protected]>
For a followon patchkit of mine I need to mark all functions that can be called from assembler. But on 32bit kernels some assembler functions are called with register arguments and others with stack arguments. asmlinkage forces stack arguments.
Quoted 8 lines
This patch readds the recently removed asmregparm to be able to mark assembler functions called with register arguments on 32bit.
Unlike the old code it's x86 only now to prevent it from leaking.
Signed-off-by Andi Kleen <[email protected]>
That's a totally useless changelog (you are deliberately hiding information again) so the series is obviously not acceptable. Please fix and resend.
Thanks,
Ingo
Quoted 3 lines
That's a totally useless changelog (you are deliberately hiding information again) so the series is obviously not acceptable. Please fix and resend.
I reread it and it seems complete to me. Please be more specific.
If you refer to the followon patchkit - it's not ready for posting yet. However I believe these changes are reasonable cleanups that are useful on their own. That's why I posted them now.
-Andi
Quoted 8 lines · Andi Kleen
Quoted 3 lines
That's a totally useless changelog (you are deliberately hiding information again) so the series is obviously not acceptable. Please fix and resend.
I reread it and it seems complete to me. Please be more specific.
If you refer to the followon patchkit - it's not ready for posting yet. [...]
You contradict yourself here - why do you claim that it's "complete" while you readily admit in the *next* sentence that the "followon patchkit" (with no specifics provided whatsoever) is "not ready for posting yet"?
You are not a newbie anymore, you know what the rules are for *everyone*: if it's not ready for posting yet then don't send a half-done series for inclusion, wasting everyone's time.
Quoted 2 lines
[...] However I believe these changes are reasonable cleanups that are useful on their own. That's why I posted them now.
Uhm, that's trivially untrue crazy talk and you should know it: the patches add code and typing complexity for no good stated reason whatsoever.
If we want the maintenance overhead of that then you better come up with your deliberately kept secret "project" and we'll be able to weigh whether the benefits overweigh the maintenance costs ...
In any case, i'd like to warn you that you are very close to me starting to ignore your mails summarily due to absymal low quality:
in the past few months 70-80% of the cases your first patch submissions were trivially flawed, and in many cases you should have been well aware of the fact that they were trivially flawed. And that's not from a newbie but from a long-time kernel contributor!
Thanks,
Ingo
Hi Andi,
Quoted 9 lines · Andi Kleen
Quoted 3 lines
That's a totally useless changelog (you are deliberately hiding information again) so the series is obviously not acceptable. Please fix and resend.
I reread it and it seems complete to me. Please be more specific.
If you refer to the followon patchkit - it's not ready for posting yet. However I believe these changes are reasonable cleanups that are useful on their own. That's why I posted them now.
So from my point of view, none of the changelogs explain why the changes needed. Now, I'm not an expert on the x86 code so maybe I'm missing something obvious but to me the only rationale seems to be that you need it some unspecified follow-up patchkit. HTH.
Pekka
Quoted 9 lines · Pekka Enberg
Hi Andi,
Quoted 6 lines · Andi Kleen
Quoted 3 lines
That's a totally useless changelog (you are deliberately hiding information again) so the series is obviously not acceptable. Please fix and resend.
I reread it and it seems complete to me. Please be more specific.
Quoted 8 lines
Quoted 3 lines
If you refer to the followon patchkit - it's not ready for posting yet. However I believe these changes are reasonable cleanups that are useful on their own. That's why I posted them now.
So from my point of view, none of the changelogs explain why the changes needed. Now, I'm not an expert on the x86 code so maybe I'm missing something obvious but to me the only rationale seems to be that you need it some unspecified follow-up patchkit. HTH.
Ok but the changelog is explaining the patch as far as I can tell. Its just that there is not enough of a justification for inclusion without the follow on patches and clarity on the ultimate purpose of the whole endeavor. In general some more specificity and less emotions may be helpful.
Quoted 4 lines
So from my point of view, none of the changelogs explain why the changes needed. Now, I'm not an expert on the x86 code so maybe I'm that you need it some unspecified follow-up patchkit. HTH.
Proper asmlinkages are imho a cleanliness feature that stands on its own. They have been used in the past for all kinds of things, but unfortunately have bitrotted recently on x86.
If nothing else they are useful documentation. For example if you do grep for *.[ch] only and you hit an asmlinkage it's a good hint to look into the .S too. In general you need to be much more careful about any changes to those, because assembler is more fragile.
I have been encouraged by other people to post those early, so I did. and at least in my traditional Linux development world view posting patches early is the right thing to do.
-Andi