Page MenuHomeFreeBSD

Split kern_break from sys_break and use it in linuxulator
ClosedPublic

Authored by emaste on Jun 26 2018, 6:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 3 2024, 10:51 PM
Unknown Object (File)
Jan 29 2024, 5:05 PM
Unknown Object (File)
Dec 23 2023, 1:44 AM
Unknown Object (File)
Dec 11 2023, 11:40 PM
Unknown Object (File)
Sep 28 2023, 12:43 AM
Unknown Object (File)
Aug 10 2023, 5:01 AM
Unknown Object (File)
Aug 10 2023, 4:59 AM
Unknown Object (File)
Aug 10 2023, 4:59 AM
Subscribers

Details

Summary

Previously the linuxulator's linux_brk invoked the FreeBSD sys_break syscall implementation directly. Instead, move the bulk of the existing implementation to kern_break, and use that from both sys_break and linux_brk.

This also addresses a minor bug in linux_brk in that we now return the actual (rounded up) break address, rather than the requested value.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good to me. I wonder if we also want to restore ibcs2's int return value?

This revision is now accepted and ready to land.Jun 26 2018, 10:46 PM
sys/compat/linux/linux_misc.c
243 ↗(On Diff #44472)

Remove excess ().

244 ↗(On Diff #44472)

BTW, type of td_retval is register_t, not long.

sys/vm/vm_unix.c
76 ↗(On Diff #44472)

Excess (). And the cast too.

87 ↗(On Diff #44472)

Mismatched types: prototype uses uintptr_t *addr.

This revision now requires review to proceed.Jun 27 2018, 12:42 PM
sys/vm/vm_unix.c
76 ↗(On Diff #44472)

What about the cast?

I wonder if we also want to restore ibcs2's int return value?

Would that be implementing a ibcs2-specific wrapper? I suspect it's not worth it.

sys/vm/vm_unix.c
76 ↗(On Diff #44519)

typo, corrected locally to uap->nsize

This revision was not accepted when it landed; it landed in state Needs Review.Jun 27 2018, 2:45 PM
This revision was automatically updated to reflect the committed changes.

I wonder if we also want to restore ibcs2's int return value?

Would that be implementing a ibcs2-specific wrapper? I suspect it's not worth it.

I agree it probably isn't worth it.