DPDK usage discussions
 help / color / mirror / Atom feed
From: Boris Ouretskey <borisusun@gmail.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: users@dpdk.org
Subject: Re: Issue setting up the DPDK development with non-privileged user
Date: Thu, 1 Sep 2022 15:52:23 +0300	[thread overview]
Message-ID: <CAG4AAQ0DPGfOWO16oH1gaL2oXYFRdo5-SjZbMAJh-1PSK6B=ew@mail.gmail.com> (raw)
In-Reply-To: <20220831190158.44dd76de@sovereign>

[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]

>
> Dmitry,
> Thanks a lot for the reply.
> 1. The things look better now, but now we still have some capabilities
> left out in order for the program to run. I am myself not a kernel
> programmer and asked on stackoverflow
> <https://stackoverflow.com/questions/73556145/understand-which-capability-exacty-lacks-to-complete-the-operation-in-linux>
> the question on how can we deduce the exact capability that failed the
> check in kernel. Otherwise the process of finding the exact set can be very
> irritating. May be someone here will have the idea better than guessing for
> user space developers.



>
> -----
> [user1@dredd examples]$ sudo setcap
> cap_ipc_lock,cap_sys_admin,cap_dac_override+ep ./dpdk-helloworld
> [sudo] password for user1:
> [user1@dredd examples]$ ./dpdk-helloworld
> EAL: Detected CPU lcores: 4
> EAL: Detected NUMA nodes: 1
> EAL: Detected static linkage of DPDK
> EAL: Multi-process socket /run/user/1000/dpdk/rte/mp_socket
> EAL: Selected IOVA mode 'PA'
> EAL: VFIO support initialized
> EAL: Cannot open /dev/vfio/noiommu-0: Operation not permitted
> EAL: Failed to open VFIO group 0
> EAL: Requested device 0000:00:08.0 cannot be used
> EAL: Cannot open /dev/vfio/noiommu-1: Operation not permitted
> EAL: Failed to open VFIO group 1
> EAL: Requested device 0000:00:09.0 cannot be used
> TELEMETRY: No legacy callbacks, legacy socket not created
> hello from core 1
> hello from core 2
> hello from core 3
> hello from core 0
>
> 2. Thanks a lot for pointing out how it works. Regarding your second note,
> In my understanding, knowing physical addresses does not help any user
> process lacking the corresponding privileges. Because mapping and read
> permission are enforced by kernel & hardware, even knowing the physical
> memory address would not help regular process reading or updating it unless
> the physical page  was mapped by the kernel into process virtual space with
> proper permission.
>
> In addition it turns out that if one would like to debug DPDK or any other
> executable using a special capabilities set, this set must be duplicated in
> gdb (at least that's how it worked for me), otherwise it spawns debugee
> with reduced capabilities set ( I guess by means of bound set). If someone
> using VSCODE remote connection debug than also
>



>
> Thanks again for the help
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2867 bytes --]

  reply	other threads:[~2022-09-01 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 14:10 Boris Ouretskey
2022-08-31 16:01 ` Dmitry Kozlyuk
2022-09-01 12:52   ` Boris Ouretskey [this message]
2022-09-01 14:42     ` Dmitry Kozlyuk
2022-09-01 19:26       ` Dmitry Kozlyuk
2022-09-02 14:31         ` Dmitry Kozlyuk
2022-09-03 18:18           ` Boris Ouretskey

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='CAG4AAQ0DPGfOWO16oH1gaL2oXYFRdo5-SjZbMAJh-1PSK6B=ew@mail.gmail.com' \
    --to=borisusun@gmail.com \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=users@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).