lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150306174254.GB19001@vmdeb7>
Date:	Fri, 6 Mar 2015 09:42:54 -0800
From:	Darren Hart <dvhart@...radead.org>
To:	Bruno Prémont <bonbons@...ux-vserver.org>
Cc:	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
	Petri Hodju <petrihodju@...oo.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Matthew Garrett <matthew.garrett@...ula.com>
Subject: Re: [Patch v2] apple-gmux: lock iGP IO to protect from vgaarb changes

On Thu, Mar 05, 2015 at 11:20:38PM +0100, Bruno Prémont wrote:
> As GMUX depends on IO for iGP to be enabled and active, lock the IO at
> vgaarb level. This should prevent GPU driver for dGPU to disable IO for
> iGP while it tries to own legacy VGA IO.
> 
> This fixes usage of backlight control combined with closed nvidia
> driver on some Apple dual-GPU (intel/nvidia) systems.
> 
> On those systems loading nvidia driver disables intel IO decoding,
> disabling the gmux backlight controls as a side effect.
> Prior to commits moving boot_vga from (optional) efifb to less optional
> vgaarb this mis-behavior could be avoided by using right kernel config
> (efifb enabled but vgaarb disabled).
> 
> This patch explicitly does not try to trigger vgaarb changes in order
> to avoid confusing already running graphics drivers. If IO has been
> mis-configured by vgaarb gmux will thus fail to probe.
> It is expected to load/probe gmux prior to graphics drivers.
> 
> Fixes: ce027dac592c0ada241ce0f95ae65856828ac450 # nvidia interaction
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=86121
> Reported-by: Petri Hodju <petrihodju@...oo.com>
> Tested-by: Petri Hodju <petrihodju@...oo.com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Matthew Garrett <matthew.garrett@...ula.com>
> Signed-off-by: Bruno Prémont <bonbons@...ux-vserver.org>
> ---
> Respinning, fixing Darren's nit.
> 
> Changes since v1:
> - Dropped repeat of gmux in pr_info/pr_err calls
> - Mention PCI device we tried to lock IO for in case of error

Hi Bruno,

I don't know if this is on your end or mine (I've not seen this before). Saving
off your patch (through mutt like I do everything else) to a file and applying
works, build works, and git show and visual inspection look correct.

However, checkpatch sees a lot of =3D instead of just =, and complains bitterly.

Can you check this patch (from the list) and let me know what you find?


ERROR: patch seems to be corrupt (line wrapped?)
#93: FILE: drivers/platform/x86/apple-gmux.c:27:
=20

ERROR: spaces required around that '=' (ctx:WxV)
#108: FILE: drivers/platform/x86/apple-gmux.c:421:
+	struct pci_dev *pdev =3D NULL;
 	                     ^

WARNING: Missing a blank line after declarations
#109: FILE: drivers/platform/x86/apple-gmux.c:422:
+	struct pci_dev *pdev =3D NULL;
+	while ((pdev =3D pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {

ERROR: spaces required around that '=' (ctx:WxV)
#109: FILE: drivers/platform/x86/apple-gmux.c:422:
+	while ((pdev =3D pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) {
 	             ^

ERROR: spaces required around that '=' (ctx:WxV)
#130: FILE: drivers/platform/x86/apple-gmux.c:447:
+	struct pci_dev *pdev =3D NULL;
 	                     ^

ERROR: spaces required around that '=' (ctx:WxV)
#155: FILE: drivers/platform/x86/apple-gmux.c:510:
+	pdev =3D gmux_find_pdev();
 	     ^

ERROR: spaces required around that '=' (ctx:WxV)
#160: FILE: drivers/platform/x86/apple-gmux.c:515:
+		ret =3D -EBUSY;
 		    ^

ERROR: need consistent spacing around '-' (ctx:WxV)
#160: FILE: drivers/platform/x86/apple-gmux.c:515:
+		ret =3D -EBUSY;
 		        ^

ERROR: spaces required around that '=' (ctx:WxV)
#164: FILE: drivers/platform/x86/apple-gmux.c:519:
+	gmux_data->pdev =3D pdev;
 	                ^

total: 8 errors, 1 warnings, 96 lines checked

/home/dvhart/apple.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ