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: <20061202191519.a25282ad.vsu@altlinux.ru>
Date:	Sat, 2 Dec 2006 19:15:19 +0300
From:	Sergey Vlasov <vsu@...linux.ru>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	linux-kernel@...r.kernel.org, Eric Piel <eric.piel@...linux.org>,
	Ben Collins <ben.collins@...ntu.com>
Subject: Re: [RFC] Include ACPI DSDT from INITRD patch into mainline

On Sat, 02 Dec 2006 11:30:32 +0100 Arjan van de Ven wrote:

> On Fri, 2006-12-01 at 13:36 -0500, Ben Collins wrote:
> > I'd be willing to bet that most distros have this patch in their kernel.
> > One of those things we can't really live without.
> >
> > What I haven't understood is why it isn't included in the mainline
> > kernel yet.
>
> it's not that hard ;)
>
> replacing the DSDT code *while it's live* is just a bad idea.

But the suggested patch does not do this.

> The kernel already has a facility to override the DSDT, but that one
> does it *from the start*. Sounds like that one should be used or
> maybe enhanced a little to make it more distro friendly if something
> is lacking.

The patch replaces the DSDT with the binary from initramfs in the same
acpi_os_table_override() function as the currently available
CONFIG_ACPI_CUSTOM_DSDT does:

@@ -226,13 +291,20 @@ acpi_os_table_override(struct acpi_table
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;

+	*new_table = NULL;
+
 #ifdef CONFIG_ACPI_CUSTOM_DSDT
 	if (strncmp(existing_table->signature, "DSDT", 4) == 0)
 		*new_table = (struct acpi_table_header *)AmlCode;
-	else
-		*new_table = NULL;
-#else
-	*new_table = NULL;
+#endif
+#ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD
+	if (strncmp(existing_table->signature, "DSDT", 4) == 0) {
+		struct acpi_table_header* initrd_table = acpi_find_dsdt_initrd();
+		if (initrd_table) {
+			*new_table = initrd_table;
+			acpi_must_unregister_table = TRUE;
+		}
+	}
 #endif
 	return AE_OK;
 }

However, this patch slightly changes initialization order of some
kernel parts:

 - The call to populate_rootfs() is moved before calls to
   smp_prepare_cpus(max_cpus), do_pre_smp_initcalls(), smp_init(),
   sched_init_smp() and cpuset_init_smp().

 - The call to acpi_early_init() is moved from start_kernel() (where
   it is done just before rest_init()) to rest_init(), where it is now
   preceded by lock_kernel(), set_cpus_allowed(current, CPU_MASK_ALL),
   child_reaper = current and the moved populate_rootfs().

Not sure if this reordering is safe in theory, but it works for many
users of the patch.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ