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:   Mon, 28 Sep 2020 07:17:48 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Prasad Sodagudi <psodagud@...eaurora.org>
Cc:     rostedt@...dmis.org, mingo@...hat.com, keescook@...omium.org,
        saiprakash.ranjan@...eaurora.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, anton@...msg.org, arnd@...db.de,
        catalin.marinas@....com, ccross@...roid.com, jbaron@...mai.com,
        jim.cromie@...il.com, joe@...ches.com, joel@...lfernandes.org
Subject: Re: [PATCH] tracing: Add register read and write tracing support

On Sun, Sep 27, 2020 at 05:34:50PM -0700, Prasad Sodagudi wrote:
> Add register read/write operations tracing support.
> ftrace events helps trace register read and write
> location details of memory mapped IO registers. Also
> add _no_log variants the writel_relaxed/readl_relaed
> APIs to avoid excessive logging for certain register
> operations.
> 
> Signed-off-by: Prasad Sodagudi <psodagud@...eaurora.org>
> ---
>  arch/arm64/include/asm/io.h    | 117 ++++++++++++++++++++++++++++++++++++++---
>  include/linux/iorw.h           |  20 +++++++
>  include/trace/events/rwio.h    |  51 ++++++++++++++++++
>  kernel/trace/Kconfig           |  11 ++++
>  kernel/trace/Makefile          |   1 +
>  kernel/trace/trace_readwrite.c |  30 +++++++++++
>  6 files changed, 222 insertions(+), 8 deletions(-)
>  create mode 100644 include/linux/iorw.h
>  create mode 100644 include/trace/events/rwio.h
>  create mode 100644 kernel/trace/trace_readwrite.c
> 
> diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h
> index ff50dd7..db5acff 100644
> --- a/arch/arm64/include/asm/io.h
> +++ b/arch/arm64/include/asm/io.h
> @@ -9,6 +9,7 @@
>  #define __ASM_IO_H
>  
>  #include <linux/types.h>
> +#include <linux/iorw.h>
>  #include <linux/pgtable.h>
>  
>  #include <asm/byteorder.h>
> @@ -24,24 +25,28 @@
>  #define __raw_writeb __raw_writeb
>  static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
>  {
> +	log_write_io(addr);
>  	asm volatile("strb %w0, [%1]" : : "rZ" (val), "r" (addr));

You are just logging the address, what about the data written or read?
Why throw away half of the information here?

Oh, and sending patches that break the build is generally not a good
thing to do :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ