Re: [PATCH libdrm] xf86drm: fallback to normal path when realpath fails

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

 



On 2018-08-23 2:52 p.m., Emil Velikov wrote:
> On Thu, 23 Aug 2018 at 11:38, Michel Dänzer <michel@xxxxxxxxxxx> wrote:
>> On 2018-08-23 12:04 p.m., Emil Velikov wrote:
>>> From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
>>>
>>> Earlier commit reworked our sysfs handling to use realpath.
>>> Sadly that backfired since the Firefox sandboxing mechanism rejects
>>> that. Despite the files/folders being in the allowed list, of the
>>> sandboxing mechanism.
>>
>> From the Firefox bug report, the problem was stat on the top-level /sys
>> directory.
>>
> That's the part I didn't quite get. I don't see anything in libdrm
> that would do that.
> We do have fstat(open("/dev/dri/foo"), stat("/dev/dri/foo").
> 
> I guess the C runtime (compiler?) might be doing that one?
> Like the realpath call being translated to a series of stat() calls.

Yeah, probably something like that.


>>> Oddly enough, the Chromium sandboxing doesn't complain about any of
>>> this.
>>>
>>> Since there are no Firefox releases with the fix, add a temporary
>>> solution which falls back to the original handling.
>>>
>>> Sadly, this won't work for virgl.
>>>
>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107516
>>> Cc: Michel Dänzer <michel.daenzer@xxxxxxx>
>>> Cc: Mike <bugs.freedesktop.org@xxxxxxxxxxxx>
>>> Fixes: a02900133b3 ("xf86drm: introduce a get_real_pci_path() helper")
>>> Signed-off-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
>>
>> Reviewed-by: Michel Dänzer <michel.daenzer@xxxxxxx>
>> Tested-by: Michel Dänzer <michel.daenzer@xxxxxxx>

These are now also valid for v2, thanks again!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux