Fix devmem_is_allowed for below 1MB accesses for an efi machine
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Matthew Garrett
Oh, right, got you. In that case I think we potentially need a finer-grained check on EFI platforms - the EFI memory map is kind enough to tell us the difference between unusable regions and io regions, and we could avoid access to the unusable ones.
I wanted to mention in this context a patch RFC I posted yesterday as a distinct thread which is visible as https://lkml.org/lkml/2012/10/3/589
with the subject: [PATCH RFC] function probe_roms accessing improper addresses on UEFI systems.
While the mechanism is different from Tmac's patch (because probe_roms runs early in boot, prior to resource structure initialization) the intent of the change is the same: to prevent a machine check resulting from access to inappropriate physical addresses.
I will monitor both this thread as well as my own recent RFC posting since the underlying issues are common.
Signature · 1 line
Randy Wright <[email protected]> +1-970-898-0998
Quoted 6 lines · Randy Wright
I wanted to mention in this context a patch RFC I posted yesterday as a distinct thread which is visible as https://lkml.org/lkml/2012/10/3/589
with the subject: [PATCH RFC] functionprobe_romsaccessing improper addresses on UEFI systems.
And it's equally as wrong. It has nothing to do with UEFI vs BIOS at all; this is rather a change in the classic behavior on x86 to return -1 on an impossible read rather than #MC.
Normally I would say probe_roms() doesn't really make any sense in the EFI context anyway, but I believe there are systems which actually need to probe at least for the video ROM even when running under EFI (and I think there are storage devices which have parameter blocks in their ROMs with similar issues).
Excluding reserved regions in general is a non-option, because on a lot of systems the ROMs that *do* need to be probed for are marked just RESERVED.
One option would be to quirk it; obviously there is some piece of hardware which does cause this #MC and hopefully we could use that to detect that specific regions should be excluded; another option would be to trap the #MC during ROM probing.
-hpa