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: <20171113094953.GB22645@kroah.com>
Date:   Mon, 13 Nov 2017 10:49:53 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Martijn Coenen <maco@...roid.com>
Cc:     john.stultz@...aro.org, tkjos@...gle.com, arve@...roid.com,
        amit.pundir@...aro.org, devel@...verdev.osuosl.org,
        maco@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ANDROID: binder: show high watermark of alloc->pages.

On Mon, Nov 13, 2017 at 10:06:56AM +0100, Martijn Coenen wrote:
> Show the high watermark of the index into the alloc->pages
> array, to facilitate sizing the buffer on a per-process
> basis.
> 
> Signed-off-by: Martijn Coenen <maco@...roid.com>
> ---
>  drivers/android/binder_alloc.c | 4 ++++
>  drivers/android/binder_alloc.h | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
> index 6f6f745605af..0dba2308125c 100644
> --- a/drivers/android/binder_alloc.c
> +++ b/drivers/android/binder_alloc.c
> @@ -281,6 +281,9 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
>  			goto err_vm_insert_page_failed;
>  		}
>  
> +		if (index + 1 > alloc->pages_high)
> +			alloc->pages_high = index + 1;
> +
>  		trace_binder_alloc_page_end(alloc, index);
>  		/* vm_insert_page does not seem to increment the refcount */
>  	}
> @@ -853,6 +856,7 @@ void binder_alloc_print_pages(struct seq_file *m,
>  	}
>  	mutex_unlock(&alloc->mutex);
>  	seq_printf(m, "  pages: %d:%d:%d\n", active, lru, free);
> +	seq_printf(m, "  pages high watermark: %zu\n", alloc->pages_high);

Who can use this?  A userspace tool?  Or something else?

This is ok for 4.15-rc1, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ