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] [day] [month] [year] [list]
Date:	Sun, 20 Dec 2009 19:19:57 -0700
From:	Alex Chiang <achiang@...com>
To:	Lin Ming <ming.m.lin@...el.com>
Cc:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	"lenb@...nel.org" <lenb@...nel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 01/11] ACPI: processor: call _PDC early

* Lin Ming <ming.m.lin@...el.com>:
> On Mon, 2009-12-21 at 03:30 +0800, Alex Chiang wrote:
> > We discovered that at least one machine (HP Envy), methods in the DSDT
> > attempt to call external methods defined in a dynamically loaded SSDT.
> > 
> > Unfortunately, the DSDT methods we are trying to call are part of the
> > EC initialization, which happens very early, and the the dynamic SSDT
> > is only loaded when a processor _PDC method runs much later.
> > 
> > This results in namespace lookup errors for the (as of yet) undefined
> > methods.
> > 
> > Since Windows doesn't have any issues with this machine, we take it
> > as a hint that they must be evaluating _PDC much earlier than we are.
> > 
> > Thus, the proper thing for Linux to do should be to match the Windows
> > implementation more closely.
> > 
> > Provide a mechanism to call _PDC before we enable the EC. Doing so loads
> > the dynamic tables, and allows the EC to be enabled correctly.
> > 
> > The ACPI processor driver will still evaluate _PDC in its .add() method
> > to cover the hotplug case.
> > 
> > Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=14824
> > 
> > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> > @@ -888,6 +888,8 @@ static int __init acpi_bus_init(void)
> >  		goto error1;
> >  	}
> >  
> > +	acpi_early_processor_set_pdc();
> 
> acpi_bus_init(...) {
> 	acpi_ec_ecdt_probe();
> 
> 	acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
> 
> 	acpi_early_processor_set_pdc();
> 
> 	acpi_boot_ec_enable();
> }
> 
> EC space handler may be installed in acpi_ec_ecdt_probe or
> acpi_boot_ec_enable.  In your machine(HP Envy), EC space
> handler is installed in acpi_boot_ec_enable.

Correct.

> It seems that this patch does not fix the problem if EC space
> hanlder is installed in acpi_ec_ecdt_probe, right?

Also correct.

But this patch is a reaction to reported behavior of a machine in
the field, with a shipping BIOS, and the problem was that we
only installed the handler in acpi_boot_ec_enable().

> But clearly, we can not put acpi_early_processor_set_pdc before
> acpi_ec_ecdt_probe because ACPI namespace objects have not been
> initialized yet at that time.
> 
> Looks like a "chicken or the egg" problem.
> Which came first, the chicken or the egg?

I understand the point you are making, but in this case, we do
know which came first (the chicken ;).

Maybe in the future, we'll be surprised again and discover that
we need to evaluate _PDC even earlier, but I prefer to fix that
problem later, if it ever occurs, than to worry about it now.

This patch fixes a real issue, so I prefer to focus on that
instead of worrying about a theoretical issue.

Thanks,
/ac, unless Len tells me I'm wrong

--
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