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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Jun 2015 02:44:07 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	"Zheng, Lv" <lv.zheng@...el.com>
Cc:	"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
	"Brown, Len" <len.brown@...el.com>, Lv Zheng <zetalog@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"Moore, Robert" <robert.moore@...el.com>
Subject: Re: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS.

On Thursday, June 25, 2015 12:43:39 AM Zheng, Lv wrote:
> Hi, Rafael
> 
> > From: Rafael J. Wysocki [mailto:rjw@...ysocki.net]
> > Sent: Thursday, June 25, 2015 7:57 AM
> > 

[cut]

> > >
> > > +/*******************************************************************************
> > > + *
> > > + * FUNCTION:    acpi_set_firmware_waking_vector
> > > + *
> > > + * PARAMETERS:  physical_address    - 32-bit physical address of ACPI real mode
> > > + *                                    entry point
> > > + *              physical_address64  - 64-bit physical address of ACPI protected
> > > + *                                    entry point
> > > + *
> > > + * RETURN:      Status
> > > + *
> > > + * DESCRIPTION: Sets the firmware_waking_vector fields of the FACS
> > > + *
> > > + ******************************************************************************/
> > > +
> > > +acpi_status
> > > +acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
> > > +				acpi_physical_address physical_address64)
> > 
> > The question here is: Why does the host OS need to care about the second
> > argument of this function that will always be 0?  Why didn't you keep the
> > old header of acpi_set_firmware_waking_vector() as a one-argument function
> > taking a u32 and why didn't you add something like
> > 
> > acpi_status acpi_set_firmware_waking_vector_full(u32 real_mode_address,
> > 					acpi_physical_address high_address)
> > 
> > and why didn't you redefine acpi_set_firmware_waking_vector() as
> > 
> > acpi_status acpi_set_firmware_waking_vector(u32 real_mode_address)
> > {
> > 	return acpi_set_firmware_waking_vector_full(real_mode_address, 0);
> > }
> > 
> > ?
> > 
> > If you did that, there wouldn't be any need to touch the code in
> > drivers/acpi/sleep.c and the arch headers, so can you please explain to me
> > why *exactly* you didn't do that?
> 
> Host OS can set non 0 address for both  real_mode_address and high_address to indicate that it can support both 32-bit and 64-bit resume environments.
> So if a BIOS favors 32-bit resume environment, it can resume from here; if another BIOS favors 64-bit resume environment, it can resume from there.
> And host OSes can be implemented using only 1 binary to work with both BIOSes.

I'm not talking about that.

It is fine to provide a *new* interface for the OSes that want to do that
(if any), but *why* is that regarded as a good enough reason for essentially
*removing* the old interface that Linux (and presumably other OSes too) have
been using so far?

We don't want to pass nonzero as high_address anyway, so why are we *forced* to
make pointless changes to non-ACPICA code just to be able to always pass 0
as high_address?

Rafael

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