From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 3B8FD214A for ; Mon, 11 Jul 2016 06:48:43 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id f126so76116217wma.1 for ; Sun, 10 Jul 2016 21:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RS2L+C9ZpP3gIRp40ApWM4Kxjqhror/Psa4FDy9DMes=; b=Erk+Vu55gJY68NWZpsosLS7tyGYtNJBM6Ed9rYsblKT5+FJvmgGjGjLLRKfyXwIVAl 7EcyCtLb1a4WGq99u2+lM28FjjW9czcXq6bksnnltuNswuwm4fbkYYt9jb5Xq1YngSt4 f0YzJrWBs57kd3a8OVISntREESN4JoN6OqoghbQ8lIPxw4GYL7Ex7mtDsfhnApPWpx7A 7Q0b+I+4+M2uBAZGeWCOOIVdUVpt2ruGMUGYDkj1JPTuNbwlDZClJZOMXNyUDP20qQHu itPRZ5rYPnykNr2LA3HllEI1jFU7jSlhIpncYOjlTZRg9goYndEuxoUhbTgJcBXGRtFJ TETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RS2L+C9ZpP3gIRp40ApWM4Kxjqhror/Psa4FDy9DMes=; b=XQufcjSaFHCwdCuJPxAnHcTcCtKK6dNnYZNPmyiTelIHZSaKJTmITa3KlonSAdCdOL hk+lnO65UUw6bm10qaEY40l82QptRMyiS73EPPBo9qtYB3VhJ7KAZb1fRHAMkYHbQMOC ihovxBNoc6azCeSpF8RukRLb9aXPgXODAlphQW0Bj3XhxHvwnNMOK7oFEFg1b4wlUjpV ZXQtOLSBII5++YWouPnfdY8PNrfibpdOuklvguz92so4y18vQWdxTupD3s4ArbXh9FUr Zw3ygdI6ZeVVlifXzZojgHXlzGCntnEERmjcgZcLlTOCIqPtAGL4qKfQfdLPniKJX+vR DT8g== X-Gm-Message-State: ALyK8tJBHrtr7ic8myFf6QZB+iW2VW5BfyFEF45Pp6pYXuGt79NhTcHyw2sc/FpEqRww5AdZRTwl12RyLDdSGbcN X-Received: by 10.28.142.194 with SMTP id q185mr11444980wmd.6.1468212523020; Sun, 10 Jul 2016 21:48:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.46.69 with HTTP; Sun, 10 Jul 2016 21:48:23 -0700 (PDT) In-Reply-To: <987EE72691933347B9F0B5C19E71B5BB1F0A9974@IRSMSX101.ger.corp.intel.com> References: <987EE72691933347B9F0B5C19E71B5BB1F0A9974@IRSMSX101.ger.corp.intel.com> From: David Marchand Date: Mon, 11 Jul 2016 06:48:23 +0200 Message-ID: To: "Kobylinski, MichalX" Cc: "dev@dpdk.org" , Sergio Gonzalez Monroy Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] Ignoring number of bytes read in eal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 04:48:43 -0000 Hello, On Tue, Jun 28, 2016 at 10:40 AM, Kobylinski, MichalX wrote: > CID 13212 - Ignoring number of bytes read: > The number of bytes copied into the buffer can be smaller than the requested number and the buffer can potentially be accessed out of range. > In rte_mem_virt2phy: Value returned from a function and indicating the number of bytes read is ignored. > > File: /lib/librte_eal/linuxapp/eal/eal_memory.c > Line: 187 > > Can I mark this error as "False Positive"? > > Because return from read function is checked in "if" condition. If return from read is less than 0 function rte_mem_virt2phy is aborted and return: log message, RTE_BAD_PHYS_ADDR. ? Coverity is complaining because (in theory) read can return less than sizeof(uint64_t). This most likely can't happen, but still coverity is right from my pov. I'd rather fix this than mark this as false positive, Sergio ? -- David Marchand