[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Uninitialized variables in hvm_event_breakpoint (Re: New Defects reported by Coverity Scan for XenProject)



On Wed, 2016-02-17 at 16:02 -0800, scan-admin@xxxxxxxxxxxx wrote:
> Hi,
> 
> Please find the latest report on new defect(s) introduced to XenProject
> found with Coverity Scan.
> 
> 1 new defect(s) introduced to XenProject found with Coverity Scan.
> 4 defect(s), reported by Coverity Scan earlier, were marked fixed in the
> recent build analyzed by Coverity Scan.
> 
> New defect(s) Reported-by: Coverity Scan
> Showing 1 of 1 defect(s)
> 
> 
> ** CID 1353192:ÂÂUninitialized variablesÂÂ(UNINIT)
> /xen/arch/x86/hvm/event.c: 176 in hvm_event_breakpoint()

This appears to have been introduced by:Â
    commit
    557c7873f35aa39bd84977b28948457b1b342f92
    Author: Corneliu ZUZU <czuzu@bitdef
    ender.com>
    Date:ÂÂÂMon Feb 15 14:14:16 2016 +0100

    ÂÂÂÂx86: merge 2 hvm_event_... functions into 1
    ÂÂÂÂ
    ÂÂÂÂThis patch merges almost identical functions hvm_event_int3 and
    ÂÂÂÂhvm_event_single_step into a single function called 
hvm_event_breakpoint.
    ÂÂÂÂAlso fixes event.c file header comment in the process.
    ÂÂÂÂ
    ÂÂÂÂSigned-off-by: Corneliu ZUZU <    czuzu@xxxxxxxxxxxxxxx    >
    ÂÂÂÂAcked-by: Razvan Cojocaru <    rcojocaru@xxxxxxxxxxxxxxx    >
    ÂÂÂÂAcked-by: Jan Beulich <    jbeulich@xxxxxxxx    >


hvm_event_breakpoint calls hvm_event_traps(&req) and if sync is true that
ors some bits into req->flags which was never initialised.

> 
> 
> _________________________________________________________________________
> _______________________________
> *** CID 1353192:ÂÂUninitialized variablesÂÂ(UNINIT)
> /xen/arch/x86/hvm/event.c: 176 in hvm_event_breakpoint()
> 170ÂÂÂÂÂ
> 171ÂÂÂÂÂint hvm_event_breakpoint(unsigned long rip,
> 172ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂenum hvm_event_breakpoint_type type)
> 173ÂÂÂÂÂ{
> 174ÂÂÂÂÂÂÂÂÂstruct vcpu *curr = current;
> 175ÂÂÂÂÂÂÂÂÂstruct arch_domain *ad = &curr->domain->arch;
> > > > ÂÂÂÂCID 1353192:ÂÂUninitialized variablesÂÂ(UNINIT)
> > > > ÂÂÂÂDeclaring variable "req" without initializer.
> 176ÂÂÂÂÂÂÂÂÂvm_event_request_t req;
> 177ÂÂÂÂÂ
> 178ÂÂÂÂÂÂÂÂÂswitch ( type )
> 179ÂÂÂÂÂÂÂÂÂ{
> 180ÂÂÂÂÂÂÂÂÂcase HVM_EVENT_SOFTWARE_BREAKPOINT:
> 181ÂÂÂÂÂÂÂÂÂÂÂÂÂif ( !ad->monitor.software_breakpoint_enabled )
> 
> 
> _________________________________________________________________________
> _______________________________
> To view the defects in Coverity Scan visit, https://scan.coverity.com/pro
> jects/xenproject?tab=overview
> 
> To manage Coverity Scan email notifications for
> "ian.campbell@xxxxxxxxxx", click https://scan.coverity.com/subscriptions/
> edit?email=ian.campbell%40citrix.com&token=1ce0fc428b9f94f66fd8d1ecf6cbb7
> 6a
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.