All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: EACCES errors using preload libs
Date: Fri, 30 Sep 2016 11:50:36 -0600	[thread overview]
Message-ID: <20160930175036.GA1867@obsidianresearch.com> (raw)
In-Reply-To: <09db01d21b42$17aad9b0$47008d10$@opengridcomputing.com>

On Fri, Sep 30, 2016 at 12:43:02PM -0500, Steve Wise wrote:

> The single case I see failing so far is trying to preload my library with
> netserver.  If I run netserver with '-D -f' which avoids fork() calls, it
> works fine.  If I omit the -f, then the forked process gets an EACCES error
> trying to do ibv_query_device().  Thoughts?

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?

Unfortunately it was designed by Linus and Andy to work this way, so
we cannot weaken the check.

I don't know how your preload library works, but after fork basically
everything related to verbs is garbage - so it should be safe to
close/reopen then uverbs fd which will avoid the problem. It is only
because the FD was passed across a credential change that you got
EACCESS.

The way forward to restore the lost functionality is to rework the
entire uAPI to use ioctl, which is what Matan/Sean/etc have been
doing. But that work seems to be going very slowly, I hoped we'd have
something by now.

Jason
--
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

  reply	other threads:[~2016-09-30 17:50 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 [this message]
     [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

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=20160930175036.GA1867@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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.