From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id EFBF8326B for ; Tue, 4 Apr 2017 11:58:41 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id k6so202375210wre.2 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=jNZJHbr9ibkqcyA/OPZB15IzpirmzmerOA843UWN2owjO7f003nR08Tvb0fHoQVHwk Ic2cDyHQZt0mNHt5gss51X1o+zjzzasLYUabaBou4cyPP9KnuTofOVYPajdNklXH7gp4 WNAYBswvHA3OgbCxNFXCmr0Sex8e17sCu1M/hx6oJb1ICqCQYkCCaaRADVcCPK0rq6dB YPNUuQKMat5CRY/x+GER7TcWNDOjgu5+s+8hyL2dEZ40nO5KIkfCIUxg+gdsGonREx7d DAtiOJW4x7C3w+/3oJHuiMBwXxxnnNjPQR+fCuFJt4MsBoyWoz+hl9mIev8ir7khw5jL UjUg== X-Gm-Message-State: AFeK/H2j1pLPwYq3Rqj+VlyhXKdD1lbpBglc5kX+Whf+gGlurWeWrDfs wbnB78Q7zJX2SxcC 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-dev] [PATCH] eal/linux: fix multi-process cannot work X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions 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