lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH] RDMA/siw: Fix compiler warnings on 32-bit due to u64/pointer abuse
On Mon, Aug 19, 2019 at 01:36:11PM +0000, Bernard Metzler wrote:
> >If the value is really a kernel pointer, then it ought to be printed
> >with %p. We have been getting demanding on this point lately in RDMA
> >to enforce the ability to keep kernel pointers secret.
> >
> >> - wqe->sqe.sge[0].laddr = (u64)&wqe->sqe.sge[1];
> >> + wqe->sqe.sge[0].laddr = (uintptr_t)&wqe->sqe.sge[1];
> >
> >[..]
> >
> >> rv = siw_rx_kva(srx,
> >> - (void *)(sge->laddr + frx->sge_off),
> >> + (void *)(uintptr_t)(sge->laddr + frx->sge_off),
> >> sge_bytes);
> >
> >Bernard, this is nonsense, what is going on here with sge->laddr that
> >it can't be a void *?
> >
> siw_sge is defined in siw-abi.h. We make the address u64 to keep the ABI
> arch independent.

Eh? How does the siw-abi.h store a kernel pointer? Sounds like kernel
and user types are being mixed.

Jason

\
 
 \ /
  Last update: 2019-08-19 15:53    [W:0.109 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site