On older kernels, when userspace program disables SIGSYS, catch ENOSYS and
emulate getrandom(2) syscall with the kern.arandom sysctl (via existing
arc4_sysctl wrapper). Some special care is taken to faithfully emulate EFAULT
on NULL pointers, because sysctl(3) as used by kern.arandom ignores them.
(This was caught by getentropy(3) ATF tests.)
Details
Details
Run getentropy(3) ATF test suite against a new libc and old kernel. Observe
all tests pass.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 15692 Build 15721: arc lint + arc unit
Event Timeline
lib/libc/gen/Symbol.map | ||
---|---|---|
549 | I do not understand why do you need this symbol exported. Also, if you want to hide the symbol from static linking, put two '_' before the alphabetical symbol. |
lib/libc/gen/Symbol.map | ||
---|---|---|
549 | If it is not needed for the symbol to have visibility in getentropy.c, I will just remove it. I am not very familiar with how we use linker maps in libc, sorry. Since linker maps apply only to dynamic libraries, you are suggesting the function be renamed to have two underscores, in addition to removing the entry from Symbol.map — right? I will go ahead and make both changes. |
Comment Actions
Per kib:
- Remove exported arc4_sysctl symbol
- Use double-underscore in libc-private arc4_sysctl