Page MenuHomeFreeBSD

LinuxKPI: switch mallocarray to an lpi implementation using __kmalloc()
Needs ReviewPublic

Authored by bz on Thu, Sep 12, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 18, 7:24 AM
Unknown Object (File)
Wed, Sep 18, 1:04 AM
Unknown Object (File)
Tue, Sep 17, 4:20 AM
Unknown Object (File)
Sat, Sep 14, 3:15 AM
Unknown Object (File)
Fri, Sep 13, 2:04 PM
Unknown Object (File)
Fri, Sep 13, 9:02 AM
Unknown Object (File)
Fri, Sep 13, 8:04 AM
Unknown Object (File)
Fri, Sep 13, 12:34 AM
Subscribers

Details

Reviewers
jhb
Group Reviewers
linuxkpi
Summary

With mallocarray() we cannot guarantee that any size larger than
PAGE_SIZE will be contiguous. Switch to use the internal __kmalloc()
implementation which now does provide that guarantee.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 59464
Build 56351: arc lint + arc unit

Event Timeline

bz requested review of this revision.Thu, Sep 12, 6:27 PM

Also change the (internal) mallocarray() calls in linux_compat.c to lkpi_mallocarray()
given we are using the LinuxKPI malloc type (M_KMALLOC) there already; better for
consistency.