Re: [PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-28 Thread Fields Bruce James
On Fri, Oct 28, 2016 at 09:20:08AM -0400, Fields Bruce James wrote: > On Tue, Oct 25, 2016 at 09:47:16PM +, Trond Myklebust wrote: > > > > > On Oct 25, 2016, at 15:59, Fields Bruce James > > > wrote: > > > > > > On Tue, Oct 25, 2016 at 07:34:43PM +, Trond Myklebust wrote: > > >> NACK…

Re: [PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-28 Thread Fields Bruce James
On Tue, Oct 25, 2016 at 09:47:16PM +, Trond Myklebust wrote: > > > On Oct 25, 2016, at 15:59, Fields Bruce James wrote: > > > > On Tue, Oct 25, 2016 at 07:34:43PM +, Trond Myklebust wrote: > >> NACK… I agree that there may already be borkage in RPCSEC_GSS-land, but > >> that’s not a re

Re: [PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-25 Thread Trond Myklebust
> On Oct 25, 2016, at 15:59, Fields Bruce James wrote: > > On Tue, Oct 25, 2016 at 07:34:43PM +, Trond Myklebust wrote: >> >>> On Oct 25, 2016, at 14:45, J. Bruce Fields wrote: >>> >>> From: "J. Bruce Fields" >>> >>> As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in line

Re: [PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-25 Thread Fields Bruce James
On Tue, Oct 25, 2016 at 07:34:43PM +, Trond Myklebust wrote: > > > On Oct 25, 2016, at 14:45, J. Bruce Fields wrote: > > > > From: "J. Bruce Fields" > > > > As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear > > mapping", sg_set_buf hits a BUG when make_checksum_v2->x

Re: [PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-25 Thread Trond Myklebust
> On Oct 25, 2016, at 14:45, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear > mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf, > among other callers, passes it memory on the stack. > > We o

[PATCH] sunrpc: don't pass on-stack memory to sg_set_buf

2016-10-25 Thread J. Bruce Fields
From: "J. Bruce Fields" As of ac4e97abce9b "scatterlist: sg_set_buf() argument must be in linear mapping", sg_set_buf hits a BUG when make_checksum_v2->xdr_process_buf, among other callers, passes it memory on the stack. We only need a scatterlist to pass this to the crypto code, and it seems li