lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Jul 2015 14:54:26 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	David Howells <dhowells@...hat.com>, linux-kernel@...r.kernel.org,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [PATCH v2 1/7] mn10300: fix build failure

On Thu, 18 Jun 2015 17:47:47 +0530 Sudip Mukherjee <sudipm.mukherjee@...il.com> wrote:

> allmodconfig build fails with the error:
> invalid use of undefined type 'struct kprobe_ctlblk'
> 
> just declared the two basic structures after checking the struct in other
> architectures.
> 
> --- a/arch/mn10300/include/asm/kprobes.h
> +++ b/arch/mn10300/include/asm/kprobes.h
> @@ -47,4 +47,16 @@ extern int kprobe_exceptions_notify(struct notifier_block *self,
>  
>  extern void arch_remove_kprobe(struct kprobe *p);
>  
> +struct prev_kprobe {
> +	struct kprobe *kp;
> +	unsigned long status;
> +};
> +
> +struct kprobe_ctlblk {
> +	unsigned int kprobe_status;
> +	struct pt_regs jprobe_saved_regs;
> +	char jprobes_stack[MAX_STACK_SIZE];
> +	struct prev_kprobe prev_kprobe;
> +};
> +
>  #endif /* _ASM_KPROBES_H */

Look:

akpm3:/usr/src/linux-4.2-rc2> grep -rl kprobe_ctlblk .
./arch/ia64/include/asm/kprobes.h
./arch/ia64/kernel/kprobes.c
./arch/tile/include/asm/kprobes.h
./arch/tile/kernel/kprobes.c
./arch/mips/include/asm/kprobes.h
./arch/mips/kernel/kprobes.c
./arch/arc/include/asm/kprobes.h
./arch/arc/kernel/kprobes.c
./arch/sparc/include/asm/kprobes.h
./arch/sparc/kernel/kprobes.c
./arch/powerpc/include/asm/kprobes.h
./arch/powerpc/kernel/kprobes.c
./arch/avr32/include/asm/kprobes.h
./arch/sh/include/asm/kprobes.h
./arch/sh/kernel/kprobes.c
./arch/arm/probes/kprobes/core.c
./arch/arm/probes/kprobes/opt-arm.c
./arch/arm/include/asm/kprobes.h
./arch/s390/include/asm/kprobes.h
./arch/s390/kernel/kprobes.c
./arch/x86/include/asm/kprobes.h
./arch/x86/kernel/kprobes/core.c
./arch/x86/kernel/kprobes/ftrace.c
./arch/x86/kernel/kprobes/common.h
./arch/x86/kernel/kprobes/opt.c
./include/linux/kprobes.h

mn10300 doesn't use kprobe_ctlblk (or prev_kprobe).  Nor does the core
kernel kprobes code.  So these are arch-specific things and shouldn't
be referenced from include/linux/kprobes.h at all.  I think - I didn't
look super-closely at it.

So an appropriate fix for this would be to move the references to
prev_kprobe/kprobe_ctlblk out of include/linux/kprobes.h and into
asm/kprobes.h.  Presumably via include/asm-generic/kprobes.h in some
fashion.

Have you tested this patch on mn10300?  Does kprobes actually work on
mn10300?  Perhaps not, and the solution here is to disable kprobes on
that arch until someone fixes it all up.


Please resend any mn10300 fixes which you still have pending.  Please
be a bit more sparing in the cc's when doing so ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ