As pointed out in #1, the existing monolithic ringbuf struct architecture is both error prone and introduces unnecessary overhead.
Instead, the struct should be split in to two structs, a local and shared one. This would remove the ability of attackers to modify critical data in the local one, and reduce the amount of checking that has to be done, since only the shared one needs to be checked.
As pointed out in #1, the existing monolithic ringbuf struct architecture is both error prone and introduces unnecessary overhead.
Instead, the struct should be split in to two structs, a local and shared one. This would remove the ability of attackers to modify critical data in the local one, and reduce the amount of checking that has to be done, since only the shared one needs to be checked.