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]
Message-Id: <20081113162739.5e871fab.akpm@linux-foundation.org>
Date:	Thu, 13 Nov 2008 16:27:39 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Masami Hiramatsu <mhiramat@...hat.com>
Cc:	ananth@...ibm.com, jkenisto@...ibm.com, davem@...emloft.net,
	rusty@...tcorp.com.au, linux-kernel@...r.kernel.org,
	systemtap@...rces.redhat.com
Subject: Re: [PATCH 4/7] kprobes: Support probing module __exit function

On Tue, 11 Nov 2008 15:56:58 -0500
Masami Hiramatsu <mhiramat@...hat.com> wrote:

> @@ -69,9 +69,6 @@ struct kprobe {
>  	/* list of kprobes for multi-handler support */
>  	struct list_head list;
> 
> -	/* Indicates that the corresponding module has been ref counted */
> -	unsigned int mod_refcounted;
> -
>  	/*count the number of times this probe was temporarily disarmed */
>  	unsigned long nmissed;
> 
> @@ -103,8 +100,19 @@ struct kprobe {
> 
>  	/* copy of the original instruction */
>  	struct arch_specific_insn ainsn;
> +
> +	/* Indicates various status flags */
> +	u32 flags;
>  };
> 
> +/* Kprobe status flags */
> +#define KPROBE_FLAG_GONE	1 /* breakpoint has already gone */
> +
> +static inline int kprobe_gone(struct kprobe *p)
> +{
> +	return p->flags & KPROBE_FLAG_GONE;
> +}

If we're not going to use atomic bitops on kprobe.flags then
modifications to that member will require that the caller hold a lock. 
The comment above that member should describe its locking protocol.  It
seems that it is kprobe_mutex, so...

--- a/include/linux/kprobes.h~kprobes-support-probing-module-__exit-function-fix
+++ a/include/linux/kprobes.h
@@ -101,7 +101,7 @@ struct kprobe {
 	/* copy of the original instruction */
 	struct arch_specific_insn ainsn;
 
-	/* Indicates various status flags */
+	/* Indicates various status flags.  Protected by kprobe_mutex. */
 	u32 flags;
 };
 
_


yes?
--
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