Snap hangs when accessing a special /dev/file (/dev/vcio) [ubuntu-core 16 / RaspberryPi2]

Jacques Supcik jacques at supcik.net
Thu Nov 10 10:01:25 UTC 2016


Thank you Simon for your reply.

I understand that it is very dangerous to give full access to the whole
memory. My application runs on a Raspberry Pi and controls a LED stripe
(such as https://www.adafruit.com/product/2294 or https://www.sparkfun.com/
products/13304). These devices (based in WS281X chips) require a very
accurate "real-time" signal that is hard to produce on a system with an
operating system (It is easier to use it with an Arduino).

For the Raspberry Pi, we can use the popular library from Jeremy Garff (
https://github.com/jgarff/rpi_ws281x). This library uses the DMA coupled
with the PWM to generate the accurate signal. I don't know in detail how
does the interface works and why it needs to write directly to /dev/mem.
I'm just using it with a golang wrapper around it.

My code is available on gitlab (https://gitlab.com/telecom-tower/tower) and
the snap is automatically built using gitlab-CI. You can see a picture of
the system (and the current message) on https://telecom-tower.tk/.

Best regards,

█  Jacques

On 10 November 2016 at 09:33, Simon Fels <simon.fels at canonical.com> wrote:

> On 09.11.2016 21:25, Jacques Supcik wrote:
> > Thank you Oliver for your constructive feedback.
> >
> > I like the idea of a "mailbox-device" and I will open a bug in the
> > whishlist of snappy.
> >
> > My snap needs also write access to "/dev/mem":
> >
> > = AppArmor =
> > Time: Nov  9 19:09:52
> > Log: apparmor="ALLOWED" operation="open"
> > profile="snap.telecom-tower.daemon" name="/dev/mem" pid=3643
> > comm="tower" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
> > File: /dev/mem (write)
> >
> > Should this also be addressed by the "mailbox-device" interface or
> > should I fill another bug for a "physical-memory" interface? Or do you
> > have an idea for a better name? Or is there already something available
> > for accessing /dev/mem?
>
> This would be definitely a different interface but the more interesting
> question is why your app needs access to /dev/mem. That would give blind
> access to the whole system memory space which is a highly privileged
> operation I would say not many applications will need or even get
> because of the obvious access to everything on the system.
>
> Can you elaborate a bit more on what your application is doing with
> /dev/mem and why it needs access to the full system memory?
>
> regards,
> Simon
>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161110/fc25e2f5/attachment.html>


More information about the Snapcraft mailing list