Page MenuHomeFreeBSD

acpi_spmc: Check Intel constraint packages
AcceptedPublic

Authored by obiwac on Thu, Sep 10, 9:47 AM.
Tags
None
Referenced Files
F171489462: D59566.id186375.diff
Fri, Sep 11, 10:35 AM
F171481556: D59566.id.diff
Fri, Sep 11, 9:16 AM
F171457846: D59566.diff
Fri, Sep 11, 5:30 AM
F171456858: D59566.id186360.diff
Fri, Sep 11, 5:23 AM
Unknown Object (File)
Thu, Sep 10, 8:47 PM
Unknown Object (File)
Thu, Sep 10, 8:37 PM
Unknown Object (File)
Thu, Sep 10, 8:34 PM
Unknown Object (File)
Thu, Sep 10, 8:34 PM
Subscribers

Details

Reviewers
olce
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 76742
Build 73625: 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.