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: <507D4B2A.6080107@hitachi.com>
Date:	Tue, 16 Oct 2012 20:55:22 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Hyeoncheol Lee <hyc.lee@...il.com>
Cc:	acme@...stprotocols.net, LKML <linux-kernel@...r.kernel.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	"yrl.pp-manager.tt@...achi.com" <yrl.pp-manager.tt@...achi.com>
Subject: Re: [PATCH] uprobes tracer: Add stack/memory/retval access support

(2012/10/16 18:02), Hyeoncheol Lee wrote:
> Event arguments except @SYM are supported. They are @ADDR,
> $stack, $stackN, $retval, and offs(arguments).
> 
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> Signed-off-by: Hyeoncheol Lee <hyc.lee@...il.com>
> ---

[...]
>  #define DEFINE_FETCH_stack(type)					\
>  static __kprobes void FETCH_FUNC_NAME(stack, type)(struct pt_regs *regs,\
> -					  void *offset, void *dest)	\
> +					  void *offset, void *dest,	\
> +					  bool kprobe)			\
>  {									\
> -	*(type *)dest = (type)regs_get_kernel_stack_nth(regs,		\
> +	if (kprobe)							\
> +		*(type *)dest = (type)regs_get_kernel_stack_nth(regs,	\
>  				(unsigned int)((unsigned long)offset));	\
> +	else								\
> +		*(type *)dest = (type)regs_get_user_stack_nth(regs,	\
> +				(unsigned int)((unsigned long)offset)); \
>  }


Hmm, I don't think this is a good way to do that.
If fetching user space objects is different from the kernel one,
we'd better introduce new fetch handlers for it, instead of checking
a bool flag every time, because it will be done on every events.

Thank you,


-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


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