All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Jason Gunthorpe'
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: EACCES errors using preload libs
Date: Fri, 30 Sep 2016 13:27:36 -0500	[thread overview]
Message-ID: <09ef01d21b48$51bb9990$f532ccb0$@opengridcomputing.com> (raw)
In-Reply-To: <20160930181705.GB1867-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

> On Fri, Sep 30, 2016 at 01:13:02PM -0500, Steve Wise wrote:
> > > Hum, so I expect the patch to break things. Specifically if you change
> > > the process credentials after opening verbs. However just forking()
> > > shouldn't cause a problem. Can you confirm there is nothing that
> > > changes uid,gid, etc during the fork?
> >
> > I'll debug this further, but this is running as root, so that sort of
stuff
> > shouldn't be changing.
> 
> Based on some emails I've got I think there is a 'thing' with
> credentials in Linux where something copies the creds struct but
> (perhaps?) does not change it.
> 
> Linus designed the test to be a pointer compare, so if anything does a
> copy-but-no-modify then it will break the test unnecessarily. If I
> understand everything properly :|
> 
> If you can add any more information I'm sure people will appreciate
> it.
> 
> > Fork() is actually not supported by this preload library, but we were
> > getting by, I guess, with netserver because it fork()s before it
allocates
> > the UDP socket that then gets accelerated by the preload lib.  However,
I'm
> > thinking that librdacm is getting invoked and is opening contexts to all
the
> > verbs devices before the fork() and thus after it, this new "safe" check
it
> > biting me.
> 
> Hmm, sounds plausible. Same deal with rdmacm, it has to close/open the
> verbs device. Defering doing anything until first needed would also be
> a reasonable strategy.

I think it does.  But perhaps my offload lib is actually the culprit.  It
goes and walks all the interfaces and builds a database of available devices
that can support this user mode UDP stack.  

I'll post more as I identify the root cause.

Steve.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2016-09-30 18:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 17:43 EACCES errors using preload libs Steve Wise
2016-09-30 17:50 ` Jason Gunthorpe
     [not found]   ` <20160930175036.GA1867-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 18:13     ` Steve Wise
2016-09-30 18:17       ` Jason Gunthorpe
     [not found]         ` <20160930181705.GB1867-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 18:27           ` Steve Wise [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='09ef01d21b48$51bb9990$f532ccb0$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.