+ poison-add-use-more-constants.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     poison: add & use more constants

has been added to the -mm tree.  Its filename is

     poison-add-use-more-constants.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: poison: add & use more constants
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>


Add more poison values to include/linux/poison.h.  It's not clear to me
whether some others should be added or not, so I haven't added any of
these:

./include/linux/libata.h:#define ATA_TAG_POISON		0xfafbfcfdU
./arch/ppc/8260_io/fcc_enet.c:1918:	memset((char *)(&(immap->im_dprambase[(mem_addr+64)])), 0x88, 32);
./drivers/usb/mon/mon_text.c:429:	memset(mem, 0xe5, sizeof(struct mon_event_text));
./drivers/char/ftape/lowlevel/ftape-ctl.c:738:		memset(ft_buffer[i]->address, 0xAA, FT_BUFF_SIZE);
./drivers/block/sx8.c:/* 0xf is just arbitrary, non-zero noise; this is sorta like poisoning */

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 include/linux/poison.h |    7 +++++++
 kernel/mutex-debug.c   |    5 +++--
 security/keys/key.c    |    3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff -puN include/linux/poison.h~poison-add-use-more-constants include/linux/poison.h
--- devel/include/linux/poison.h~poison-add-use-more-constants	2006-06-05 14:01:39.000000000 -0700
+++ devel-akpm/include/linux/poison.h	2006-06-05 14:01:39.000000000 -0700
@@ -45,6 +45,13 @@
 /********** drivers/atm/ **********/
 #define ATM_POISON_FREE		0x12
 
+/********** kernel/mutexes **********/
+#define MUTEX_DEBUG_INIT	0x11
+#define MUTEX_DEBUG_FREE	0x22
+
+/********** security/ **********/
+#define KEY_DESTROY		0xbd
+
 /********** sound/oss/ **********/
 #define OSS_POISON_FREE		0xAB
 
diff -puN kernel/mutex-debug.c~poison-add-use-more-constants kernel/mutex-debug.c
--- devel/kernel/mutex-debug.c~poison-add-use-more-constants	2006-06-05 14:01:39.000000000 -0700
+++ devel-akpm/kernel/mutex-debug.c	2006-06-05 14:01:39.000000000 -0700
@@ -16,6 +16,7 @@
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/poison.h>
 #include <linux/spinlock.h>
 #include <linux/kallsyms.h>
 #include <linux/interrupt.h>
@@ -381,7 +382,7 @@ void debug_mutex_set_owner(struct mutex 
 
 void debug_mutex_init_waiter(struct mutex_waiter *waiter)
 {
-	memset(waiter, 0x11, sizeof(*waiter));
+	memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
 	waiter->magic = waiter;
 	INIT_LIST_HEAD(&waiter->list);
 }
@@ -397,7 +398,7 @@ void debug_mutex_wake_waiter(struct mute
 void debug_mutex_free_waiter(struct mutex_waiter *waiter)
 {
 	DEBUG_WARN_ON(!list_empty(&waiter->list));
-	memset(waiter, 0x22, sizeof(*waiter));
+	memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter));
 }
 
 void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
diff -puN security/keys/key.c~poison-add-use-more-constants security/keys/key.c
--- devel/security/keys/key.c~poison-add-use-more-constants	2006-06-05 14:01:39.000000000 -0700
+++ devel-akpm/security/keys/key.c	2006-06-05 14:01:39.000000000 -0700
@@ -11,6 +11,7 @@
 
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/poison.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/security.h>
@@ -982,7 +983,7 @@ void unregister_key_type(struct key_type
 		if (key->type == ktype) {
 			if (ktype->destroy)
 				ktype->destroy(key);
-			memset(&key->payload, 0xbd, sizeof(key->payload));
+			memset(&key->payload, KEY_DESTROY, sizeof(key->payload));
 		}
 	}
 
_

Patches currently in -mm which might be from rdunlap@xxxxxxxxxxxx are

origin.patch
git-infiniband.patch
config-exit-if-no-beginning-filename.patch
git-mtd.patch
git-pcmcia.patch
lpfc-sparse-null-warnings.patch
aic7-cleanup-module_parm_desc-strings.patch
qla1280-fix-section-mismatch-warnings.patch
areca-raid-linux-scsi-driver.patch
git-watchdog.patch
alpha-generic-hweight-build-fix.patch
add-poisonh-and-patch-primary-users.patch
update-2-drivers-for-poisonh.patch
poison-add-use-more-constants.patch
add-doc-submitchecklist.patch
doc-add-audit-acct-to-docbook.patch
ip2-fix-sections.patch
codingstyle-add-typedefs-chapter.patch
fix-listh-kernel-doc.patch
listh-doc-change-counter-to-control.patch
kernel-doc-drop-leading-space-in-sections.patch
kernel-doc-script-cleanups.patch
wd7000-fix-section-mismatch-warnings.patch
megaraid_mbox-fix-section-mismatch-warnings.patch
kernel-doc-mm-readhead-fixup.patch
pi-futex-rt-mutex-docs-update.patch
acpi-identify-which-device-is-not-power-manageable.patch
acpi-identify-which-device-is-not-power-manageable-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux