Discussion:
Unable to use csu_config.h to secure GPIO access from normal world
Abhishek Kumar
2017-06-06 13:57:05 UTC
Permalink
Hello
I am using genode trustzone code on imx53 board. AFAIU, following lines in
csu_config.h are supposed to regulate the access from normal world:

```
namespace Csu_config
{
enum {
SECURE_GPIO = 1,
SECURE_ESDHC = 0,
SECURE_UART = 0,
SECURE_I2C = 1,
};
};
```

Though GPIO is set secure, I am still able to set direction and value of
gpios from the linux running in normal world, on top of tz_vmm running in
secure world. Should it not raise some exception? Where am I going wrong?

Thanks
Abhishek
Stefan Kalkowski
2017-06-08 10:43:21 UTC
Permalink
Hi,
Post by Abhishek Kumar
Hello
I am using genode trustzone code on imx53 board. AFAIU, following lines
```
namespace Csu_config
{
enum {
SECURE_GPIO = 1,
SECURE_ESDHC = 0,
SECURE_UART = 0,
SECURE_I2C = 1,
};
};
```
Though GPIO is set secure, I am still able to set direction and value of
gpios from the linux running in normal world, on top of tz_vmm running
in secure world. Should it not raise some exception? Where am I going
wrong?
I would assume it to silently ignore your settings, as the GPIO driver's
register access is just uncommented. Have a look here:


https://github.com/skalk/linux/commit/eccce1c595d7962c95086d6fa60291f7c2c1a497#diff-b66779fc74ad745e9385d5107cc44104

Are you sure that GIO settings are really changed?

Regards
Stefan
Post by Abhishek Kumar
Thanks
Abhishek
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
Loading...