[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201008155426.GE5177@ziepe.ca>
Date: Thu, 8 Oct 2020 12:54:26 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Jan Engelhardt <jengelh@...i.de>
Cc: Nathan Chancellor <natechancellor@...il.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Greg KH <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-rdma@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: remaining flexible-array conversions
On Thu, Oct 08, 2020 at 05:24:03PM +0200, Jan Engelhardt wrote:
> In the case of the RDMA headers, even if we assume best conditions --
> a block of malloc(sizeof(struct ib_uverbs_create_cq_resp) +
> sizeof(u64)*N) and not some struct -- it smells a lot like undefined
> behavior, because ib_uverbs_create_cq_resp::driver_data accesses data
> as u64
driver_data[] is never accessed, it is only used as a pointer. Aliasing
should be OK because all accesses to those bytes consistently use u32.
Fixing the compiler warning requires significant edits of kernel and
user code, not entirely sure it is worthwhile.
If someone wants to do it let me know and I'll give some guidance.
Jason
Powered by blists - more mailing lists