Re: [PATCH blktests] nvme/046: add test for unprivileged passthrough

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 10, 2023 at 02:01:14AM +0000, Shinichiro Kawasaki wrote:
On Feb 09, 2023 / 15:15, Kanchan Joshi wrote:
Ths creates a non-root user "blktest46", alters permissions for
char-device node (/dev/ngX) and runs few passthrough commands.
At the end of the test, user is deleted and permissions are reverted.

Signed-off-by: Kanchan Joshi <joshi.k@xxxxxxxxxxx>

Thanks for the patch. I guess this test case exercises nvme_cmd_allowed() in
drivers/nvme/host/ioctl.c.

Yes. Thanks for review.
The test contents look valid and good.

This test case adds and deletes a user. For every test case run, it creates and
removes the user home directory and touches /etc files. It does not sound right
for me. It changes system set up, and sudden test case stop will leave the user.

I suggest to ask blktests users to prepare the normal user and specify it to a
config file variable (it can be named NORMAL_USER or something). I also suggest
to add two new helper functions: _require_user() will check that the specified
user is valid, and _run_user() will wrap the "su $NORMAL_USER -c" command line.

I was trying to make this automatic for blktests users.
Script attempts cleanup always (regardless of test-failure).
But yes, if any command gets stuck, cleanup won't happen.
So what you mentioned - sounds fine to me.

If you don't mind, I can create another patch for further discussion based on
the suggestion above, and modify your patch to use the new helper functions.
Sure. Please remove "_have_fio" line also in v2.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux