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: <20230501043122.GC19673@lst.de>
Date:   Mon, 1 May 2023 06:31:22 +0200
From:   Christoph Hellwig <hch@....de>
To:     Breno Leitao <leitao@...ian.org>
Cc:     io-uring@...r.kernel.org, linux-nvme@...ts.infradead.org,
        asml.silence@...il.com, axboe@...nel.dk, ming.lei@...hat.com,
        leit@...com, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org, sagi@...mberg.me, joshi.k@...sung.com,
        hch@....de, kbusch@...nel.org
Subject: Re: [PATCH v3 4/4] block: ublk_drv: Add a helper instead of casting

On Sun, Apr 30, 2023 at 07:35:32AM -0700, Breno Leitao wrote:
> ublk driver is using casts to get private data from uring cmd struct.
> Let's use a proper helper, as an interface that requires casts in all
> callers is one asking for bugs.
> 
> Suggested-by: Christoph Hellwig <hch@....de>

No, I've not suggested this.

> +static inline struct ublksrv_ctrl_cmd *ublk_uring_ctrl_cmd(
> +		struct io_uring_cmd *cmd)
> +{
> +	return (struct ublksrv_ctrl_cmd *)cmd->sqe->cmd;
> +}

I've two times explained we need a core io_uring helper to remove this
casting in the drivers, and I've explained how to do that and provided
the actual code for it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ