aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2021-01-25 21:36:00 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2021-01-25 21:36:00 +0000
commit5094899e6bad547957861343fedd2501ac1539a8 (patch)
treee7db74015c777c941c76e742294312ba9800e541
parenta057b24428d3b621cdceb8d1130c8d947571e124 (diff)
downloadmonitor-edid-5094899e6bad547957861343fedd2501ac1539a8.tar
monitor-edid-5094899e6bad547957861343fedd2501ac1539a8.tar.gz
monitor-edid-5094899e6bad547957861343fedd2501ac1539a8.tar.bz2
monitor-edid-5094899e6bad547957861343fedd2501ac1539a8.tar.xz
monitor-edid-5094899e6bad547957861343fedd2501ac1539a8.zip
Don't try to run monitor-get-edid-using-vbe when booted in UEFI mode...
it may overwrite a memory region being used by the UEFI BIOS (mga#28124)
-rw-r--r--NEWS4
-rwxr-xr-xmonitor-edid6
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index ce26a6f..b730cab 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- monitor-edid
+ o don't try to run monitor-get-edid-using-vbe when booted in UEFI mode -
+ it may overwrite a memory region being used by the UEFI BIOS (mga#28124)
+
Version 3.3 - 29 August 2020
- monitor-get-edid-using-vbe:
diff --git a/monitor-edid b/monitor-edid
index 3daca53..951a419 100755
--- a/monitor-edid
+++ b/monitor-edid
@@ -83,7 +83,11 @@ sub get_edids {
my $s = slurp($_);
(is_edid_possibly_valid($s) && !$seen{ $_[1] }++) ? [ $_ => $s ] : ();
} get_edid_files();
-
+
+ # Don't try to run monitor-get-edid-using-vbe when booted in UEFI mode.
+ # It may overwrite a memory region being used by the UEFI BIOS (mga#28124)
+ return @l if -e '/sys/firmware/efi';
+
if (!@l || !$b_get_first && $< == 0) {
if (my $cmd = get_using_vbe()) {
my $min_port = $opt{'vbe-port'} || 0;