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: EACCES errors using preload libs
Date: Fri, 30 Sep 2016 12:43:02 -0500	[thread overview]
Message-ID: <09db01d21b42$17aad9b0$47008d10$@opengridcomputing.com> (raw)

Hey Jason,  I'm looking into a problem that appears to have been introduced
by:

commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
Author: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date:   Sun Apr 10 19:13:13 2016 -0600

    IB/security: Restrict use of the write() interface

I'm using a preload library (similar to rsockets) that enables a user-mode
UDP stack over chelsio hardware.  The preload lib uses user rdma verbs
calls.  In some cases, verbs calls are getting EACCES.  Can you explain what
"suspicious" write API calls this is disallowing:

static inline bool ib_safe_file_access(struct file *filp)
{
        return filp->f_cred == current_cred() && segment_eq(get_fs(),
USER_DS);
}

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?

Thanks,

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

             reply	other threads:[~2016-09-30 17:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 17:43 Steve Wise [this message]
2016-09-30 17:50 ` EACCES errors using preload libs 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

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='09db01d21b42$17aad9b0$47008d10$@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.