From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: + ppc-e500_tlb-memset-clears-nothing.patch added to -mm tree Date: Wed, 25 Jul 2012 13:20:20 +0300 Message-ID: <500FC864.8070705@redhat.com> References: <20120724210054.4164420004E@hpza10.eem.corp.google.com> <500FAF05.8010304@redhat.com> <500FBA69.9070402@redhat.com> <20120725111218.1da93765@bob.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 To: Alan Cox Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7704 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753795Ab2GYKUd (ORCPT ); Wed, 25 Jul 2012 06:20:33 -0400 In-Reply-To: <20120725111218.1da93765@bob.linux.org.uk> Sender: kvm-owner@vger.kernel.org List-ID: 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