Re: [agl-dev-community] [HELP] Port Qt Desktop Widget to run on AGL

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

 



On Tue, 17 Dec 2019 04:08:56 -0800
"Guowei Lv" <guowei@xxxxxxxxxx> wrote:

> Hi José,
> 
> Thanks for the quick reply.
> 
> What we are building is a Qt application that can visualize disk
> fragmentation data.
> 
> We are collecting the fragmentation data by calling `filefrag` on
> files from some partition, and the outputs will be directed into a
> log file. The Qt app simply reads that file and parse it.
> 
> Here is how I do it in qemu:
> 
> 1. Login as root
> 2. Run a python script to run `filefrag` on files and creates a log
> file somewhere. (also not sure where should I put this file?) 3. The
> Qt app will try to open the log file and read it.

Run as root requires to tweak current AGL. So it is up to you.

> Instead of preparing the log file and read it from Qt app, I also
> tried to run the `filefrag` command inside the Qt app with QProcess,
> but it has a similar SMACK error.
> 
> Dec 16 13:26:57 qemux86-64 audit[654]: AVC lsm=SMACK
> fn=smack_file_ioctl action=denied subject="User::App::taskmanager"
> object="_" requested=w pid=654 comm="filefrag.e2fspr"
> path="/bin/mkdir.coreutils>

In that case, I can see on a target:

ioctl(3, FS_IOC_FIEMAP, {fm_start=0, fm_length=18446744073709551615,
fm_flags=0, fm_extent_count=292}) = -1 EACCES (Permission denied)
ioctl(3, FIBMAP, 0xfffffffa4f50)        = -1 EPERM (Operation not
permitted)

We should investigate more deeply how to manage that issue. Opening a
JIRA ticket is a good idea.

At the moment, to unlock you, because you run filefrag as root, just
invoke the command "chsmack -a '*' /my/resulting/file"

Best regards
José

> Hope this is enough information for you.
> 
> Thanks
> 
> Best Regards
> Guowei
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#7913): https://lists.automotivelinux.org/g/agl-dev-community/message/7913
Mute This Topic: https://lists.automotivelinux.org/mt/66430094/2167316
Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx
Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/883735764/xyzzy  [list-automotive-discussions82@xxxxxxxxxxx]
-=-=-=-=-=-=-=-=-=-=-=-





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux