[PATCH v3] checkpatch: add warning on invalid %p extensions

2017-02-10 Thread william . c . roberts
From: William Roberts The kernel supports %p extensions as documented in Documentation/printk-formats.txt. Warn on possibly improper use of non-extension characters. One issue would be the usage of %pk when %pK should have been used. This has a side-effect of appearing to work alright, but does

[PATCH v2] checkpatch: add warning on invalid %p extensions

2017-02-10 Thread william . c . roberts
From: William Roberts The kernel supports %p extensions as documented in Documentation/printk-formats.txt. Warn on possibly improper use of non-extension characters. One issue would be the usage of %pk when %pK should have been used. This has a side-effect of appearing to work alright, but does

[PATCH] checkpatch: add warning on %pk instead of %pK usage

2017-02-10 Thread william . c . roberts
From: William Roberts Sample output: WARNING: %pk is close to %pK, did you mean %pK?. \#20: FILE: drivers/char/applicom.c:230: + printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device. %pk\n", dev->irq, pci_get_class); Signed-off-by: William Roberts --- scri

[PATCH] can: Fix kernel panic at security_sock_rcv_skb

2017-01-12 Thread william . c . roberts
From: Zhang Yanmin The patch is for fix the below kernel panic: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] selinux_socket_sock_rcv_skb+0x65/0x2a0 Call Trace: [] security_sock_rcv_skb+0x4c/0x60 [] sk_filter+0x41/0x210 [] sock_queue_rcv_skb+0x53/0x3a0 [] raw_rcv+0

[PATCH] printk: introduce kptr_restrict level 3

2016-10-05 Thread william . c . roberts
From: William Roberts Some out-of-tree modules do not use %pK and just use %p, as it's the common C paradigm for printing pointers. Because of this, kptr_restrict has no affect on the output and thus, no way to contain the kernel address leak. Introduce kptr_restrict level 3 that causes the kern

[PATCH] [RFC] Introduce mmap randomization

2016-07-26 Thread william . c . roberts
From: William Roberts This patch introduces the ability randomize mmap locations where the address is not requested, for instance when ld is allocating pages for shared libraries. It chooses to randomize based on the current personality for ASLR. Currently, allocations are done sequentially with

[PATCH] [RFC] Introduce mmap randomization

2016-07-26 Thread william . c . roberts
The recent get_random_long() change in get_random_range() and then the subsequent patches Jason put out, all stemmed from my tinkering with the concept of randomizing mmap. Any feedback would be greatly appreciated, including any feedback indicating that I am idiot.

[PATCH] randomize_range: use random long instead of int

2016-07-25 Thread william . c . roberts
From: William Roberts Use a long when generating the random range rather than an int. This will produce better random distributions as well as matching all the types at hand. Signed-off-by: William Roberts --- drivers/char/random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff