Re: [patch 1/4] Add routine for generating an ID for kernel pointer

From: Valdis . Kletnieks
Date: Tue Dec 27 2011 - 18:57:31 EST


On Fri, 23 Dec 2011 16:47:42 +0400, Cyrill Gorcunov said:
> The routine XORs the given pointer with a random value
> producing an ID (32 or 64 bit, depending on the arch).

> Index: linux-2.6.git/mm/Kconfig

> +config GENERIC_OBJECT_ID
> + bool "Enable generic object ID infrastructure"
> + depends on CHECKPOINT_RESTORE
> + default n
> + help
> + Turn on the functionality that can generate IDs for kernel

"Turn on functionality"

> + objects, which are exported to userspace via /proc filesystem.

Lose the ,

> +
> + It is useful if you need to examinate kernel objects and test

examine

> + if they are shared between several tasks. These IDs should never
> + be used for anything but the "sameness" test. Besides, the IDs are

s/Besides, the/The/

> + dynamic and valid only while object is alive, once it get freed or

s/alive, once/alive. Once/

> + kernel is rebooted -- the IDs will be changed.

s/ --/,/

Also, see Andrew's comments regarding a generic foo_fields_equal() in-kernel.

Attachment: pgp00000.pgp
Description: PGP signature