From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39457A00BE; Fri, 12 Jun 2020 18:06:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B0681C00D; Fri, 12 Jun 2020 18:06:43 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 5EF751BEC5 for ; Fri, 12 Jun 2020 18:06:42 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id e9so4320931pgo.9 for ; Fri, 12 Jun 2020 09:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uw3sDjdIRTPePZnOjxofnZLhmFy6fKIquZHTbWXK2z8=; b=OAtjoOPG5UEnlBJ6CNiJwWYPfMf/bdJH+soeHuAzydG5kcxiWX31tfgYOAYcrZvN1B oDE0QIpZcxBN4YLPdSpJs5R81VB/2ktfM+CQAoHEHlQrR1EBgwOWJu41wB6GB2TOz52d iJp/2gSvEFlMLUaDxFb1YMdLYQjDDZS8JrI3b3BQOvsfG879EiTT/eIuZJXOsNKtgoxI zSgFJHKrVjlNarWmkTLrKVpW1q2Xn+5w2NVOP1vpy1rXgQbdx4Ll5aStnM9aIzDNAgW3 NDoQ0wlxaSZVX2a1rqUrMMOYg4ut2s+EkFCIfHCMPF5/VtjjferSvnObWuOwSMpDRj8v tcew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uw3sDjdIRTPePZnOjxofnZLhmFy6fKIquZHTbWXK2z8=; b=LigIys9kjPizKxnchcCOHm/E8+M8IeRIe/5YIRHAC3rDBcTh6YfKicQhOXtsr4QLkI sely9A2W0zf8RBEnvnBuab8yB1i34i+b92XWW/WrnkmAblCc8EsdpxY+P023CRA9Rysa OQwIwrkdNyobR98BbP1ZkgT7+Fcif0Qt7Pb/uVU/vUP0LZpRiZf943xwmTO3YHn+E35q NqNbg3t3dVFvMYt1jl7E3iZ6nlfm4eM9ed5h3VhP2C75oHPWk0FV2JN6aFXGT2NhX799 Myk6pV8nwO/a4o7t2cgHzNnmz3D1ojB1axS40L2BSEooFDAs7sSOgOzl4U3dU11lZ4BQ /5cA== X-Gm-Message-State: AOAM532bs3Tg9SuaVWmRxy7mV3NjWvTDzn4OfGbWuzxWjFjA62YrxAam rcL/7e0cj+7qBfqc6Q+a3onF+w== X-Google-Smtp-Source: ABdhPJxs0xpybjsOBDznLttIGzO2ykj4FJBgejeYqlvec0kExqj6R4+WkrpT59X6x79XkaJx7P+Hbw== X-Received: by 2002:a05:6a00:2c5:: with SMTP id b5mr11836955pft.41.1591978001448; Fri, 12 Jun 2020 09:06:41 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d22sm5851187pgh.64.2020.06.12.09.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 09:06:41 -0700 (PDT) Date: Fri, 12 Jun 2020 09:06:33 -0700 From: Stephen Hemminger To: longli@linuxonhyperv.com Cc: Stephen Hemminger , dev@dpdk.org, Long Li Message-ID: <20200612090633.1a3d90a7@hermes.lan> In-Reply-To: <1591922905-81259-1-git-send-email-longli@linuxonhyperv.com> References: <1591922905-81259-1-git-send-email-longli@linuxonhyperv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] bus/vmbus: calcuate the correct start address for mapping ring buffer 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 11 Jun 2020 17:48:25 -0700 longli@linuxonhyperv.com wrote: > From: Long Li > > vmbus_map_addr is used as the next start virutal address for mapping ring > buffer. However it's updated based on ring_buf, which is a pointer to an > address on the stack. The next ring buffer may be mapped to an unexpected > address. > > Fix this by calculating vmbus_map_addr based on returned virtual address. > > Signed-off-by: Long Li Fixes: 3f9277031a2e ("bus/vmbus: fix check for mmap failure") Acked-by: Stephen Hemminger