Re: [PATCH v3] tcp: verify the checksum of the first data segment in a new connection

2018-06-12 Thread Balbir Singh
(sk->sk_state != TCP_LISTEN)) { > inet_csk_reqsk_queue_drop_and_put(sk, req); > goto lookup; I've tested the IPv4 variant with some changes Tested-by: Balbir Singh Reviewed-by: Balbir Singh Balbir

Re: [PATCH v2] tcp: verify the checksum of the first data segment in a new connection

2018-06-12 Thread Balbir Singh
b))) { > + reqsk_put(req); > + goto csum_error; > + } I like this variant, it is not under the sock_lock, but it skips tcp_filter() as Frank pointed out. I tested a variant of this patch with an increment of MIB/CSUM errors and jump to discard_and_relse and it seemed to pass my testing Balbir Singh.

Re: [PATCH net-next 9/9] taskstats: use the libnl API to align nlattr on 64-bit

2016-04-27 Thread Balbir Singh
On 27/04/16 17:29, Nicolas Dichtel wrote: > Le 27/04/2016 03:14, Balbir Singh a écrit : >> >> >> On 23/04/16 01:31, Nicolas Dichtel wrote: >>> Goal of this patch is to use the new libnl API to align netlink attribute >>> when needed. >>> The layou

Re: [PATCH net-next 9/9] taskstats: use the libnl API to align nlattr on 64-bit

2016-04-26 Thread Balbir Singh
> attribute instead of before it. > > Signed-off-by: Nicolas Dichtel <nicolas.dich...@6wind.com> The layout will change/break user space -- I've not tested the patch though.. Balbir Singh.

[RFC][PATCH -mm] Add genetlink utilities for payload length calculation

2006-09-11 Thread Balbir Singh
Add two utility helper functions genlmsg_msg_size() and genlmsg_total_size(). These functions are derived from their netlink counterparts. Signed-off-by: Balbir Singh [EMAIL PROTECTED] --- include/net/genetlink.h | 18 ++ 1 files changed, 18 insertions(+) diff -puN include

[RFC][PATCH -mm] Fix getdelays.c - cpumask length and error reporting.

2006-09-11 Thread Balbir Singh
-by: Balbir Singh [EMAIL PROTECTED] --- Documentation/accounting/getdelays.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff -puN Documentation/accounting/getdelays.c~taskstats-fix-delayacct-utility Documentation/accounting/getdelays.c --- linux-2.6.18-rc6/Documentation

[RFC][PATCH -mm] Fix taskstats size calculation (use the new genetlink utility functions)

2006-09-11 Thread Balbir Singh
bytes. Signed-off-by: Balbir Singh [EMAIL PROTECTED] --- kernel/taskstats.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/taskstats.c~taskstats-fix-msg-size kernel/taskstats.c --- linux-2.6.18-rc6/kernel/taskstats.c~taskstats-fix-msg-size 2006-09-11 11:42

Re: [Patch 5/8] generic netlink interface for delay accounting

2006-03-29 Thread Balbir Singh
+ +++ linux-2.6.16/kernel/taskstats.c 2006-03-29 18:13:18.0 -0500 @@ -0,0 +1,292 @@ +/* + * taskstats.c - Export per-task statistics to userland + * + * Copyright (C) Shailabh Nagar, IBM Corp. 2006 + * (C) Balbir Singh, IBM Corp. 2006 + * + * This program

Re: [Patch 5/8] generic netlink interface for delay accounting

2006-03-29 Thread Balbir Singh
On Wed, Mar 29, 2006 at 10:26:29PM -0800, Andrew Morton wrote: Balbir Singh [EMAIL PROTECTED] wrote: The kmem_cache_free() can happen outside the lock. kmem_cache_free() and setting to NULL outside the lock is prone to race conditions. Consider the following scenario A thread

Re: dcache leak in 2.6.16-git8 II

2006-03-29 Thread Balbir Singh
On Thu, Mar 30, 2006 at 12:53:24AM +0200, Andi Kleen wrote: On Thursday 30 March 2006 00:50, Andrew Morton wrote: It looks that way. Didn't someone else report a sock_inode_cache leak? Didn't see it. I still got a copy of the /proc in case anybody wants more information. We

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-26 Thread Balbir Singh
On Sun, Mar 26, 2006 at 09:05:18AM -0500, jamal wrote: On Sat, 2006-25-03 at 23:52 +0530, Balbir Singh wrote: No, we cannot have both passed. If we pass both a PID and a TGID and then the code returns just the stats for the PID. ok, that clears it then; i think you are ready to go

Re: [Patch 8/9] generic netlink utility functions

2006-03-26 Thread Balbir Singh
On Mon, Mar 13, 2006 at 07:55:05PM -0500, Shailabh Nagar wrote: genetlink-utils.patch Two utilities for simplifying usage of NETLINK_GENERIC interface. Signed-off-by: Balbir Singh [EMAIL PROTECTED] Signed-off-by: Shailabh Nagar [EMAIL PROTECTED] include/net/genetlink.h | 20

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On Fri, Mar 24, 2006 at 08:19:25PM -0500, jamal wrote: On Fri, 2006-24-03 at 20:24 +0530, Balbir Singh wrote: Hmm... Would it be ok to send one message with the following format 1. TLV=TASKSTATS_TYPE_PID 2. TLV=TASKSTATS_TYPE_STATS 3. TLV=TASKSTATS_TYPE_TGID 4. TLV

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On Sat, Mar 25, 2006 at 07:52:13AM -0500, jamal wrote: On Sat, 2006-25-03 at 15:11 +0530, Balbir Singh wrote: Thanks for the advice, I will dive into nesting. I could not find any in tree users who use nesting, so I have a few questions Hrm - I have to say i am suprised theres

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-25 Thread Balbir Singh
On 3/25/06, jamal [EMAIL PROTECTED] wrote: On Sat, 2006-25-03 at 21:06 +0530, Balbir Singh wrote: On Sat, Mar 25, 2006 at 07:52:13AM -0500, jamal wrote: I didnt pay attention to failure paths etc; i suppose your testing should catch those. Getting there, a couple more comments: Yes, I

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread Balbir Singh
On Fri, Mar 24, 2006 at 09:04:21AM -0500, jamal wrote: On Thu, 2006-23-03 at 21:11 +0530, Balbir Singh wrote: On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: Should there be at least either a pid or tgid? If yes, you need to validate here... Yes, you are correct. One

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-24 Thread Balbir Singh
On Fri, Mar 24, 2006 at 09:11:58AM -0500, jamal wrote: On Fri, 2006-24-03 at 07:02 +0530, Balbir Singh wrote: On Thu, Mar 23, 2006 at 09:04:46AM -0500, jamal wrote: 3. nlmsg_new() now allocates for 2*u32 + sizeof(taskstats) Not the right size; the u32 covers the V part of TLV. The T = 16

Re: [RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-23 Thread Balbir Singh
-by: Balbir Singh [EMAIL PROTECTED] --- include/linux/delayacct.h | 11 + include/linux/taskstats.h | 111 init/Kconfig | 16 ++ kernel/Makefile |1 kernel/delayacct.c| 44 +++ kernel/taskstats.c| 255

[RFC][UPDATED PATCH 2.6.16] [Patch 9/9] Generic netlink interface for delay accounting

2006-03-21 Thread Balbir Singh
to facilitate reuse. If reuse is not deemed useful enough, the naming, placement of functions and config options will be modified to make this an interface for delay accounting alone. Signed-off-by: Shailabh Nagar [EMAIL PROTECTED] Signed-off-by: Balbir Singh [EMAIL PROTECTED] --- include/linux

Re: [UPDATED PATCH] Re: [Lse-tech] Re: [Patch 7/7] Generic netlink interface (delay accounting)

2006-03-10 Thread Balbir Singh
On Fri, Mar 10, 2006 at 09:53:53AM -0500, jamal wrote: On Thu, 2006-09-03 at 20:07 +0530, Balbir Singh wrote: Please let us know if we missed something out. Design still shaky IMO - now that i think i may understand what your end goal is. Using the principles i described in earlier email

[UPDATED PATCH] Re: [Lse-tech] Re: [Patch 7/7] Generic netlink interface (delay accounting)

2006-03-09 Thread Balbir Singh
, multicast only events generated due to task exit. 4. The taskstats and taskstats_reply structures are now 64 bit aligned. 5. Family id is dynamically generated. Please let us know if we missed something out. Thanks, Balbir Signed-off-by: Shailabh Nagar [EMAIL PROTECTED] Signed-off-by: Balbir Singh