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: <4085c078-20a5-4ba0-9017-85051c91bf3b@kernel.org>
Date: Wed, 1 Oct 2025 15:25:22 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Johannes Thumshirn <johannes.thumshirn@....com>,
 Jens Axboe <axboe@...nel.dk>
Cc: Steven Rostedt <rostedt@...dmis.org>,
 Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-btrace@...r.kernel.org,
 John Garry <john.g.garry@...cle.com>, Hannes Reinecke <hare@...e.de>,
 Christoph Hellwig <hch@....de>, Naohiro Aota <naohiro.aota@....com>,
 Shinichiro Kawasaki <shinichiro.kawasaki@....com>,
 Chaitanya Kulkarni <chaitanyak@...dia.com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2 06/15] blktrace: split do_blk_trace_setup into two
 functions

On 9/26/25 00:02, Johannes Thumshirn wrote:
> Split do_blk_trace_setup into two functions, this is done to prepare for
> an incoming new BLKTRACESETUP2 ioctl(2) which can receive extended
> parameters form user-space.

s/form/from

> 
> Also move the size verification logic to the callers.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....com>


> @@ -593,17 +581,39 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
>  	debugfs_create_file("dropped", 0444, dir, bt, &blk_dropped_fops);
>  	debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);
>  
> -	bt->rchan = relay_open("trace", dir, buts->buf_size,
> -				buts->buf_nr, &blk_relay_callbacks, bt);
> +	bt->rchan = relay_open("trace", dir, buf_size, buf_nr,
> +			       &blk_relay_callbacks, bt);
>  	if (!bt->rchan)
>  		goto err;
>  
> +	blk_trace_setup_lba(bt, bdev);
> +
> +	return bt;
> +
> +err:
> +	if (ret)
> +		blk_trace_free(q, bt);

I do not think that the "if (ret)" is needed here.

> +
> +	return ERR_PTR(ret);
> +}

With that fixed,

Reviewed-by: Damien Le Moal <dlemoal@...nel.org>

-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ