serenity
serenity copied to clipboard
Kernel: Add new integer variable type to SysFS
This change adds an integer variable type to SysFS in preparation for allowing certain features to be configured live, such as network TTL.
It looks like that note came from the original boolean variable implementation, and has been copied along since. I can remove it from this for sure.
Re safe_memcpy
, as I'm not 100% clear on where locks are required, just to be sure - you're saying that the mutex probably isn't required and that doing safe_memcpy on the result should be good enough?
I've done the other cleanup as well, but will wait on the safe_memcpy
discussion before I push the update.
It looks like that note came from the original boolean variable implementation, and has been copied along since. I can remove it from this for sure.
Re
safe_memcpy
, as I'm not 100% clear on where locks are required, just to be sure - you're saying that the mutex probably isn't required and that doing safe_memcpy on the result should be good enough?I've done the other cleanup as well, but will wait on the
safe_memcpy
discussion before I push the update.
If we do safe_memcpy
, then it doesn't matter if we took a spinlock or not - page faults could still occur, hence everything is fine. The initial problem (I think) was that I tried to use mutexes to protect /sys/kernel/...
variables, but since we use spinlocks, that problem is not relevant.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!