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: <20130116020753.GB25806@quack.suse.cz>
Date:	Wed, 16 Jan 2013 03:07:53 +0100
From:	Jan Kara <jack@...e.cz>
To:	Tejun Heo <tj@...nel.org>
Cc:	Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org,
	chavey@...gle.com, fengguang.wu@...el.com, Jan Kara <jack@...e.cz>
Subject: Re: [PATCH v2] writeback: mark sysctl vm.block_dump for removal

On Tue 15-01-13 08:28:13, Tejun Heo wrote:
> vm.block_dump is nasty in that it dumps IO traces directly to printk.
> It isn't scalable and can easily lead to looping behavior - IO
> generating kernel message which in turn genreates log IO, ad
> infinitum.
> 
> Now that proper tracepoints are in place, vm.block_dump isn't
> necessary.  Generate a warning if used so that it can be removed down
> the road.
> 
> Cc: Added contact info as suggested by Jan.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Jan Kara <jack@...e.cz>
  Thanks. The patch looks good. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
> ---
>  include/linux/writeback.h |    3 +++
>  kernel/sysctl.c           |    2 +-
>  mm/page-writeback.c       |   15 +++++++++++++++
>  patches/series            |    1 +
>  4 files changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index b82a83a..678ee6d 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -143,6 +143,9 @@ extern int dirty_ratio_handler(struct ctl_table *table, int write,
>  extern int dirty_bytes_handler(struct ctl_table *table, int write,
>  		void __user *buffer, size_t *lenp,
>  		loff_t *ppos);
> +extern int block_dump_handler(struct ctl_table *table, int write,
> +		void __user *buffer, size_t *lenp,
> +		loff_t *ppos);
>  
>  struct ctl_table;
>  int dirty_writeback_centisecs_handler(struct ctl_table *, int,
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index c88878d..9e7f7b5 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -1288,7 +1288,7 @@ static struct ctl_table vm_table[] = {
>  		.data		= &block_dump,
>  		.maxlen		= sizeof(block_dump),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= block_dump_handler,
>  		.extra1		= &zero,
>  	},
>  	{
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 6f42712..605632d 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -390,6 +390,21 @@ int dirty_bytes_handler(struct ctl_table *table, int write,
>  	return ret;
>  }
>  
> +int block_dump_handler(struct ctl_table *table, int write,
> +		       void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> +	static bool warned = false;
> +	int ret;
> +
> +	ret = proc_dointvec(table, write, buffer, lenp, ppos);
> +	if (!warned && block_dump) {
> +		pr_warning("sysctl: vm.block_dump is scheduled for removal. Use tracepoints instead.\n");
> +		pr_warning("sysctl: Please contact Jens Axboe <axboe@...nel.dk> if you require this.\n");
> +		warned = true;
> +	}
> +	return ret;
> +}
> +
>  static unsigned long wp_next_time(unsigned long cur_time)
>  {
>  	cur_time += VM_COMPLETIONS_PERIOD_LEN;
> diff --git a/patches/series b/patches/series
> index 9fb9bfe..b2582cb 100644
> --- a/patches/series
> +++ b/patches/series
> @@ -18,3 +18,4 @@ kill-pool-gcwq
>  remove-gcwq
>  rename-nr_running
>  cleanup-leftovers
> +dbg
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
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