Page MenuHomeFreeBSD

Fix linprocfs(4) /proc/self/mem semantics
ClosedPublic

Authored by trasz on Oct 16 2020, 4:04 PM.

Details

Summary

Fix linprocfs(4) /proc/self/mem semantics to more closely match Linux.
Steam's Anti-Cheat seems to use it.

PR: 248223

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

trasz requested review of this revision.Oct 16 2020, 4:04 PM
sys/compat/linprocfs/linprocfs.c
7 ↗(On Diff #78320)

Why ?

sys/compat/linprocfs/linprocfs.c
7 ↗(On Diff #78320)

It's there in sys/fs/procfs/procfs_mem.c, where I pasted the function from.

sys/compat/linprocfs/linprocfs.c
7 ↗(On Diff #78320)

I do not think it is worth the hassle. Also, I do not see why don't you wrapped procfs_doprocmem.

Reuse procfs_doprocmem() instead of copy/pasting it.

kib added inline comments.
sys/compat/linprocfs/linprocfs.c
1289 ↗(On Diff #78504)

None of these blank lines is warranted or supported by style(9).

This revision is now accepted and ready to land.Oct 20 2020, 2:20 PM
sys/compat/linprocfs/linprocfs.c
1289 ↗(On Diff #78504)

I find it easier to read this way, though.

sys/compat/linprocfs/linprocfs.c
1289 ↗(On Diff #78504)

The only function of these blank lines is to eat vertical space in editor, allowing to see less code.