Page MenuHomeFreeBSD

Fix kern_copyin test.
ClosedPublic

Authored by kib on Sep 3 2020, 2:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 6, 9:09 PM
Unknown Object (File)
Thu, Feb 6, 12:15 PM
Unknown Object (File)
Wed, Jan 29, 1:33 PM
Unknown Object (File)
Jan 19 2025, 6:23 PM
Unknown Object (File)
Jan 19 2025, 6:09 PM
Unknown Object (File)
Jan 19 2025, 6:03 PM
Unknown Object (File)
Dec 3 2024, 2:52 PM
Unknown Object (File)
Nov 15 2024, 8:17 AM
Subscribers

Details

Summary

Main part is that kern_copyin on amd64 after LA57 sould query the top of UVA for correct operations. In fact it should started doing that after the workaround for AMD bug with IRET in the last user page was fixed by reducing UVA by a page.

Also since we started calculating top of UVA, fix MIPS according to the comment.

Reported by: lwhsu
PR: 248933

Diff Detail

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

Event Timeline

kib requested review of this revision.Sep 3 2020, 2:51 PM
markj added inline comments.
tests/sys/kern/kern_copyin.c
38 ↗(On Diff #76610)

I don't see any uses of bool.

58 ↗(On Diff #76610)

I think this definition should come after get_maxuser_address().

64 ↗(On Diff #76610)

Wouldn't vm_offset_t or uintptr_t be a more appropriate type for psstrings?

This revision is now accepted and ready to land.Sep 3 2020, 3:02 PM
This revision now requires review to proceed.Sep 3 2020, 3:20 PM

Fix all uses of size_t for uintptr_t, which deserve it.

tests/sys/kern/kern_copyin.c
90 ↗(On Diff #76614)

I think maxuser and the return type of get_maxuser_address() could change too.

This revision is now accepted and ready to land.Sep 3 2020, 3:24 PM
This revision was automatically updated to reflect the committed changes.