From: Vinit Agnihotri <vinita@ryussi.com>
To: linux-rdma@vger.kernel.org
Subject: Unable to register memory, ibv_reg_mr returning EACCESS
Date: Fri, 8 Nov 2019 11:02:39 +0530 [thread overview]
Message-ID: <06a5eab8-6341-850a-46cd-8dfedfb63da9@ryussi.com> (raw)
Hi,
we have a userspace server which would allow user to access files using
his/her own credentials via UID mapping.
while we are running server as root user, but to in order to honor posix
mappings, we use setfsgid()/setfssid() before
accessing any file and restore them back to user access. However when we
try to ibv_reg_mr() EACCESS is returned.
We are ensuring to be root before we call to ibv_reg_mr(), yet it keeps
failing.
While going through libibverbs sources we realize EACCESS might be
returned by this call:
if (write(pd->context->cmd_fd, cmd, cmd_size) != cmd_size)
return errno;
As we are ensuring that setfsgid()/setfssid() are set to root before we
call to ibv_reg_mr(), why EACCESS is still returned?
Since these calls are thread specific only why it should affect entire
process?
Can anyone provide any insight into this behavior?
Thanks & Regards,
Vinit.
reply other threads:[~2019-11-08 5:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=06a5eab8-6341-850a-46cd-8dfedfb63da9@ryussi.com \
--to=vinita@ryussi.com \
--cc=linux-rdma@vger.kernel.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.