kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
       [not found] <20120724210054.4164420004E@hpza10.eem.corp.google.com>
@ 2012-07-25  8:32 ` Avi Kivity
  2012-07-25  9:00   ` Alexander Graf
  0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2012-07-25  8:32 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, alan, agraf, benh, dcb314, mtosatti, paulus, KVM list

On 07/25/2012 12:00 AM, akpm@linux-foundation.org wrote:
> The patch titled
>      Subject: ppc: e500_tlb memset clears nothing
> has been added to the -mm tree.  Its filename is
>      ppc-e500_tlb-memset-clears-nothing.patch
> 

The kvm tree is maintained.  Alex, please pick up this patch; I guess
it's 3.6 material.


> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Alan Cox <alan@linux.intel.com>
> Subject: ppc: e500_tlb memset clears nothing
> 
> Put the parameters the right way around
> 
> Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44031
> 
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Cc: Avi Kivity <avi@redhat.com>
> Cc: Marcelo Tosatti <mtosatti@redhat.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  arch/powerpc/kvm/e500_tlb.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff -puN arch/powerpc/kvm/e500_tlb.c~ppc-e500_tlb-memset-clears-nothing arch/powerpc/kvm/e500_tlb.c
> --- a/arch/powerpc/kvm/e500_tlb.c~ppc-e500_tlb-memset-clears-nothing
> +++ a/arch/powerpc/kvm/e500_tlb.c
> @@ -322,11 +322,11 @@ static inline void kvmppc_e500_ref_relea
>  static void clear_tlb1_bitmap(struct kvmppc_vcpu_e500 *vcpu_e500)
>  {
>  	if (vcpu_e500->g2h_tlb1_map)
> -		memset(vcpu_e500->g2h_tlb1_map,
> -		       sizeof(u64) * vcpu_e500->gtlb_params[1].entries, 0);
> +		memset(vcpu_e500->g2h_tlb1_map, 0,
> +		       sizeof(u64) * vcpu_e500->gtlb_params[1].entries);
>  	if (vcpu_e500->h2g_tlb1_rmap)
> -		memset(vcpu_e500->h2g_tlb1_rmap,
> -		       sizeof(unsigned int) * host_tlb_params[1].entries, 0);
> +		memset(vcpu_e500->h2g_tlb1_rmap, 0,
> +		       sizeof(unsigned int) * host_tlb_params[1].entries);
>  }
>  
>  static void clear_tlb_privs(struct kvmppc_vcpu_e500 *vcpu_e500)
> _
> Subject: Subject: ppc: e500_tlb memset clears nothing
> 

-- 
error compiling committee.c: too many arguments to function



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

* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
  2012-07-25  8:32 ` + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree Avi Kivity
@ 2012-07-25  9:00   ` Alexander Graf
  2012-07-25  9:20     ` Avi Kivity
  2012-07-25 10:10     ` Alan Cox
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Graf @ 2012-07-25  9:00 UTC (permalink / raw)
  To: Avi Kivity
  Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org,
	alan@linux.intel.com, benh@kernel.crashing.org,
	dcb314@hotmail.com, mtosatti@redhat.com, paulus@samba.org,
	KVM list


On 25.07.2012, at 10:32, Avi Kivity <avi@redhat.com> wrote:

> On 07/25/2012 12:00 AM, akpm@linux-foundation.org wrote:
>> The patch titled
>>     Subject: ppc: e500_tlb memset clears nothing
>> has been added to the -mm tree.  Its filename is
>>     ppc-e500_tlb-memset-clears-nothing.patch
>> 
> 
> The kvm tree is maintained.  Alex, please pick up this patch; I guess
> it's 3.6 material.

Yeah, not sure what's going on here. Alan sent me the patch a while back in a private mail, so I asked him to resend it to the ML, so it's available for review. Next thing that happens is this mail a few weeks later.

Either way, will bypass the normal process this time and pull it in my queue. It is certainly 3.6 material.


Alex


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

* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
  2012-07-25  9:00   ` Alexander Graf
@ 2012-07-25  9:20     ` Avi Kivity
  2012-07-25 10:12       ` Alan Cox
  2012-07-25 10:10     ` Alan Cox
  1 sibling, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2012-07-25  9:20 UTC (permalink / raw)
  To: Alexander Graf
  Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org,
	alan@linux.intel.com, benh@kernel.crashing.org,
	dcb314@hotmail.com, mtosatti@redhat.com, paulus@samba.org,
	KVM list

On 07/25/2012 12:00 PM, Alexander Graf wrote:
> 
> On 25.07.2012, at 10:32, Avi Kivity <avi@redhat.com> wrote:
> 
>> On 07/25/2012 12:00 AM, akpm@linux-foundation.org wrote:
>>> The patch titled
>>>     Subject: ppc: e500_tlb memset clears nothing
>>> has been added to the -mm tree.  Its filename is
>>>     ppc-e500_tlb-memset-clears-nothing.patch
>>> 
>> 
>> The kvm tree is maintained.  Alex, please pick up this patch; I guess
>> it's 3.6 material.
> 
> Yeah, not sure what's going on here. Alan sent me the patch a while back in a private mail, so I asked him to resend it to the ML, so it's available for review. Next thing that happens is this mail a few weeks later.
> 
> Either way, will bypass the normal process this time and pull it in my queue. It is certainly 3.6 material.

I wonder how many such bugs a memzero()/bzero() will prevent.

-- 
error compiling committee.c: too many arguments to function



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

* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
  2012-07-25  9:00   ` Alexander Graf
  2012-07-25  9:20     ` Avi Kivity
@ 2012-07-25 10:10     ` Alan Cox
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Cox @ 2012-07-25 10:10 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Avi Kivity, akpm@linux-foundation.org, mm-commits@vger.kernel.org,
	benh@kernel.crashing.org, dcb314@hotmail.com, mtosatti@redhat.com,
	paulus@samba.org, KVM list

> Yeah, not sure what's going on here. Alan sent me the patch a while
> back in a private mail, so I asked him to resend it to the ML, so
> it's available for review. Next thing that happens is this mail a few
> weeks later.

I don't recall seeing your your reply and I really wasn't sure where it
needed to go. I mostly sent it to PPC people. In the end I sent it
to Andrew with a question as to where it should actually go.

> Either way, will bypass the normal process this time and pull it in
> my queue. It is certainly 3.6 material.

Alan

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

* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
  2012-07-25  9:20     ` Avi Kivity
@ 2012-07-25 10:12       ` Alan Cox
  2012-07-25 10:20         ` Avi Kivity
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2012-07-25 10:12 UTC (permalink / raw)
  To: Avi Kivity
  Cc: Alexander Graf, akpm@linux-foundation.org,
	mm-commits@vger.kernel.org, benh@kernel.crashing.org,
	dcb314@hotmail.com, mtosatti@redhat.com, paulus@samba.org,
	KVM list

> I wonder how many such bugs a memzero()/bzero() will prevent.

If the compiler-foo is possible with gcc then a 0 length constant
memset warning and a warning if the set value is > 255 would both
probably be useful.

Fortunately a lot of other validation/verification tools do pick it up
already.

Alan
 


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

* Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree
  2012-07-25 10:12       ` Alan Cox
@ 2012-07-25 10:20         ` Avi Kivity
  0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2012-07-25 10:20 UTC (permalink / raw)
  To: Alan Cox
  Cc: Alexander Graf, akpm@linux-foundation.org,
	mm-commits@vger.kernel.org, benh@kernel.crashing.org,
	dcb314@hotmail.com, mtosatti@redhat.com, paulus@samba.org,
	KVM list

On 07/25/2012 01:12 PM, Alan Cox wrote:
>> I wonder how many such bugs a memzero()/bzero() will prevent.
> 
> If the compiler-foo is possible with gcc then a 0 length constant
> memset warning and a warning if the set value is > 255 would both
> probably be useful.

It's pretty easy with BUILD_BUG_ON(), unfortunately that emits an error
and there may be legitimate uses for memset(p, 255, 0).

> Fortunately a lot of other validation/verification tools do pick it up
> already.

Also a lot of kernel developers whose time would be better spent on
other things.

-- 
error compiling committee.c: too many arguments to function



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

end of thread, other threads:[~2012-07-25 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120724210054.4164420004E@hpza10.eem.corp.google.com>
2012-07-25  8:32 ` + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree Avi Kivity
2012-07-25  9:00   ` Alexander Graf
2012-07-25  9:20     ` Avi Kivity
2012-07-25 10:12       ` Alan Cox
2012-07-25 10:20         ` Avi Kivity
2012-07-25 10:10     ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).