All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ip_vs_sh: fix build
@ 2013-05-29 12:33 ` Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2013-05-29 12:33 UTC (permalink / raw)
  To: wensong, ja, horms; +Cc: pablo, lvs-devel, netdev

kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can get
violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

---
 net/netfilter/ipvs/ip_vs_sh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
+++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
@@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
 #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
 
 struct ip_vs_sh_state {
-	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
 	struct rcu_head			rcu_head;
+	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
 };
 
 /*




^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] ip_vs_sh: fix build
@ 2013-05-29 12:33 ` Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2013-05-29 12:33 UTC (permalink / raw)
  To: wensong, ja, horms; +Cc: pablo, lvs-devel, netdev

kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can get
violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

---
 net/netfilter/ipvs/ip_vs_sh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
+++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
@@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
 #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
 
 struct ip_vs_sh_state {
-	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
 	struct rcu_head			rcu_head;
+	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
 };
 
 /*




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
  2013-05-29 12:33 ` Jan Beulich
  (?)
@ 2013-05-29 14:59 ` Simon Horman
  2013-05-29 15:51   ` Pablo Neira Ayuso
  -1 siblings, 1 reply; 8+ messages in thread
From: Simon Horman @ 2013-05-29 14:59 UTC (permalink / raw)
  To: Jan Beulich; +Cc: wensong, ja, pablo, lvs-devel, netdev

On Wed, May 29, 2013 at 01:33:51PM +0100, Jan Beulich wrote:
> kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can get
> violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Thanks Jan.

Pablo, could you take this one directly into your tree?

Signed-off-by: Simon Horman <horms@verge.net.au>

> 
> ---
>  net/netfilter/ipvs/ip_vs_sh.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
> +++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
> @@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
>  #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
>  
>  struct ip_vs_sh_state {
> -	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
>  	struct rcu_head			rcu_head;
> +	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
>  };
>  
>  /*
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
  2013-05-29 14:59 ` Simon Horman
@ 2013-05-29 15:51   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 8+ messages in thread
From: Pablo Neira Ayuso @ 2013-05-29 15:51 UTC (permalink / raw)
  To: Simon Horman; +Cc: Jan Beulich, wensong, ja, lvs-devel, netdev

On Wed, May 29, 2013 at 11:59:06PM +0900, Simon Horman wrote:
> On Wed, May 29, 2013 at 01:33:51PM +0100, Jan Beulich wrote:
> > kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can get
> > violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Thanks Jan.
> 
> Pablo, could you take this one directly into your tree?
> 
> Signed-off-by: Simon Horman <horms@verge.net.au>

Applied, thanks Simon.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
  2013-05-29 12:33 ` Jan Beulich
  (?)
  (?)
@ 2013-05-29 19:31 ` Julian Anastasov
  2013-05-30  5:48     ` Jan Beulich
  -1 siblings, 1 reply; 8+ messages in thread
From: Julian Anastasov @ 2013-05-29 19:31 UTC (permalink / raw)
  To: Jan Beulich; +Cc: wensong, horms, pablo, lvs-devel, netdev


	Hello,

On Wed, 29 May 2013, Jan Beulich wrote:

> kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can get
> violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> ---
>  net/netfilter/ipvs/ip_vs_sh.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
> +++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
> @@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
>  #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
>  
>  struct ip_vs_sh_state {
> -	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];
>  	struct rcu_head			rcu_head;
> +	struct ip_vs_sh_bucket		buckets[IP_VS_SH_TAB_SIZE];

	Your fix reminds me about the same problem
I noticed for LBLC (may be due to 10 bits) during development
but forgot to check the other schedulers. The same solution
is needed also for DH. OTOH, LBLC and LBLCR are correct.
Do you prefer to provide similar fix for ip_vs_dh.c or
I have to take care?

>  };
>  
>  /*

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
  2013-05-29 19:31 ` Julian Anastasov
@ 2013-05-30  5:48     ` Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2013-05-30  5:48 UTC (permalink / raw)
  To: ja; +Cc: wensong, pablo, horms, lvs-devel, netdev

>>> Julian Anastasov <ja@ssi.bg> 05/29/13 9:28 PM >>>
>On Wed, 29 May 2013, Jan Beulich wrote:
>> --- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
>> +++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
>> @@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
>>  #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
>>  
>>  struct ip_vs_sh_state {
>> -    struct ip_vs_sh_bucket        buckets[IP_VS_SH_TAB_SIZE];
>>      struct rcu_head            rcu_head;
>> +    struct ip_vs_sh_bucket        buckets[IP_VS_SH_TAB_SIZE];
>
>    Your fix reminds me about the same problem
>I noticed for LBLC (may be due to 10 bits) during development
>but forgot to check the other schedulers. The same solution
>is needed also for DH. OTOH, LBLC and LBLCR are correct.
>Do you prefer to provide similar fix for ip_vs_dh.c or
>I have to take care?

CONFIG_IP_VS_DH_TAB_BITS is always 8 (due to not coming from any
Kconfig setting), and hence not a problem at this point. If it is being planned
to make configurable, then that change should at once flip the structure
members.

Jan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
@ 2013-05-30  5:48     ` Jan Beulich
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2013-05-30  5:48 UTC (permalink / raw)
  To: ja; +Cc: wensong, pablo, horms, lvs-devel, netdev

>>> Julian Anastasov <ja@ssi.bg> 05/29/13 9:28 PM >>>
>On Wed, 29 May 2013, Jan Beulich wrote:
>> --- 3.10-rc3/net/netfilter/ipvs/ip_vs_sh.c
>> +++ 3.10-rc3-ip_vs_sh-build/net/netfilter/ipvs/ip_vs_sh.c
>> @@ -67,8 +67,8 @@ struct ip_vs_sh_bucket {
>>  #define IP_VS_SH_TAB_MASK               (IP_VS_SH_TAB_SIZE - 1)
>>  
>>  struct ip_vs_sh_state {
>> -    struct ip_vs_sh_bucket        buckets[IP_VS_SH_TAB_SIZE];
>>      struct rcu_head            rcu_head;
>> +    struct ip_vs_sh_bucket        buckets[IP_VS_SH_TAB_SIZE];
>
>    Your fix reminds me about the same problem
>I noticed for LBLC (may be due to 10 bits) during development
>but forgot to check the other schedulers. The same solution
>is needed also for DH. OTOH, LBLC and LBLCR are correct.
>Do you prefer to provide similar fix for ip_vs_dh.c or
>I have to take care?

CONFIG_IP_VS_DH_TAB_BITS is always 8 (due to not coming from any
Kconfig setting), and hence not a problem at this point. If it is being planned
to make configurable, then that change should at once flip the structure
members.

Jan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ip_vs_sh: fix build
  2013-05-30  5:48     ` Jan Beulich
  (?)
@ 2013-05-30  6:42     ` Julian Anastasov
  -1 siblings, 0 replies; 8+ messages in thread
From: Julian Anastasov @ 2013-05-30  6:42 UTC (permalink / raw)
  To: Jan Beulich; +Cc: wensong, pablo, horms, lvs-devel, netdev


	Hello,

On Thu, 30 May 2013, Jan Beulich wrote:

> CONFIG_IP_VS_DH_TAB_BITS is always 8 (due to not coming from any
> Kconfig setting), and hence not a problem at this point. If it is being planned
> to make configurable, then that change should at once flip the structure
> members.

	Aha, OK.

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-30  6:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29 12:33 [PATCH] ip_vs_sh: fix build Jan Beulich
2013-05-29 12:33 ` Jan Beulich
2013-05-29 14:59 ` Simon Horman
2013-05-29 15:51   ` Pablo Neira Ayuso
2013-05-29 19:31 ` Julian Anastasov
2013-05-30  5:48   ` Jan Beulich
2013-05-30  5:48     ` Jan Beulich
2013-05-30  6:42     ` Julian Anastasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.