From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by dpdk.org (Postfix) with ESMTP id 00ACE326C for ; Tue, 4 Apr 2017 11:58:41 +0200 (CEST) Received: by mail-lf0-f48.google.com with SMTP id z15so89613675lfd.1 for ; Tue, 04 Apr 2017 02:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=Za5qw1L10Ck63pslicOKsMbeodgqCXJhk2K4hC3w7gk=; b=Omo9y/dCwTI3c/2vtmeSgvw36RhFNk1y1+D/hSUiRC9xrJ0PKeRQ+nbvR/+Krk2iV2 WHm2+VnKlcRDe8/1GaJxcurzkS9uj+wMHDPUvXdvs4cU/po3+xAxgLkhiUec0LlvvdT+ +iLF9dpoEkVSARiozrQZZiGrz5rEovDsVL/wsp/FbMgxDynEN1uOqxrLe1qb/shg+/Sd +YzKgoeQFqAGR4lHCh6cA2RkLhHh4Xp3tJuMUNTDVDUwdFmZfQL4HbroOkuDY2zzzYP0 UZBqT9+xc3OZVUZFWVoixxgN9rG0CZyFspkt8VcyUL6kJWziPqIMB2PJiY06qwMGrzE4 hTvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=Za5qw1L10Ck63pslicOKsMbeodgqCXJhk2K4hC3w7gk=; b=TB4WGpKvYKpqk5nhcEBEuE7Dj85Dosf7d2FZz71hUIHmXLPUqs6adtcDJXXIeWnr62 QQ2ZUJqCWBvX9tcSNIoCxgWFXiVYx5LGTxm72Zu961O/pq5fC6HojbSNQVAJVYsD2I7e mKzHD143jq+TYxjPgwHTwrjKccmA9HdcMlu6VAG41SKs/P7pCQqx01sCdNQOdXz3/9c8 ZOtxp3bohJ1woxROhGKIy8PQNaWQOSLvkeySRSQfSTrURa4JQlqg57rNg8bDBT4+dA75 Y+jyNBgaRTsjzzMerFf2rqbSDbLiVGpUxzyOqpZ5sp7dCmwJ+2aZSsAg4GNcRMVTIu54 hSsw== X-Gm-Message-State: AFeK/H1PjrCAFLrbYHKU4MPOYpl+aXUJniz+xKOnA0GXmYSVGpZSHIff Y7H5tHOGqhu8bJdd X-Received: by 10.28.234.20 with SMTP id i20mr13682248wmh.91.1491299921501; Tue, 04 Apr 2017 02:58:41 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id e23sm13422082wmi.16.2017.04.04.02.58.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 02:58:40 -0700 (PDT) From: Thomas Monjalon To: Jianfeng Tan Cc: dev@dpdk.org, Sergio Gonzalez Monroy , benjamin.walker@intel.com, stable@dpdk.org Date: Tue, 04 Apr 2017 11:58:39 +0200 Message-ID: <1692898.PdBQoVJhCZ@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <7c01afcd-20a7-f2a0-f230-04e5b04fb3c9@intel.com> References: <1489681724-22114-1-git-send-email-jianfeng.tan@intel.com> <7c01afcd-20a7-f2a0-f230-04e5b04fb3c9@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] eal/linux: fix multi-process cannot work X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2017 09:58:42 -0000 2017-03-29 16:19, Sergio Gonzalez Monroy: > On 16/03/2017 16:28, Jianfeng Tan wrote: > > When binding with vfio-pci, secondary process cannot be started with > > an error message: > > > > cannot find TAILQ entry for PCI device. > > > > It's due to: struct rte_pci_addr is padded with 1 byte for alignment > > by compiler. Then below comparison in commit 2f4adfad0a69 > > ("vfio: add multiprocess support") will fail if the last byte is not > > initialized. > > > > memcmp(&vfio_res->pci_addr, &dev->addr, sizeof(dev->addr) > > > > And commit cdc242f260e7 ("eal/linux: support running as unprivileged user") > > just triggers this bug by using a stack un-initialized variable. > > > > The fix is to use rte_eal_compare_pci_addr() for pci addr comparison. > > > > Fixes: 2f4adfad0a69 ("vfio: add multiprocess support") > > Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user") > > CC: stable@dpdk.org > > > > Reported-by: Rutkowski, Pawel > > Signed-off-by: Jianfeng Tan > > Acked-by: Sergio Gonzalez Monroy Applied, thanks