Re: KASAN: use-after-free Read in rds_tcp_dev_event

2017-11-13 Thread Sowmini Varadhan
On (11/13/17 19:30), Girish Moodalbail wrote: > (L538-540). However, it leaves behind some of the rds_tcp connections that > shared the same underlying RDS connection (L534 and 535). These connections > with pointer to stale network namespace are left behind in the global list. It leaves behind no

[PATCH] crypto/pkcs7_verify: Fix unaligned access in pkcs7_verify()

2015-10-13 Thread Sowmini Varadhan
needs to make sure that desc is pointing at an aligned value past the digest_size, and kzalloc appropriately, taking alignment values into consideration. Signed-off-by: Sowmini Varadhan --- crypto/asymmetric_keys/pkcs7_verify.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff

Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64 from linux/types.h

2015-10-15 Thread Sowmini Varadhan
On (10/15/15 07:56), Mikko Rapeli wrote: > Date: Thu, 15 Oct 2015 07:56:01 +0200 > From: Mikko Rapeli > To: linux-kernel@vger.kernel.org > Cc: mikko.rap...@iki.fi, "David S. Miller" , Sowmini > Varadhan , linux-...@vger.kernel.org > Subject: [PATCH v4 23/79] rds.h: u

Re: [PATCH v4 38/79] include/uapi/linux/rds.h: include linux/socket.h and linux/types.h

2015-10-15 Thread Sowmini Varadhan
On (10/15/15 07:56), Mikko Rapeli wrote: > Fixes userspace compilation errors like: > > error: unknown type name ‘__be32’ > error: field ‘dest_addr’ has incomplete type >struct sockaddr_storage dest_addr; Acked-by: Sowmini Varadhan -- To unsubscribe from this list

Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64 from linux/types.h

2015-10-15 Thread Sowmini Varadhan
On (10/16/15 01:00), Mikko Rapeli wrote: > > What kind of portability should exported userspace headers from Linux kernel > need? > > Reviews to my previous changes NACKed usage and > Documentation/CodingStyle chapter 5 says: > > (e) Types safe for use in userspace. > > In certain struct

Re: [PATCH v4 23/79] rds.h: use __u8, __u16, __s16, __u32 and __s64 from linux/types.h

2015-10-15 Thread Sowmini Varadhan
On (10/16/15 01:39), Mikko Rapeli wrote: > "uint32_t vs __u32" nail is: > https://lkml.org/lkml/2015/6/1/160 shrug. BTW, doesn't having the exported rds.h use __foo everywhere actually end up with the result that "the kernel use the same names as user space" --Sowmini -- To unsubscribe from this

Re: [PATCH net-next] RDS: fix rds-ping deadlock over TCP transport

2015-10-16 Thread Sowmini Varadhan
explaining that the pong has already been added to the sendq earlier.. in the case of IB, if RDS_LL_SEND_FULL has been set, it takes some head-scratching to figure out how the pong gets sent, and a few comments could help clarify that. but other than that, the contents look good to me, thus

Re: [PATCH v2 net-next] RDS: fix rds-ping deadlock over TCP transport

2015-10-17 Thread Sowmini Varadhan
transport like IB. Acked-by: Sowmini Varadhan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH net-next 2/2] xfrm: Fix unaligned access in xfrm_notify_sa() for DELSA

2015-10-21 Thread Sowmini Varadhan
On (10/21/15 08:57), Steffen Klassert wrote: > > --- a/net/xfrm/xfrm_user.c > > +++ b/net/xfrm/xfrm_user.c > > @@ -2659,7 +2659,7 @@ static int xfrm_notify_sa(struct xfrm_state *x, const > > struct km_event *c) > > if (attr == NULL) > > goto out_free_skb; > > > >

Re: [PATCH net-next 2/2] xfrm: Fix unaligned access in xfrm_notify_sa() for DELSA

2015-10-21 Thread Sowmini Varadhan
On (10/21/15 06:54), Sowmini Varadhan wrote: > But __alignof__(*p) is 8 on sparc, and without the patch I get > all types of unaligned access. So what do you suggest as the fix? Even though the alignment is, in fact, 8 (and that comes from struct xfrm_lifetime_cfg), if uspace is firmly at

Re: [PATCH net-next 2/2] xfrm: Fix unaligned access in xfrm_notify_sa() for DELSA

2015-10-21 Thread Sowmini Varadhan
On (10/21/15 06:22), David Miller wrote: > memcpy() _never_ works for avoiding unaligned accessed. > > I repeat, no matter what you do, no matter what kinds of casts or > fancy typing you use, memcpy() _never_ works for this purpose. : > There is one and only one portable way to access unaligned

[PATCH v2 net-next] xfrm: Fix unaligned access to stats in copy_to_user_state()

2015-10-21 Thread Sowmini Varadhan
d, and this cannot be changed for nla_data() that is passed up to userspace. As a result, the put_unaligned() macro needs to be used to set up potentially unaligned fields such as the xfrm_stats in copy_to_user_state() Signed-off-by: Sowmini Varadhan --- v2: review comment from thread: cann

Re: [PATCH] iommu-common: fix return type of iommu_tbl_range_alloc()

2015-10-21 Thread Sowmini Varadhan
On (10/21/15 21:12), Geert Uytterhoeven wrote: > > Does this function really need to return DMA_ERROR_CODE in case of > failure? fwiw, this came up very early in code review: http://marc.info/?l=linux-sparc&m=142613044704833&w=2 --Sowmini -- To unsubscribe from this list: send the line "unsub

[PATCH net-next] RDS: rds_conn_lookup() should factor in the struct net for a match

2015-09-03 Thread Sowmini Varadhan
Only return a conn if the rds_conn_net(conn) matches the struct net passed to rds_conn_lookup(). Fixes: 467fa15356ac ("RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.") Signed-off-by: Sowmini Varadhan --- net/rds/connection.c |9 + 1 files

[PATCH 1/2] crypto/x509: Fix unaligned access in x509_get_sig_params()

2015-10-19 Thread Sowmini Varadhan
alignment values into consideration when doing kzalloc() Signed-off-by: Sowmini Varadhan --- crypto/asymmetric_keys/x509_public_key.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c ind

[PATCH 0/2] xfrm/crypto: unaligned access fixes

2015-10-19 Thread Sowmini Varadhan
A two-part patchset that fixes some "unaligned access" warnings that showed up my sparc test machines with ipsec set up. Sowmini Varadhan (2): crypto/x509: Fix unaligned access in x509_get_sig_params() Fix unaligned access in xfrm_notify_sa() for DELSA crypto/asymm

[PATCH net-next 2/2] xfrm: Fix unaligned access in xfrm_notify_sa() for DELSA

2015-10-19 Thread Sowmini Varadhan
On sparc, deleting established SAs (e.g., by restarting ipsec at the peer) results in unaligned access messages via xfrm_del_sa -> km_state_notify -> xfrm_send_state_notify(). Use an aligned pointer to xfrm_usersa_info for this case. Signed-off-by: Sowmini Varadhan --- net/xfrm/xfrm_

[PATCH net] RDS-TCP: Recover correctly from pskb_pull()/pksb_trim() failure in rds_tcp_data_recv

2015-10-26 Thread Sowmini Varadhan
same manner as the skb_clone failure: bail out of rds_tcp_data_recv(), and retry via the deferred call to rds_send_worker() that gets set up on ENOMEM from rds_tcp_read_sock() Signed-off-by: Sowmini Varadhan --- net/rds/tcp_recv.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions

Re: [PATCH] rds: send: Fix dead code in rds_sendmsg

2018-07-25 Thread Sowmini Varadhan
ot;Structurally dead code") > Fixes: 1e2b44e78eea ("rds: Enable RDS IPv6 support") > Signed-off-by: Gustavo A. R. Silva Acked-by: Sowmini Varadhan

Re: KASAN: use-after-free Read in rds_tcp_tune

2018-01-12 Thread Sowmini Varadhan
On (01/11/18 21:29), syzbot wrote: > == > BUG: KASAN: use-after-free in rds_tcp_tune+0x491/0x520 net/rds/tcp.c:397 > Read of size 4 at addr 8801cd5f6c58 by task kworker/u4:4/4954 Just had an offline discussion with santosh around

Re: [rds-devel] BUG: unable to handle kernel NULL pointer dereference in rds_send_xmit

2018-01-30 Thread Sowmini Varadhan
On (01/30/18 14:22), Eric Biggers wrote: > > I assume you weren't able to reproduce this? This crash hasn't been > seen again, : > I am invalidating the bug for syzbot so it will report the same crash > signature > again if it occurs, but if you think there is a real bug feel free to keep > loo

Re: [rds-devel] [PATCH][rds-next] rds: remove redundant variable 'sg_off'

2018-03-11 Thread Sowmini Varadhan
On (03/11/18 17:27), Colin King wrote: > Variable sg_off is assigned a value but it is never read, hence it is > redundant and can be removed. > Acked-by: Sowmini Varadhan

Re: [PATCH][rds-next] rds: make functions rds_info_from_znotifier and rds_message_zcopy_from_user static

2018-03-11 Thread Sowmini Varadhan
On (03/11/18 18:03), Colin King wrote: > From: Colin Ian King > > Functions rds_info_from_znotifier and rds_message_zcopy_from_user are > local to the source and do not need to be in global scope, so make them > static. the rds_message_zcopy_from_user warning was already flagged by kbuild-robot

Re: KASAN: use-after-free Read in inet_create

2018-04-08 Thread Sowmini Varadhan
#syz dup: KASAN: use-after-free Read in rds_cong_queue_updates There are a number of manifestations of this bug, basically all suggest that the connect/reconnect etc workqs are somehow being scheduled after the netns is deleted, despite the code refactoring in Commit 3db6e0d172c (and looks like

Re: [rds-devel] KASAN: null-ptr-deref Read in rds_ib_get_mr

2018-05-11 Thread Sowmini Varadhan
On (05/11/18 15:48), Yanjun Zhu wrote: > diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c > index e678699..2228b50 100644 > --- a/net/rds/ib_rdma.c > +++ b/net/rds/ib_rdma.c > @@ -539,11 +539,17 @@ void rds_ib_flush_mrs(void) >void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, >

[PATCH] ixgbe: Re-enable relaxed ordering as part of init/restart sequence for non-DCA config

2015-01-14 Thread Sowmini Varadhan
on platforms like SPARC. This patch eliminates the bottleneck for ixgbe when DCA is not configured. Signed-off-by: Sowmini Varadhan Cc: Emil Tantilov --- drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c |1 + drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 20 drivers

[PATCHv2] ixgbe: Re-enable relaxed ordering as part of init/restart sequence for non-DCA config

2015-01-14 Thread Sowmini Varadhan
on platforms like SPARC. This patch eliminates the bottleneck for ixgbe when DCA is not configured. Signed-off-by: Sowmini Varadhan Cc: Emil Tantilov --- v2: incoroporate comments from Emil Tantilov drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 23 +++ drivers/net

[PATCH 5/6] RDS: rds_send_xmit is called under a spinlock, lets not do a cond_resched()

2015-04-02 Thread Sowmini Varadhan
Original patch by Chris Mason Signed-off-by: Sowmini Varadhan --- net/rds/send.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index aec3f9d..23135a8 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -199,7 +199,6 @@ int

[PATCH 0/6] RDS: RDS core bug fixes

2015-04-02 Thread Sowmini Varadhan
This patch-series updates the RDS core and rds-tcp modules with some bug fixes that were originally authored by Andy Grover, Zach Brown, and Chris Mason. Sowmini Varadhan (6): RDS: Re-add pf/sol access via sysctl RDS: only use passive connections when addresses match rds: check for

[PATCH 3/6] rds: check for excessive looping in rds_send_xmit

2015-04-02 Thread Sowmini Varadhan
Original patch by Andy Grover Signed-off-by: Sowmini Varadhan --- net/rds/send.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index 44672be..b1741a2 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -140,6 +140,7 @@ int

[PATCH 4/6] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-02 Thread Sowmini Varadhan
e the xmit bit lock is acquired. If someone else has jumped in and made progress in the queue, we skip our goto restart. Original patch by Chris Mason. Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds/connection.c |1 + net/rds/rds.h|1 + net/rds/s

[PATCH 2/6] RDS: only use passive connections when addresses match

2015-04-02 Thread Sowmini Varadhan
uests and one passive connection created as the listening path sees the existing parent connection which initiated the request. Original patch by Zach Brown Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds/connection.c |2 +- 1 files changed, 1 insertions(

[PATCH 6/6] RDS: don't trust the LL_SEND_FULL bit

2015-04-02 Thread Sowmini Varadhan
We are seeing connections stuck with the LL_SEND_FULL bit getting set and never cleared. This changes RDS to stop trusting the LL_SEND_FULL bit and kick krdsd after any time we see -ENOMEM from the ring allocation code. Original patch by Chris Mason Signed-off-by: Sowmini Varadhan Reviewed-by

[PATCH 1/6] RDS: Re-add pf/sol access via sysctl

2015-04-02 Thread Sowmini Varadhan
Although RDS has an official PF_RDS value now, existing software expects to look for rds sysctls to determine it. We need to maintain these for now, for backwards compatibility. Original patch by Andy Grover Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds

[PATCHv2 3/6] rds: check for excessive looping in rds_send_xmit

2015-04-02 Thread Sowmini Varadhan
Original patch by Andy Grover Signed-off-by: Sowmini Varadhan --- net/rds/send.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index 44672be..b1741a2 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -140,6 +140,7 @@ int

[PATCHv2 0/6] RDS: RDS core bug fixes

2015-04-02 Thread Sowmini Varadhan
This patch-series updates the RDS core and rds-tcp modules with some bug fixes that were originally authored by Andy Grover, Zach Brown, and Chris Mason. v2: code review comment from Sergei Shtylyov Sowmini Varadhan (6): RDS: Re-add pf/sol access via sysctl RDS: only use passive

[PATCHv2 2/6] RDS: only use passive connections when addresses match

2015-04-02 Thread Sowmini Varadhan
uests and one passive connection created as the listening path sees the existing parent connection which initiated the request. Original patch by Zach Brown Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds/connection.c |2 +- 1 files changed, 1 insertions(

[PATCHv2 1/6] RDS: Re-add pf/sol access via sysctl

2015-04-02 Thread Sowmini Varadhan
Although RDS has an official PF_RDS value now, existing software expects to look for rds sysctls to determine it. We need to maintain these for now, for backwards compatibility. Original patch by Andy Grover Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds

[PATCHv2 5/6] RDS: rds_send_xmit is called under a spinlock, lets not do a cond_resched()

2015-04-02 Thread Sowmini Varadhan
Original patch by Chris Mason Signed-off-by: Sowmini Varadhan --- net/rds/send.c | 14 ++ 1 files changed, 2 insertions(+), 12 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index aec3f9d..23135a8 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -199,7 +199,6 @@ int

[PATCHv2 6/6] RDS: don't trust the LL_SEND_FULL bit

2015-04-02 Thread Sowmini Varadhan
We are seeing connections stuck with the LL_SEND_FULL bit getting set and never cleared. This changes RDS to stop trusting the LL_SEND_FULL bit and kick krdsd after any time we see -ENOMEM from the ring allocation code. Original patch by Chris Mason Signed-off-by: Sowmini Varadhan Reviewed-by

[PATCHv2 4/6] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-02 Thread Sowmini Varadhan
e the xmit bit lock is acquired. If someone else has jumped in and made progress in the queue, we skip our goto restart. Original patch by Chris Mason. Signed-off-by: Sowmini Varadhan Reviewed-by: Ajaykumar Hotchandani --- net/rds/connection.c |1 + net/rds/rds.h|1 + net/rds/s

[PATCH v3 0/3] RDS: RDS-core fixes

2015-04-04 Thread Sowmini Varadhan
fix is already made and this part of code not exercised anymore." Any such fixes, *if* they are needed, can/should be done in the IB specific RDS transport modules. - similarly dropped the LL_SEND_FULL patch (patch 6 in v2 set) Sowmini Varadhan (3): RDS: Re-add pf/sol access via sysctl

[PATCH v3 2/3] RDS: only use passive connections when addresses match

2015-04-04 Thread Sowmini Varadhan
uests and one passive connection created as the listening path sees the existing parent connection which initiated the request. Original patch by Zach Brown Signed-off-by: Sowmini Varadhan Cc: Ajaykumar Hotchandani --- net/rds/connection.c |2 +- 1 files changed, 1 insertions(+), 1 dele

[PATCH v3 1/3] RDS: Re-add pf/sol access via sysctl

2015-04-04 Thread Sowmini Varadhan
Although RDS has an official PF_RDS value now, existing software expects to look for rds sysctls to determine it. We need to maintain these for now, for backwards compatibility. Original patch by Andy Grover Signed-off-by: Sowmini Varadhan Cc: Ajaykumar Hotchandani --- net/rds/sysctl.c | 20

[PATCH v3 3/3] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-04 Thread Sowmini Varadhan
e the xmit bit lock is acquired. If someone else has jumped in and made progress in the queue, we skip our goto restart. Original patch by Chris Mason. Signed-off-by: Sowmini Varadhan Ajaykumar Hotchandani --- net/rds/connection.c |1 + net/rds/rds.h|1 + net/rds/send.c |

[PATCH v4 0/3] RDS: RDS-core fixes

2015-04-07 Thread Sowmini Varadhan
nces to "missing sysctl values for pf_rds and sol_rds in mainline". The sysctl values were never needed in mainline, thus fix the documentation. Sowmini Varadhan (3): Document AF_RDS, PF_RDS and SOL_RDS correctly. RDS: only use passive connections when addresses matc

[PATCH v4 2/3] RDS: only use passive connections when addresses match

2015-04-07 Thread Sowmini Varadhan
uests and one passive connection created as the listening path sees the existing parent connection which initiated the request. Original patch by Zach Brown Signed-off-by: Sowmini Varadhan Cc: Ajaykumar Hotchandani --- net/rds/connection.c |2 +- 1 files changed, 1 insertions(+), 1 dele

[PATCH v4 3/3] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-07 Thread Sowmini Varadhan
e the xmit bit lock is acquired. If someone else has jumped in and made progress in the queue, we skip our goto restart. Original patch by Chris Mason. Signed-off-by: Sowmini Varadhan Cc: Ajaykumar Hotchandani --- net/rds/connection.c |1 + net/rds/rds.h|1 + net/rds/s

[PATCH v4 1/3] Document AF_RDS, PF_RDS and SOL_RDS correctly.

2015-04-07 Thread Sowmini Varadhan
AF_RDS, PF_RDS and SOL_RDS are available in header files, and there is no need to get their values from /proc. Document this correctly. Fixes: 0c5f9b8830aa ("RDS: Documentation") Signed-off-by: Sowmini Varadhan --- v4: this change replaces the v3 modifications to sysctl.c Doc

Re: [PATCH v4 3/3] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-07 Thread Sowmini Varadhan
On (04/07/15 17:26), David Miller wrote: > > /* > > +* we record the send generation after doing the xmit acquire. > > +* if someone else manages to jump in and do some work, we'll use > > +* this to avoid a goto restart farther down. > > +* > > +* we don't need a lock becau

[PATCH v5 0/3] RDS: RDS-core fixes

2015-04-08 Thread Sowmini Varadhan
This patch-series updates the RDS core and rds-tcp modules with some bug fixes that were originally authored by Andy Grover, Zach Brown, and Chris Mason. v5: Clarify comment per http://www.spinics.net/lists/netdev/msg324220.html Sowmini Varadhan (3): Document AF_RDS, PF_RDS and SOL_RDS

[PATCH v5 1/3] Document AF_RDS, PF_RDS and SOL_RDS correctly.

2015-04-08 Thread Sowmini Varadhan
AF_RDS, PF_RDS and SOL_RDS are available in header files, and there is no need to get their values from /proc. Document this correctly. Fixes: 0c5f9b8830aa ("RDS: Documentation") Signed-off-by: Sowmini Varadhan --- v4: this change replaces the v3 modifications to sysctl.c Doc

[PATCH v5 3/3] RDS: make sure not to loop forever inside rds_send_xmit

2015-04-08 Thread Sowmini Varadhan
e the xmit bit lock is acquired. If someone else has jumped in and made progress in the queue, we skip our goto restart. Original patch by Chris Mason. Signed-off-by: Sowmini Varadhan --- v5: Modified comment per DaveM feedback net/rds/connection.c |1 + net/rds/rds.h|1 + ne

[PATCH v5 2/3] RDS: only use passive connections when addresses match

2015-04-08 Thread Sowmini Varadhan
uests and one passive connection created as the listening path sees the existing parent connection which initiated the request. Original patch by Zach Brown Signed-off-by: Sowmini Varadhan --- net/rds/connection.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ne

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-18 Thread Sowmini Varadhan
On (04/17/15 22:47), Guenter Roeck wrote: > #define DEFINE_PER_CPU_SECTION(type, name, sec) \ > __PCPU_DUMMY_ATTRS char __pcpu_scope_##name;\ > extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;\ > --> __PCPU_DUMMY_ATTRS char

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-18 Thread Sowmini Varadhan
On (04/17/15 22:47), Guenter Roeck wrote: > The problem is caused by commit f1600e549b94 ("sparc: Make sparc64 > use scalable lib/iommu-common.c functions"), which introduces > > static DEFINE_PER_CPU(unsigned int, iommu_pool_hash); I have to confess that I'm a little confused about what happene

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-18 Thread Sowmini Varadhan
commit 671d773297969bebb1732e1cdc1ec03aa53c6be2 Author: Sowmini Varadhan Date: Thu Mar 12 20:02:37 2015 -0400 commit f1600e549b948a32ad7672e069b2915314637ae3 Author: Sowmini Varadhan Date: Thu Mar 12 20:02:36 2015 -0400 commit 10b88a4b17d31a7409494b179dcb76e7ab2fcaea Author

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-18 Thread Sowmini Varadhan
On (04/18/15 15:40), David Miller wrote: > > Sowmini, I think I sorted this out in the 'sparc' GIT tree. > > Can you take a look? > checking it right now.. give me a few minutes.. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@v

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-18 Thread Sowmini Varadhan
> > Sowmini, I think I sorted this out in the 'sparc' GIT tree. > > Can you take a look? The patches look right now. These are the commit-ids I checked ff7d37a502022149655c18035b99a53391be0383 bb620c3d3925aec0ed4f21010c86df08ec18a8c7 0ae53ed15d9b87b883b593a9884957cfa4fc2480 --Sowmini --

Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-19 Thread Sowmini Varadhan
On (04/18/15 21:23), Guenter Roeck wrote: > > I spoke too early. Now I get a similar failure in the > powerpc:allmodconfig build > (which previously failed for a different reason). I think this duplicate symbol is genuine.. there's a definition in arch/powerpc/kernel/iommu.c. To avoid conflicting

[PATCH 0/2] iommu-common build warning fixes.

2015-04-19 Thread Sowmini Varadhan
This patchset has fixes for 2 architectures - Part 1: x86_64 warnings generated by sparse - Part 2: allmodconfig build error for powerpc, identified by Guenter Roeck. Sowmini Varadhan (2): fix x86_64 sparse warnings rename iommu_pool_hash to iommu_hash_common lib/iommu-common.c | 20

[PATCH 1/2] iommu-common: fix x86_64 compiler warnings

2015-04-19 Thread Sowmini Varadhan
Declare iommu_large_alloc as static. Remove extern definition for iommu_tbl_pool_init(). Signed-off-by: Sowmini Varadhan --- lib/iommu-common.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/iommu-common.c b/lib/iommu-common.c index a1a517c..a9a53f5

[PATCH 2/2] iommu-common: rename iommu_pool_hash to iommu_hash_common

2015-04-19 Thread Sowmini Varadhan
catching this, and helping to test the fix. Signed-off-by: Sowmini Varadhan --- lib/iommu-common.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/iommu-common.c b/lib/iommu-common.c index a9a53f5..df30632 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c

Fwd: Re: sparc64: Build failure due to commit f1600e549b94 (sparc: Make sparc64 use scalable lib/iommu-common.c functions)

2015-04-19 Thread Sowmini Varadhan
> On (04/19/15 14:09), David Miller wrote: > > > On (04/18/15 21:23), Guenter Roeck wrote: > >> lib/built-in.o:(.discard+0x1): multiple definition of > >> `__pcpu_unique_iommu_pool_hash' > >> arch/powerpc/kernel/built-in.o:(.discard+0x18): first defined here > >> .. I get a similar failure in the

[PATCH 0/3] net/rds: SOL_RDS socket option to explicitly select transport

2015-05-29 Thread Sowmini Varadhan
definitions needed by the application via . Patch 2 provides the setsockopt support, and Patch 3 provides the getsockopt support. Sowmini Varadhan (3): Declare SO_RDS_TRANSPORT and RDS_TRANS_* constants in uapi/linux/rds.h Add setsockopt support for SO_RDS_TRANSPORT Add setsockopt support for

[PATCH 3/3] net/rds Add getsockopt support for SO_RDS_TRANSPORT

2015-05-29 Thread Sowmini Varadhan
The currently attached transport for a PF_RDS socket may be obtained from user space by invoking getsockopt(2) using the SO_RDS_TRANSPORT option at the SOL_RDS level. The integer optval returned will be one of the RDS_TRANS_* constants defined in linux/rds.h. Signed-off-by: Sowmini Varadhan

[PATCH 1/3] net/rds: Declare SO_RDS_TRANSPORT and RDS_TRANS_* constants in uapi/linux/rds.h

2015-05-29 Thread Sowmini Varadhan
., RDS_TRANS_TCP. This commit exports the constant values need by such applications via Signed-off-by: Sowmini Varadhan --- include/uapi/linux/rds.h | 10 ++ net/rds/rds.h|5 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/uapi/linux/rds.h b/include

[PATCH 2/3] net/rds: Add setsockopt support for SO_RDS_TRANSPORT

2015-05-29 Thread Sowmini Varadhan
specified before invoking bind(2) on the socket, and may only be used once on the socket. An attempt to set the option on a bound socket, or to invoke the option after a successful SO_RDS_TRANSPORT attachment, will return EOPNOTSUPP. Signed-off-by: Sowmini Varadhan --- net/rds/af_rds.c| 27

[PATCH v2 net-next 0/2] RDS-TCP: Network namespace support

2015-08-03 Thread Sowmini Varadhan
in patch 2, patch 3 broken off and submitted separately. Sowmini Varadhan (2): Make RDS-TCP work correctly when it is set up in a netns other than init_net Support multiple RDS-TCP listen endpoints, one per netns. net/rds/bind.c|3 +- net/rds/connection.c | 16 +++-

[PATCH v2 net-next 2/2] RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.

2015-08-03 Thread Sowmini Varadhan
the netns indicating that the netns is getting deleted. Signed-off-by: Sowmini Varadhan --- v2: net_device notifier for synchronous cleanup of sockets. net/rds/tcp.c | 163 - net/rds/tcp.h |7 ++- net/rds/tcp_connect.c |

[PATCH v2 net-next 1/2] RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net

2015-08-03 Thread Sowmini Varadhan
Open the sockets calling sock_create_kern() with the correct struct net pointer, and use that struct net pointer when verifying the address passed to rds_bind(). Signed-off-by: Sowmini Varadhan --- v2: David Ahern comments. net/rds/bind.c|3 ++- net/rds/connection.c | 16

[PATCH v3 net-next 2/2] RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.

2015-08-04 Thread Sowmini Varadhan
the netns indicating that the netns is getting deleted. Signed-off-by: Sowmini Varadhan --- v2: net_device notifier for synchronous cleanup of sockets. v3: Cong Wang comments net/rds/tcp.c | 161 - net/rds/tcp.h |7 ++

[PATCH v3 net-next 1/2] RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net

2015-08-04 Thread Sowmini Varadhan
Open the sockets calling sock_create_kern() with the correct struct net pointer, and use that struct net pointer when verifying the address passed to rds_bind(). Signed-off-by: Sowmini Varadhan --- v2: David Ahern comments. net/rds/bind.c|3 ++- net/rds/connection.c | 16

[PATCH v3 net-next 0/2] RDS-TCP: Network namespace support

2015-08-04 Thread Sowmini Varadhan
in patch 2, patch 3 broken off and submitted separately. v3: Cong Wang review comments. Sowmini Varadhan (2): Make RDS-TCP work correctly when it is set up in a netns other than init_net Support multiple RDS-TCP listen endpoints, one per netns. net/rds/bind.c|3 +

[PATCH v2 net] net: sk_clone_lock() should only do get_net() if the parent is not a kernel socket

2015-07-30 Thread Sowmini Varadhan
cked-by: Eric Dumazet Cc: Eric W. Biederman Signed-off-by: Sowmini Varadhan --- v2: pulled patch #3 out of the RFC patch-set for RDS-TCP netns fixes; Added Fixes, Acked-by, Cc fields based on mailing list feedback from Eric Dumazet. net/core/sock.c |3 ++- 1 files changed, 2 ins

Re: [PATCH v2] lib/mpi: Fix kernel unaligned access in mpi_write_to_sgl

2016-05-03 Thread Sowmini Varadhan
On (05/03/16 16:12), Herbert Xu wrote: > > Sorry, but your patch doesn't apply against the current tree at all. > Please rebase it if it is still needed. Hello, I had based my patch off of net-next, which is where I do my work. I'd be happy to rebase it on the "current tree", but given that mp

Re: [PATCH v2] lib/mpi: Fix kernel unaligned access in mpi_write_to_sgl

2016-05-04 Thread Sowmini Varadhan
On (05/04/16 10:32), Herbert Xu wrote: > > Please base it on cryptodev. > Looks like this got fixed in cryptodev by commit cece762f6f3c ("lib/mpi: mpi_write_sgl(): fix out-of-bounds stack access") Thanks, --Sowmini

[PATCH v2] lib/mpi: Fix kernel unaligned access in mpi_write_to_sgl

2016-04-27 Thread Sowmini Varadhan
Commit 2d4d1eea540b ("lib/mpi: Add mpi sgl helpers") added mpi_write_to_sgl() which generates traps due to unaligned access on some platforms like sparc. Fix this by using the get_unaligned* and put_unaligned* functions. Fixes: 2d4d1eea540b ("lib/mpi: Add mpi sgl helpers") Si

Re: [PATCH v2] lib/mpi: Fix kernel unaligned access in mpi_write_to_sgl

2016-04-27 Thread Sowmini Varadhan
On (04/28/16 09:01), Herbert Xu wrote: > Subject: Re: [PATCH v2] lib/mpi: Fix kernel unaligned access in > mpi_write_to_sgl > > Please cc linux-crypto. Just bounced the message to linux-crypto as well. I think get_maintainers.pl might also need to be updated to generate this automatically. Th

bar

2015-12-04 Thread Sowmini Varadhan
eld in the platform-private i40e_pf structure tracks whether the mac address was default or not, and in the latter case, will trigger the calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan(). Reviewed-by: Martin K. Petersen Signed-off-by: Sowmini Varadhan --- v2, v3: Andy Shevchenko c

[PATCH RESEND v7] i40e: Look up MAC address in Open Firmware or IDPROM

2015-12-04 Thread Sowmini Varadhan
ned-off-by: Sowmini Varadhan --- v2, v3: Andy Shevchenko comments v4: Shannon Nelson review: explicitly set up mac filters before register_netdev v5: Shannon Nelson code style comments v6: Shannon Nelson code style comments v7: Ensure that i40e_macaddr_init() is called only for VSI_MAIN, and only

[PATCH v8] i40e: Look up MAC address in Open Firmware or IDPROM

2015-12-05 Thread Sowmini Varadhan
lag in the platform-private i40e_pf structure tracks whether a platform-specific mac address was found, in which case calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan() will be triggered. Reviewed-by: Martin K. Petersen Signed-off-by: Sowmini Varadhan --- v2, v3: Andy Shevchenko comments v

[PATCH v9] i40e: Look up MAC address in Open Firmware or IDPROM

2015-12-07 Thread Sowmini Varadhan
lag in the platform-private i40e_pf structure tracks whether a platform-specific mac address was found, in which case calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan() will be triggered. Reviewed-by: Martin K. Petersen Signed-off-by: Sowmini Varadhan --- v2, v3: Andy Shevchenko comments v

Re: [Intel-wired-lan] [PATCH v6] i40e: Look up MAC address in Open Firmware or IDPROM

2015-12-03 Thread Sowmini Varadhan
On (12/03/15 16:53), Bowers, AndrewX wrote: > > I get an error -11 on driver init with this patch applied, I can > revert it and everything works normally. Dmesg screenshot is attached, > can supply complete dmesg log if needed. Yes, that's the same thing that I'm running into as well. Using th

[PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask

2015-07-19 Thread Sowmini Varadhan
m/gcc-4.4.4. Signed-off-by: Sowmini Varadhan --- lib/iommu-common.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/iommu-common.c b/lib/iommu-common.c index df30632..fd1297d 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c @@ -119,7 +119,7 @@ unsigned long i

Re: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask

2015-07-19 Thread Sowmini Varadhan
On (07/19/15 22:25), Rasmus Villemoes wrote: > > Wouldn't GENMASK(align_order-1, 0) work for all cases (assuming > align_order has a sane value)? Devices with limits on DMA masks are uncommon, so I'm personally not an expert at all the variations in this space, but I was thinking that this doing

[PATCH v2 net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac

2015-07-20 Thread Sowmini Varadhan
__vxlan_find_mac invokes ether_addr_equal on the eth_addr field, which triggers unaligned access messages, so rearrange vxlan_fdb to avoid this in the most non-intrusive way. Signed-off-by: Sowmini Varadhan --- v2: Alexander Duyck comments: place eth_addr[] to be 64b aligned drivers/net

Re: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask

2015-07-20 Thread Sowmini Varadhan
On (07/19/15 08:27), Guenter Roeck wrote: > > - align_mask = 0xl >> (64 - align_order); > > + align_mask = ~0l >> (64 - align_order); > > > Wonder if this just hides the real problem. Unless align_order > is very large, the resulting mask on 32 bit systems may

Re: [PATCH] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask

2015-07-20 Thread Sowmini Varadhan
On (07/20/15 19:57), Rasmus Villemoes wrote: > I highly doubt it. The result is truncated to unsigned long > anyway. Assuming align_order always has a value between 0 and > BITS_PER_LONG, GENMASK should be exactly what is wanted. While GENMASK may do the job, the code is already quite obscure, so

[PATCH v2] iommu-common: Do not use 64 bit constant 0xffffffffffffffffl for computing align_mask

2015-07-20 Thread Sowmini Varadhan
Using a 64 bit constant generates "warning: integer constant is too large for 'long' type" on 32 bit platforms. Instead use ~0ul and BITS_PER_LONG. Detected by Andrew Morton on ARMD. Signed-off-by: Sowmini Varadhan --- v2: use BITS_PER_LONG and ulong as discussed on maili

Re: [PATCH 1/2] net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection.

2015-05-04 Thread Sowmini Varadhan
On (05/04/15 14:47), David Miller wrote: > > I think adding 64K of data to this module just to solve this rare > issue is excessive. I'd based that number mostly as a heuristic based on rds_conn_hash[]. Any suggestions for what's reasonable? 8K? Less? (BTW, I think that should be 32K, or am I mis

Re: [PATCH 1/2] net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection.

2015-05-04 Thread Sowmini Varadhan
On (05/04/15 16:21), David Miller wrote: > > No table at all. > > There has to be another way to notice this kind of situation, how > for example does NFS or any other sunrpc using service handle this > case? NFS fixes up CLOSE_WAIT connections from xs_tcp_state_change, so at the least, I can al

[PATCH v2 1/2] net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection.

2015-05-05 Thread Sowmini Varadhan
transition to CLOSE_WAIT state. In the rarer event of client death without a FIN, TCP_KEEPALIVE probes on the socket will detect the stale socket, and the TCP transition to CLOSE state will trigger the RDS state cleanup. Signed-off-by: Sowmini Varadhan --- v2: DaveM comments- make the TCP s

[PATCH v2 0/2] net/rds: RDS-TCP robustness fixes

2015-05-05 Thread Sowmini Varadhan
rep 16385' that packets flow correctly. 3. start RDS client/server application on two participating nodes, and repeat steps 1 and 2, but this time, simulate node failure by doing "ifconfig down", so no FIN is sent. Sowmini Varadhan (2): RDS-TCP: Always create a new rds_s

[PATCH v2 2/2] net/rds: RDS-TCP: only initiate reconnect attempt on outgoing TCP socket.

2015-05-05 Thread Sowmini Varadhan
rds_queue_reconnect() for passive rds connections. Signed-off-by: Sowmini Varadhan --- net/rds/connection.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/net/rds/connection.c b/net/rds/connection.c index 60f0cd6..da6da57 100644 --- a/net/rds/connection.c +++ b/net/rds

[PATCH 2/2] net/rds: RDS-TCP: only initiate reconnect attempt on outgoing TCP socket.

2015-05-02 Thread Sowmini Varadhan
connection to the c_hash_node and thus avoid triggering rds_queue_reconnect() for passive rds connections. Passive side cleanup/recovery is handled in the rds_tcp module. Signed-off-by: Sowmini Varadhan --- net/rds/connection.c | 13 +++-- 1 files changed, 11 insertions(+), 2

[PATCH 1/2] net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection.

2015-05-02 Thread Sowmini Varadhan
by having rds_tcp_accept_one() always create a new connection for an incoming TCP SYN. The rds and tcp state associated with the old socket-pair is cleaned up in rds_tcp_set_callbacks() (i.e., rds_conn_drop on the old connection) Signed-off-by: Sowmini Varadhan --- net/rds/connection.c |4 +++ net

[PATCH 0/2] net/rds: RDS-TCP robustness fixes

2015-05-02 Thread Sowmini Varadhan
and clean connection establishment/exchange for the new client port. 2. At the end of step 1, restart rds srever on node2, and start client on node1, make sure using tcpdump, 'netstat -an|grep 16385' that packets flow correctly. Sowmini Varadhan (2): RDS-TCP: Always create

Re: [PATCH] rds: avoid potential stack overflow

2015-03-09 Thread Sowmini Varadhan
On 03/09/2015 08:06 AM, Arnd Bergmann wrote: The rds_iw_add_conn function stores a large 'struct rds_sock' I think you might have a typo here- did you mean rds_iw_update_cm_id above (which is the function that has a 'struct rds_sock rs' on the stack)? The rest of the change looks fine to me.

Re: [PATCH v2] rds: avoid potential stack overflow

2015-03-11 Thread Sowmini Varadhan
that limit on ARM, which gives us this warning: : > Signed-off-by: Arnd Bergmann Acked-by: Sowmini Varadhan --Sowmini -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http

  1   2   >