I ve inherited supporting some linux kernel drivers (in which my experience is very limited). My question is as follows. It s an embedded environment and the hardware has 512MB of physical memory. However, the boot parameters that are passed to the kernel limits the memory to 256MB by using the variable linuxMem=mem=256M. In my research of this environment variable, I am of the understanding that this limits the amount of memory that the kernel can manage to 256MB. Yet in some application code that runs on my target, I see an open of /dev/mem and a subsequent mmap of the returned file descriptor and the offset parameter of the mmap call is in the upper 256MB of physical memory. And things seem to be working fine. So my question is "why does it work if the kernel supposedly does not know about the upper 256MB?"
For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...