RE: [PATCH 2/2] arm64: print alloc free paths for address in registers

2021-03-24 Thread Maninder Singh
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

[PATCH 2/2] arm64: print alloc free paths for address in registers

2021-03-24 Thread 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

[PATCH 1/2] arm64/process.c: fix Wmissing-prototypes build warnings

2021-03-24 Thread Maninder Singh
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

[PATCH 1/1] arm64: print alloc free paths for address in registers

2021-03-19 Thread 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

[PATCH 3/3] arm: print alloc free paths for address in registers

2021-03-16 Thread Maninder Singh
[ 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

[PATCH 2/3] mm/slub: Add Support for free path information of an object.

2021-03-16 Thread Maninder Singh
: 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

[PATCH 1/3] mm/slub: fixing backtrace of objects because of redzone adjustment

2021-03-16 Thread Maninder Singh
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

RE: [PATCH v2] arm: print alloc free paths for address in registers

2021-03-09 Thread Maninder Singh
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

[PATCH v2] arm: print alloc free paths for address in registers

2021-02-25 Thread Maninder Singh
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_

[PATCH 1/1] arm: print alloc free paths for address in registers

2021-02-24 Thread Maninder Singh
[ 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

RE: [PATCH 1/1] arm64/entry.S: check for stack overflow in el1 case only

2021-01-20 Thread Maninder Singh
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 >&

[PATCH 1/1] arm64/entry.S: check for stack overflow in el1 case only

2020-12-11 Thread Maninder Singh
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

[PATCH 2/3] arm: introduce IRQ stacks

2020-10-08 Thread Maninder Singh
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

[PATCH 1/3] arm: introduce self pointer in thread info

2020-10-08 Thread Maninder Singh
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

[PATCH 3/3] arm: Modify stack trace and dump for use with irq stack

2020-10-08 Thread Maninder Singh
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

[PATCH 0/3] IRQ stack support for ARM

2020-10-08 Thread Maninder Singh
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):

RE: [PATCH 1/1] arm64: add support for PAGE_SIZE aligned kernel stack

2020-08-07 Thread Maninder Singh
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

[PATCH 1/1] arm64: add support for PAGE_SIZE aligned kernel stack

2020-08-03 Thread Maninder Singh
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

[PATCH 1/1] arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack

2020-07-31 Thread Maninder Singh
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

[PATCH v2 4/4] scripts/checkstack.pl: fix arm sp regex

2020-05-08 Thread Maninder Singh
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

[PATCH v2 2/4] scripts/checkstack.pl: Add argument to print stacks greather than value.

2020-05-08 Thread Maninder Singh
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

[PATCH v2 3/4] scripts/checkstack.pl: add arm push handling for stack usage

2020-05-08 Thread Maninder Singh
[]: 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

[PATCH v2 1/4] scripts/checkstack.pl: don't display $dre as different entity

2020-05-08 Thread Maninder Singh
. 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

RE:[PATCH 4/4] scripts/checkstack.pl: fix arm sp regex

2020-05-07 Thread Maninder Singh
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

[PATCH 4/4] scripts/checkstack.pl: fix arm sp regex

2020-04-30 Thread Maninder Singh
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

[PATCH 2/4] scripts/checkstack.pl: Add argument to print stacks greather than value.

2020-04-30 Thread Maninder Singh
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

[PATCH 1/4] scripts/checkstack.pl: don't display $dre as different entity

2020-04-30 Thread Maninder Singh
. 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

[PATCH 3/4] scripts/checkstack.pl: add arm push handling for stack usage

2020-04-30 Thread Maninder Singh
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

[PATCH v3] mm/vmscan.c: change prototype for shrink_page_list

2020-04-29 Thread 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 --- v1 -> v2: posit

[PATCH v2] mm/vmscan.c: change prototype for shrink_page_list

2020-04-29 Thread 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 --- v1 -> v2: posit

RE:[PATCH 1/1] mm/vmscan.c: change prototype for shrink_page_list

2020-04-29 Thread Maninder Singh
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

[PATCH 1/1] mm/vmscan.c: change prototype for shrink_page_list

2020-04-28 Thread 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 +-

[PATCH 2/4] zstd: use U16 data type for rankPos

2019-06-03 Thread Maninder Singh
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

[PATCH 0/4] zstd: reduce stack usage

2019-06-03 Thread Maninder Singh
[] (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

[PATCH 3/4] zstd: move params structure to global variable to reduce stack usage

2019-06-03 Thread Maninder Singh
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

[PATCH 1/1] splice: Reduce stack usage by reducing structure partial_page

2019-05-31 Thread Maninder Singh
]! ; 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

RE: race between flush_to_ldisc and pty_cleanup

2019-02-01 Thread Maninder Singh
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

race between flush_to_ldisc and pty_cleanup

2019-02-01 Thread Maninder Singh
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

[PATCH 1/1] task_stack: make code generic for getting end of stack.

2018-12-19 Thread 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

RE: linux-next: build warning after merge of the printk tree

2018-07-10 Thread Maninder Singh
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

[PATCH v2] printk: make sure to print log on console.

2018-06-01 Thread Maninder Singh
, 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.

[PATCH 2/2] printk: make sure to print log on console.

2018-05-31 Thread Maninder Singh
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

[PATCH 1/2] printk: remove unused flag LOG_NOCONS

2018-05-31 Thread Maninder Singh
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

[PATCH 1/1] um: add IRQENTRY and SOFTIRQENTRY points.

2018-04-20 Thread Maninder Singh
/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

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-04-16 Thread Maninder Singh
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: [PATCH v3] mm/page_owner: ignore everything below the IRQ entry point

2018-04-16 Thread Maninder Singh
re we declared 4 dummy variables which we used in our patch. Thanks , Maninder Singh

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-04-01 Thread 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

Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-04-01 Thread 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

Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-03-29 Thread Maninder Singh
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 

Re: [PATCH v2] mm/page_owner: ignore everything below the IRQ entry point

2018-03-27 Thread Maninder Singh
k, done. Sending new patch with fixes. Thanks. Maninder Singh    

[PATCH v3] mm/page_owner: ignore everything below the IRQ entry point

2018-03-27 Thread 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

[PATCH v2] mm/page_owner: ignore everything below the IRQ entry point

2018-03-26 Thread Maninder Singh
+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

Re: [PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-03-21 Thread Maninder Singh
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

[PATCH v2] arm/stacktrace: stop unwinding after an invalid address.

2018-03-21 Thread Maninder Singh
-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

[PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.

2018-03-20 Thread Maninder Singh
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

[PATCH 1/1] lz4: Implement lz4 with dynamic offset length.

2018-03-20 Thread Maninder Singh
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

[PATCH 1/1] mm/page_owner: fix recursion bug after changing skip entries

2018-03-20 Thread Maninder Singh
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

[PATCH 1/1] mm/page_owner: ignore everything below the IRQ entry point

2017-12-03 Thread Maninder Singh
=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

Re: [PATCH 1/1] stackdepot: interface to check entries and size of stackdepot.

2017-11-24 Thread Maninder Singh
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

[PATCH 1/1] stackdepot: interface to check entries and size of stackdepot.

2017-11-22 Thread Maninder Singh
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

Re: [PATCH 1/1] arm/stacktrace: stop unwinding after an invalid address.

2017-11-15 Thread Maninder Singh
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

[PATCH 1/1] arm/stacktrace: stop unwinding after an invalid address.

2017-10-24 Thread Maninder Singh
+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

[PATCH v2] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-11 Thread Maninder Singh
__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

[PATCH 1/1] stackdepot: ignore junk last entry in case of switch from user mode.

2017-10-11 Thread Maninder Singh
__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

[PATCH v2] bloat-o-meter: provide 3 different arguments for data, function and all

2017-09-27 Thread Maninder Singh
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

[PATCH 1/1] bloat-o-meter: provide 3 different arguments for data, function and All

2017-09-25 Thread Maninder Singh
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 ---

[PATCH 1/1] pid: making some changes as per kernel coding guidlines

2017-07-25 Thread 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

[PATCH 1/1] ext4: correcting copy paste error.

2017-07-16 Thread Maninder Singh
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

[PATCH v2] module: check if memory leak by module.

2017-03-28 Thread Maninder Singh
] 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 |

[PATCH 1/1] module: check if memory leak by module.

2017-03-24 Thread Maninder Singh
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

[PATCH 1/1] mm: call force_sig_info before prints

2016-12-19 Thread Maninder Singh
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

[PATCH v2] kasan: Support for r/w instrumentation control

2016-12-12 Thread Maninder Singh
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

[PATCH 1/1] kasan: Support for r/w instrumentation control

2016-12-12 Thread Maninder Singh
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

RE: Re: [PATCH 1/2] arm64: Correcting format specifier for printin 64 bit addresses

2016-12-08 Thread Maninder Singh
%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

[PATCH v3] mach-omap2: fixing wrong strcat for Non-NULL terminated string

2016-12-07 Thread 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

[PATCH 1/1] arm/module: maximum utilization of module area.

2016-12-06 Thread Maninder Singh
# 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

[PATCH 1/1] arm64: Correcting format specifier for printing 64 bit addresses

2016-12-05 Thread Maninder Singh
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

[PATCH 1/1] arm64: Correcting format specifier for printing 64 bit addresses

2016-12-05 Thread Maninder Singh
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

[PATCH v3] mach-omap2: fixing wrong strcat for Non-NULL terminated string

2016-12-04 Thread 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

[PATCH v2] mach-omap2: fixing wrong strcat for Non-NULL terminated string

2016-12-01 Thread Maninder Singh
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

[PATCH 1/1] mach-omap2: fixing wrong strcat for Non-NULL terminated string

2016-11-30 Thread Maninder Singh
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

[PATCH 1/2] arm64: Correcting format specifier for printin 64 bit addresses

2016-11-30 Thread Maninder Singh
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

[PATCH v2] scripts: printing file name correctly

2016-11-29 Thread Maninder Singh
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

[PATCH 1/1] scripts: Fixing NULL pointer dereference when pos->file is NULL

2016-11-29 Thread Maninder Singh
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/

[PATCH] staging: st-cec: add parentheses around complex macros

2016-11-04 Thread Maninder Singh
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

[PATCH] Staging: xgifb: Fix NULL pointer comparison warning

2016-10-20 Thread Maninder Singh
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_

[PATCH 2/2] scripts/sortextable: set the variable mmap_failure

2016-08-10 Thread Maninder Singh
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

[PATCH 1/2] scripts/sortextable: make close happens only if file is opened

2016-08-10 Thread Maninder Singh
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

[PATCH 1/1] extcon: fixing compile time warning

2016-08-01 Thread Maninder Singh
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

[PATCH 1/1] af_packet: Raw socket destruction warning fix

2016-02-10 Thread Maninder Singh
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/

Re: [PATCH] af_packet: Raw socket destruction warning fix

2016-01-21 Thread Maninder Singh
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

Re: [PATCH 1/1] ath10k: fixing wrong initialization of struct channel

2015-07-21 Thread Maninder Singh
>> 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

Re: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb

2015-07-16 Thread Maninder Singh
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 >

[PATCH 1/1] ath10k: fixing wrong initialization of struct channel

2015-07-15 Thread Maninder Singh
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

[RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb

2015-07-14 Thread Maninder Singh
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

[PATCH v5] arm64:Modify the dump mem for 64 bit addresses

2015-07-10 Thread Maninder Singh
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

[PATCH v2] drm/amdkfd: validate pdd where it acquired first

2015-07-09 Thread Maninder Singh
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

[PATCH v4] arm64:Modify the dump mem for 64 bit addresses

2015-07-08 Thread Maninder Singh
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

[PATCH 1/1] drivers/rtc/rtc-bq32k.c: remove redundant check

2015-07-07 Thread Maninder Singh
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

Re: [PATCH 1/1] infiniband: Remove redundant NULL check before kfree

2015-07-07 Thread Maninder Singh
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   2   >