[PATCH] UBUNTU: SAUCE: samsung-laptop: disable in UEFI mode

Andy Whitcroft apw at canonical.com
Thu Dec 20 11:35:10 UTC 2012


On Wed, Dec 19, 2012 at 10:08:14PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> BugLink: https://launchpad.net/bugs/1040557
> 
> Disable this driver if we've booted in UEFI mode as some Samsungs
> seem to get bricked and are rendered unbootable when this driver
> tries to poke around the BIOS controls when in UEFI.
> 
> == SRU Justification ==
> 
> A whole bunch of Samsung laptops in UEFI mode get bricked and
> become unbootable when using the samsung-laptop driver. The driver
> only should poke around with the firmware in traditional BIOS mode
> rather than in UEFI mode.  To prevent bricking machines we should
> disable this driver (which only works in non-UEFI mode anyway)
> when we are using UEFI.
> 
> == Fix ==
> 
> This SAUCE patch detects if we booted in UEFI and if so exits
> early in the init stage with -ENODEV.
> 
> == Impact ==
> 
> Without this fix users are seeing their machines getting bricked.
> 
> == Test Case ==
> 
> I haven't tested this on UEFI enabled machines.  Joseph Salisbury
> boot tested this on a BIOS enabled machine on Raring and the driver
> loaded, so we know there is no regression potential for BIOS mode
> machines.
> 
> A testcase is to boot the machine. In UEFI mode the machine locks
> up and a subsequent reboot results in a bricked machine. With the
> fix the driver won't load and the machine should be OK.
> 
> Colin Ian King (1):
>   UBUNTU: SAUCE: samsung-laptop: disable in UEFI mode
> 
>  drivers/platform/x86/samsung-laptop.c |    4 ++++
>  1 file changed, 4 insertions(+)

Although this is pretty much untestable the code looks very simple.  I have
confirmed that efi_enabled is set very very very early in setup_arch so
that should be set well before we hit the code in question.  I am slightly
worried we might be able to use noefi on the kernel command line to switch
this before the module loads and turn it into a machine bricking command.
That said, the whole thing is machine bricking as we are so it is most
cirtainly a lot better than that.

Overall:

Acked-by: Andy Whitcroft <apw at canonical.com>

-apw




More information about the kernel-team mailing list