Page MenuHomeFreeBSD

acpi_spmc: Check Intel constraint packages
ClosedPublic

Authored by obiwac on Thu, Sep 10, 9:47 AM.
Tags
None
Referenced Files
F171945815: D59566.diff
Mon, Sep 14, 8:11 PM
Unknown Object (File)
Mon, Sep 14, 9:32 AM
Unknown Object (File)
Mon, Sep 14, 7:34 AM
Unknown Object (File)
Mon, Sep 14, 5:33 AM
Unknown Object (File)
Sun, Sep 13, 11:03 PM
Unknown Object (File)
Sun, Sep 13, 5:04 PM
Unknown Object (File)
Sun, Sep 13, 1:48 PM
Unknown Object (File)
Sun, Sep 13, 1:03 PM
Subscribers

Details

Summary

Some firmware inexplicably decides to do non-standard and annoying stuff
here, e.g. the Fujitsu Futro S940 with an Intel Pentium J5005 sometimes
returns the following when calling the DEVICE_CONSTRAINTS function on
the Intel DSM:

Return (Package (0x01)
{
    Zero
})

(Package elements here are supposed to be constraint packages, not just a
single value.)

First reported in the following forum post:

https://forum.netgate.com/topic/201090/2.9.0-beta-leads-to-kernel-panic-on-boot

Reported by: TampertK on forum.netgate.com
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76738
Build 73621: arc lint + arc unit

Event Timeline

Move name dup later so no leak if skipped constraint

That's certainly good enough. We can add even more checks later.

This revision is now accepted and ready to land.Fri, Sep 11, 4:00 PM

By the way, could you perhaps move all reads to constraint_obj->Package.Elements[] together close to the package size check? That makes it easier to verify that the check is correct.

This revision was automatically updated to reflect the committed changes.