104,6 +104,7 @@ static int __die(const char *str, int err, struct
>> pt_regs *regs)
>>
>> print_modules();
>> show_regs(regs);
>> +__show_regs_alloc_free(regs);
>
>As above, I'm not sure this is the right place to put this. We can get
>here for reasons other than UAF, and I'm sure we can trigger panics via
>UAF without going via this.
>
Adding call here, because we though in case of use after free __die will be
called.
due to unhandled page fault of 0x6b6b6 MAGIC value. thats why picked this place.
Thanks,
Maninder Singh
_el0_svc_compat+0x1c/0x40
[ 19.549782] el0_svc_compat+0x24/0x38
[ 19.549913] el0_sync_compat_handler+0x90/0x158
[ 19.550067] el0_sync_compat+0x174/0x180
..
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm64/include/asm/system_misc.h | 1 +
arch/arm64/kerne
chedule_irq' [-Wmissing-prototypes]
710 | asmlinkage void __sched arm64_preempt_schedule_irq(void)
| ^~~~~~
Reported-by: kernel test robot
Signed-off-by: Maninder Singh
---
arch/arm64/include/asm/processor.h | 2 ++
arch/arm64/i
_el0_svc_compat+0x1c/0x40
[ 19.549782] el0_svc_compat+0x24/0x38
[ 19.549913] el0_sync_compat_handler+0x90/0x158
[ 19.550067] el0_sync_compat+0x174/0x180
..
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm64/include/asm/system_misc.h | 1 +
arch/arm64/kerne
[ 20.195336] ret_fast_syscall+0x0/0x58
[ 20.195491] 0xbeeacde4
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm/include/asm/bug.h | 1 +
arch/arm/kernel/process.c | 11 +++
arch/arm/kernel/traps.c| 1 +
3 files
: Vaneet Narang
Signed-off-by: Maninder Singh
---
mm/slab.h| 1 +
mm/slab_common.c | 12 +++-
mm/slub.c| 7 +++
mm/util.c| 2 +-
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/mm/slab.h b/mm/slab.h
index c96bca9825d9..e360e3326232 100644
--- a/mm
l+0x0/0x58
[ 14.873372] 0xbe861de4
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
mm/slub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/slub.c b/mm/slub.c
index 1912c4614248..9d13f0117ae6 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4052,6 +4052,7 @@ void kmem_obj_i
Hi,
Any comments or updates?
>Sender : Maninder Singh Engineer/Platform S/W Group
>/SRI-Delhi/Samsung Electronics
>Date : 2021-02-25 13:57 (GMT+5:30)
>Title : [PATCH v2] arm: print alloc free paths for address in registers
>
>In case of "Use After Free" kernel O
ect+0xa4/0xdc
[ 124.378633] do_sendfile+0x1c4/0x3ec
[ 124.379220] sys_sendfile64+0x128/0x130
[ 124.379822] ret_fast_syscall+0x0/0x54
[ 124.380421] 0xbe9a2de4
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: do address sanity with virt_addr_
[ 124.378633] do_sendfile+0x1c4/0x3ec
[ 124.379220] sys_sendfile64+0x128/0x130
[ 124.379822] ret_fast_syscall+0x0/0x54
[ 124.380421] 0xbe9a2de4
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm/include/asm/bug.h | 1 +
arch/arm/ker
Hi Mark, Will
On Thu, Jan 07, 2021 at 11:29:03AM +, Mark Rutland wrote:
>> On Fri, Dec 11, 2020 at 02:45:31PM +0530, Maninder Singh wrote:
>> > current code checks for sp bit flip in all exceptions,
>> > but only el1 exceptions requires this. el0 can not enter
>&
current code checks for sp bit flip in all exceptions,
but only el1 exceptions requires this. el0 can not enter
into stack overflow case directly.
it will improve performance for el0 exceptions and interrupts.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
arch/arm64/kernel
g
Signed-off-by: Maninder Singh
---
arch/arm/include/asm/assembler.h | 8
arch/arm/include/asm/irq.h | 6 ++
arch/arm/kernel/entry-armv.S | 41 +++-
arch/arm/kernel/irq.c| 24 +++
4 files changed, 78 i
self pointer to thread info is added in thread info.
It is base change required for IRQ stack on ARM.
both stacks will have pointer to thread_info at bottom.
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm/Kconfig | 10
the old task stack.
c_backtrace() is also modified on same logic, when traversing from last
IRQ frame, update fp with SVC mode fp.
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm/include/asm/irq.h | 7 +++
arch/arm/kernel
some
performance cost, so code is under CONFIG_IRQ_STACK.
and we don't have much knowledge and set up for CLANG
and ARM_UNWIND, so dependency added for both cases.
Tested patch set with QEMU for latest kernel
and 4.1 kernel for ARM target with same patch set.
Maninder Singh, Vaneet Narang (3):
Hi Mark,
>>If you are seeing issues with the current stack size, can you please
>>explain that in more detail? Where are you seeing problems? Which
>>configuration options do you have selected?
>>
We checked on our system with netflix and youtube 4K videos running
max stack consumption was 7 K
faults as earlier.
THREAD_SIZE masking in common files is changed to THREAD_SIZE_ALIGNED.
Co-developed-by: Vaneet narang
Signed-off-by: Vaneet narang
Signed-off-by: Maninder Singh
---
arch/arm64/Kconfig | 9 +
arch/arm64/include/asm/memory.h | 29
IRQ_STACK_SIZE can be made different from THREAD_SIZE,
and as IRQ_STACK_SIZE is used while irq stack allocation,
same define should be used while printing information of irq stack.
Signed-off-by: Maninder Singh
---
arch/arm64/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index bc07e19..d2c3858 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -60,7 +60,7
Add arguments support to print stacks which are greater than
argument value only.
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/scripts
[]: 492
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 28 +++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/scripts/checkstack.pl b/scripts
.
0xa00011f2720c0 sunxi_divs_clk_setup [vmlinux]: 464
...
0xa00011f26f840 sunxi_mux_clk_setup.isra.0 [vmlinux]:320
Co-developed-by: Vaneet Narang
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1: https://lkml.org/lkml/2020/4/30/530
v2: review comments by Masahiro Yamada
Hi Masahiro,
Thanks for review.
We will integrate your review comements and send v2.
>>
>> so making regex $re for ARM similar to aarch64
>>
>> Signed-off-by: Vaneet Narang
>> Signed-off-by: Maninder Singh
>
>
>This looks good to me, and it is a bug
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index b292ef4..e80de70 100755
--- a/scripts/checkstack.pl
+++ b/scripts/checkstack.pl
@@ -60,7 +60,7 @@ my (@stack, $re, $dre, $sub
Add arguments support to print stacks which are greater than
argument value only.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
.
0xa00011f2720c0 sunxi_divs_clk_setup [vmlinux]: 464
...
0xa00011f26f840 sunxi_mux_clk_setup.isra.0 [vmlinux]:320
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 52 +--
1 file changed, 25 insertions
Y []: 492
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
scripts/checkstack.pl | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
index 8e5ef98
'commit 3c710c1ad11b ("mm, vmscan:
extract shrink_page_list reclaim counters into a struct")'
changed data type for the function,
so changing return type for funciton and its caller.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: posit
'commit 3c710c1ad11b ("mm, vmscan:
extract shrink_page_list reclaim counters into a struct")'
changed data type for the function,
so changing return type for funciton and its caller.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: posit
t; enum vm_event_item item;
>> struct pglist_data *pgdat = lruvec_pgdat(lruvec);
>> struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat;
>> +unsigned int nr_reclaimed = 0;
>> bool stalled = false;
>>
>> while (unlikely(too_many_isolated(pgdat, file, sc))) {
Thanks,
Maninder Singh
'commit 3c710c1ad11b ("mm, vmscan:
extract shrink_page_list reclaim counters into a struct")'
changed data type for the function,
so changing return type for funciton and its caller.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
mm/internal.h | 2 +-
e24ddc01sub sp, sp, #256; 0x100
changed:
e92ddbf0push{r4, r5, r6, r7, r8, r9, fp, ip, lr, pc}
e24cb004sub fp, ip, #4
e24dd080sub sp, sp, #128; 0x80
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
lib/zstd/huf_compress.c | 4
[] (shrink_zone+0x53c/0x7c0)
(shrink_zone) from [] (try_to_free_pages+0x2fc/0x7cc)
(try_to_free_pages) from [] (__alloc_pages_nodemask+0x534/0x91c)
(__alloc_pages_nodemask) from [] (pagecache_get_page+0xe0/0x1d8)
Maninder Singh, Vaneet Narang (4):
zstd: pass pointer rathen than structure to
As params structure remains same for lifetime, just initialise it
at init time and make it global variable.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
crypto/zstd.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/crypto/zstd.c b/crypto/zstd.c
]! ; 0xffdc
...
e24dd0f4sub sp, sp, #244; 0xf4
:
e16d42f4strdr4, [sp, #-36]! ; 0xffdc
...
e24ddf45sub sp, sp, #276; 0x114
Tested on ARM.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
include
Hi,
>On Fri, Feb 01, 2019 at 07:03:26PM +0530, Maninder Singh wrote:
>> Hi,
>>
>>
>> There is some race condition between tty_port_put and flush_to_ldisc
>> which lead to use after free case:
>> (Kernel 4.1)
>>
>> [1403.5130] Unable
x98_install
tty_init_dev
ptmx_open
chrdev_open
do_dentry_open
vfs_open
do_last.isra.10
we already applied below patches:
https://lore.kernel.org/patchwork/patch/862594/
But seems it is different case.
Can you suggest any possible fix for this?
Thanks,
Maninder Singh
currently code provides end of stack by considering stack grows
downwards. Make it useful for architectures where stack grows upward.
Although CONFIG_THREAD_INFO_IN_TASK is selected only for
architectures where stack grows downward.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
Hi Petr,
> Hi all,
> After merging the printk tree, today's linux-next build (x86_64
> allnoconfig) produced this warning:
> kernel/printk/printk.c:2033:13: warning: 'suppress_message_printing' defined
> but not used [-Wunused-function]
> static bool suppress_message_printing(int level) { re
, the messages might
be handled after the consoles were silenced.
reused flag LOG_NOCONS as its usage is gone long back.
(5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb)
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: make changes simpler as suggested by Petr Mladek.
r not(console_print) by checking current console loglevel with
message's level at time of log.
At time of print check this flag for printing message on console.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
kernel/printk/printk.c | 33 +++--
1 file c
This patch removes unused flag LOG_NOCONS for printk.
usage of this flag is removed long back with below commit.
"5c2992ee7fd8a29d04125dc0aa3522784c5fa5eb"
printk: remove console flushing special cases for
partial buffered lines
Signed-off-by: Maninder Singh
Signed-off-by: Van
/27/357
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/um/kernel/dyn.lds.S | 2 ++
arch/um/kernel/uml.lds.S | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index d417e38..0fb2d3a 100644
--- a/arch/um/kernel/dyn.lds.S
me
>> memcpy 4918 MB/s 5108 MB/s 32768 100.00 data/data32k
>> lz4 1.8.0 276 MB/s 1045 MB/s 14492 44.23 data/data32k
>>
>> LZO1x with 32K data (Default Compressor for ZRAM):
>> sh-3.2# ./lzbench -elzo1x,1 data/data32k
>> lzbench 1.7.3 (32-bit Linux) Assembled by P.Skibinski
>> Compressor name Compress. Decompress. Compr. size Ratio Filename
>> memcpy 5273 MB/s 5320 MB/s 32768 100.00 data/data32k
>> lzo1x 2.09 -1 283 MB/s 465 MB/s 14292 43.62 data/data32k
Thanks,
Maninder Singh
re we declared 4 dummy variables
which we used in our patch.
Thanks ,
Maninder Singh
tension of LZ4 so there is no backward compatibility.
Consider this as a different algorithm adapted from LZ4 for better compression
ratio.
Thanks
Maninder Singh
Hi,
>> diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
>> index 4ed0a78..5bc5aab 100644
>> --- a/drivers/block/zram/zcomp.c
>> +++ b/drivers/block/zram/zcomp.c
>> @@ -17,11 +17,15 @@
>> #include
>>
>> #include "zcomp.h"
>> +#define KB(1 << 10)
>>
>> static cons
Hello Nick/Sergey,
Any suggestion or comments, so that we can change code and resend the patch?
> Hi Nick / Sergey,
>
>
> We have compared LZ4 Dyn with Original LZ4 using some samples of realtime
>application data(4Kb)
> compressed/decompressed by ZRAM. For comparison we have used lzbench
k, done.
Sending new patch with fixes.
Thanks.
Maninder Singh
cpuidle_enter_state+0x96/0x290
do_idle+0x163/0x1a0
After patch:-
__alloc_pages_nodemask+0xfc/0x220
page_frag_alloc+0x84/0x140
__napi_alloc_skb+0x83/0xe0
rtl8169_poll+0x1e5/0x670
net_rx_action+0x132/0x3a0
__do_softirq+0xce/0x298
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1
+0x96/0x290
do_idle+0x163/0x1a0
After patch:-
__alloc_pages_nodemask+0xfc/0x220
page_frag_alloc+0x84/0x140
__napi_alloc_skb+0x83/0xe0
rtl8169_poll+0x1e5/0x670
net_rx_action+0x132/0x3a0
__do_softirq+0xce/0x298
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1->v2: fix bu
CC: Vaneet Narang.
On (03/21/18 10:10), Maninder Singh wrote:
> diff --git a/lib/lz4/lz4_compress.c b/lib/lz4/lz4_compress.c
> index cc7b6d4..185c358 100644
> --- a/lib/lz4/lz4_compress.c
> +++ b/lib/lz4/lz4_compress.c
> @@ -183,7 +183,8 @@ static FORCE_INLINE int LZ4_c
-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
v1->v2: https://lkml.org/lkml/2017/10/24/378
(take care of IRQ taken in SVC mode)
arch/arm/kernel/stacktrace.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c
index a56e
347866
seconds elapsed18.621296174 18.354183020
seconds elapsed22.366502860 22.357632546
seconds elapsed24.362417439 24.363003009
Maninder Singh, Vaneet Narang (1):
lz4: Implement lz4 with dynamic offset (lz4_dyn).
crypto/lz4.c
mem_used_total: 17117184
LZ4
orig_data_size: 78917632
compr_data_size: 16310717
mem_used_total: 17592320
LZ4_DYN
===
orig_data_size: 78917632
compr_data_size: 15520506
mem_used_total: 16748544
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
crypto/lz4.c | 64
from (get_page_from_freelist)
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
mm/page_owner.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 8592543..46ab1c4 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
=be7635e7287e0e8013af3c89a6354a9e0182594c
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
include/linux/stacktrace.h | 25 +
mm/kasan/kasan.c | 22 --
mm/page_owner.c| 1 +
3 files changed, 26 insertions(+), 22 deletions
Hi Michal,
> On Wed 22-11-17 16:17:41, Maninder Singh wrote:
> > This patch provides interface to check all the stack enteries
> > saved in stackdepot so far as well as memory consumed by stackdepot.
> >
> > 1) Take current depot_index and offset to ca
ys/kernel/debug/depot_stack/depot_entries
stack count 1 backtrace
init_page_owner+0x1e/0x210
start_kernel+0x310/0x3cd
secondary_startup_64+0xa5/0xb0
0x
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
include/linux/stackdepot.h | 13 +++
include/linux/stacktrace.h
Hi Russell,
>On Tue, Oct 24, 2017 at 05:16:42PM +0530, Maninder Singh wrote:
>> This patch stops unwinding backtrace in case of below 2 cases.
>>
>> (Issue observed while porting stackdepot on ARM, duplicate
>> entries created in stackdepot
>> reference p
+0xf8/0x1e0
trace_init+0xe0/0x2cc
start_kernel+0x30c/0x448
0x400080a0
^^^
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
arch/arm/kernel/stacktrace.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel
__handle_domain_irq+0x9c/0x130
gic_handle_irq+0x40/0x80
__irq_usr+0x4c/0x60
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: use generic API to check whether address belongs to user space or not.
lib/stackdepot.c | 7 +++
1 file changed, 7 insertions(+)
d
__handle_domain_irq+0x9c/0x130
gic_handle_irq+0x40/0x80
__irq_usr+0x4c/0x60
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
lib/stackdepot.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index f87d138..bb35b2c 100644
--- a/lib
64 - -64
Total: Before=68, After=4, chg -94.12%
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2
1) Incorporated missed changes between 4.1 and latest version.
2) Removed extra noise of "#" after each section print.
3) Removed
up/down: 0/-64 (-64)
RO Data old new delta
arr 64 - -64
Total: Before=68, After=4, chg -94.12%
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
This patch do some minor changes to make code align to
kernel coding guidlines, and make it little easy to find
definations of these structs.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
include/linux/pid.h | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff
Error reported by static tool for copy paste
issue, fixing the same.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2a97dff..5d337ca 100644
--- a/fs
] Allocating function kernel_init+0x1c/0x20 [test_module]
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1->v2: made code generic rather than dependent on config.
changed pr_alert to pr_err.
include/linux/vmalloc.h | 2 ++
kernel/module.c |
101
[ 129.336376] Allocating function kernel_init+0x1c/0x20 [vmalloc]
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
include/linux/vmalloc.h | 2 ++
kernel/module.c | 28
mm/Kconfig.debug| 7 +++
mm/vmalloc.c| 2
igned-off-by: Maninder Singh
Signed-off-by: Amit Nagal
Reviewed-by: Ajeet Yadav
---
arch/arm/mm/fault.c | 18 +-
arch/arm64/mm/fault.c | 16
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 3a
space ASAN provides this support for read/write instrumentation
control.
Signed-off-by: Vaneet narang
Signed-off-by: Maninder Singh
Reviewed-by: Ajeet Yadav
---
v1 -> v2: Added Documentation for the same.
Documentation/dev-tools/kasan.rst | 16
lib/Kconfig.ka
space ASAN provides this support for read/write instrumentation
control.
Signed-off-by: Vaneet narang
Signed-off-by: Maninder Singh
Reviewed-by: Ajeet Yadav
---
lib/Kconfig.kasan | 16
scripts/Makefile.kasan | 4
2 files changed, 20 insertions(+)
diff --git a/lib
%s: pc=%08llx sp=%08llx\n",
and signal32 fiel changes are not required, because it meant only for 32 bit.
Thanks and Regards,
Maninder Singh
Issue caught with static analysis tool:
"Dangerous usage of 'name' (strncpy doesn't always 0-terminate it)"
Use strlcpy _includes_ the NUL terminator, and strlcat() which ensures
that it won't overflow the buffer.
Reported-by: Maninder Singh
Signed-off-by: V
#
With this patch
===
sh# insmod size.ko
...
sh# lsmod
Module Size Used by
size20972425 0
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
Reviewed-by: Ajeet Yadav
---
arch/arm/include/asm/memory.h | 4 ++--
arch/arm/kernel/module.c
This patch corrects format specifier for printing 64 bit addresses.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
arch/arm64/kernel/signal.c | 2 +-
arch/arm64/kvm/sys_regs.c | 8 ++--
arch/arm64/mm/fault.c | 15 ++-
arch/arm64/mm/mmu.c| 4
This patch corrects format specifier for printing 64 bit addresses.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
arch/arm64/kernel/signal.c | 2 +-
arch/arm64/kvm/sys_regs.c | 8 ++--
arch/arm64/mm/fault.c | 15 ++-
arch/arm64/mm/mmu.c| 4
Issue caught with static analysis tool:
"Dangerous usage of 'name' (strncpy doesn't always 0-terminate it)"
Use strlcpy _includes_ the NUL terminator, and strlcat() which ensures
that it won't overflow the buffer.
Reported-by: Maninder Singh
Signed-off-by
terminate it)"
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
v1 -> v2: changed strncpy to strlcpy
arch/arm/mach-omap2/omap_hwmod.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwm
terminate it)"
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm/mach-omap2/omap_hwmod.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 759e1d4..8adf272 1
for user space fault.
Signed-off-by: Vaneet Narang
Signed-off-by: Maninder Singh
---
arch/arm64/mm/fault.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index a78a5c4..8cb5c93 100644
--- a/arch/arm64/mm/fault.c
Currently we are printing file name wrongly.
pos->file ? (char *) pos->file : "")
It should be pos->file->name, and secondly if we got NULL
file struture,we will anyway derefer it in last printf.
So, Fixing the same.
caught with static analysis tool.
Signed-off-by: Maninde
This patch fixes NULL pointer dereference when pos->file is NULL.
caught with static analysis tool.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
scripts/dtc/srcpos.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/dtc/srcpos.c b/scripts/
This patch fixes the following checkpatch.pl error:
ERROR: Macros with complex values should be enclosed in parentheses
Signed-off-by: Maninder Singh
---
drivers/staging/media/st-cec/stih-cec.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/st
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.
Signed-off-by: Maninder Singh
---
drivers/staging/xgifb/XGI_main_26.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_
Currently mmap_failed variable is 1 for every case, so make it 0
if mmap is success.
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
scripts/sortextable.c |1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index 30b4e7c..0b6a31b
Signed-off-by: Maninder Singh
Signed-off-by: Vaneet Narang
---
scripts/sortextable.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index f453b7c..30b4e7c 100644
--- a/scripts/sortextable.c
+++ b/scripts
This patch fixes below compilation warning:-
drivers/extcon/extcon.c: In function extcon_register_notifier:
drivers/extcon/extcon.c:455:6: warning: idx may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (idx >= 0) {
Signed-off-by: Vaneet Narang
Signed-off-by: Manin
Signed-off-by: Vaneet Narang
Signed-off-by: Amit Nagal
Signed-off-by: Maninder Singh
---
net/packet/af_packet.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 992396a..e6047e6 100644
--- a/net/packet/
Hi Daniel,
>The other sock_put() in packet_release() to drop the final ref and call into
>sk_free(), which drops the 1 ref on the sk_wmem_alloc from init time. Since you
>got into __sk_free() via sock_wfree() destructor, your socket must have invoked
>packet_release() prior to this (perhaps kernel
>> chandef is initialized with NULL and on the very next line,
>> we are using it to get channel, which is not correct.
>>
>> channel should be initialized after obtaining chandef.
>>
>> Signed-off-by: Maninder Singh
>How did you find this bug?
Static an
Hi Dan,
>I hate these patches. I have told Markus to stop sending them but he
>has issues so now I only complain when they introduce a bug. There was
>one bug I have missed because it was a benchmark regression and I knew
>it was theoretically possible but I didn't know the code well enough to
>
chandef is initialized with NULL and on the very next line,
we are using it to get channel, which is not correct.
channel should be initialized after obtaining chandef.
Signed-off-by: Maninder Singh
---
drivers/net/wireless/ath/ath10k/mac.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
dev_kfree_skb checks for NULL pointer itself,
Thus no need of explicit NULL check.
Signed-off-by: Maninder Singh
---
drivers/staging/vt6655/device_main.c |8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c
b/drivers/staging/vt6655
lot more easier.
Signed-off-by: Rohit Thapliyal
Signed-off-by: Maninder Singh
Reviewed-by: Catalin Marinas
---
v1: added new function dump_mem64
v2: remove seprate function, modified dump_mem
v3: Changelog modified
v4: Used compat_user_mode() for setting width to 4 or 8
v5: changed variable wide
Currently pdd is validate after dereferencing it, which is
not correct, Thus validate pdd before its first use.
Signed-off-by: Maninder Singh
---
v1: remove validation of pdd after its usage
v2: do validation at first place rather than removing
drivers/gpu/drm/amd/amdkfd/kfd_process.c |9
lot more easier.
Signed-off-by: Rohit Thapliyal
Signed-off-by: Maninder Singh
---
v1: added new function dump_mem64
v2: remove seprate function, modified dump_mem
v3: Changelog modified
v4: Used compat_user_mode() for setting width to 4 or 8
arch/arm64/kernel/traps.c | 31
ULL this check is not required.
Signed-off-by: Maninder Singh
---
drivers/rtc/rtc-bq32k.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-bq32k.c b/drivers/rtc/rtc-bq32k.c
index 92679df..409de9f 100644
--- a/drivers/rtc/rtc-bq32k.c
+++ b/drivers/rtc/rtc-bq32
Hello,
>> +for (i = 0; i < dev->caps.num_ports; i++)
>> +kfree(dm[i]);
>> goto out;
>> }
>> }
>> --
>> 1.7.9.5
>>
>
>If you are going to change this, you might as well make it 100% correct:
>
>i—-;
>while (i >=
1 - 100 of 185 matches
Mail list logo