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-next>] [day] [month] [year] [list]
Date:	Sat, 2 Jun 2007 20:55:13 +0200
From:	Jonathan Schleifer <js@....de>
To:	aeb@....nl
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] Ignore partition table on device

Hello.

This patch adds a new kernel parameter (ignore_partitions=device) to
the kernel. It is useful when using a fake RAID with dmraid so that
Linux won't complain about attemps to access the drive beyond its
boundaries when udev and/or hald are started.

--- linux-2.6.21.1/fs/partitions/check.c.orig	2007-06-02 14:19:26.000000000 +0200
+++ linux-2.6.21.1/fs/partitions/check.c	2007-06-02 15:16:22.000000000 +0200
@@ -39,6 +39,14 @@
 extern void md_autodetect_dev(dev_t dev);
 #endif
 
+static char * __initdata ignore_dev;
+static int __init ignore_dev_fn(char *str)
+{
+	ignore_dev = str;
+	return 1;
+}
+__setup("ignore_partitions=", ignore_dev_fn);
+
 int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/
 
 static int (*check_part[])(struct parsed_partitions *, struct block_device *) = {
@@ -165,6 +173,13 @@
 		sprintf(state->name, "p");
 
 	state->limit = hd->minors;
+
+	if (ignore_dev != NULL && !strcmp(state->name, ignore_dev)) {
+		memset(&state->parts, 0, sizeof(state->parts));
+		printk(" partition table ignored.\n");
+		return state;
+	}
+
 	i = res = err = 0;
 	while (!res && check_part[i]) {
 		memset(&state->parts, 0, sizeof(state->parts));

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