From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CEF0381ED3 for ; Tue, 15 Nov 2016 10:01:29 -0800 (PST) Received: by mail-wm0-x22e.google.com with SMTP id a197so183021565wmd.0 for ; Tue, 15 Nov 2016 10:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PI/5b293BklTQVu0cOUdF9i9lrUTEslvQLUIwqY6feo=; b=YUkBLHD18+ZPxTNdDJZLYewuAYrsHwjMl+IQNEVS0JAXU2EyWijrds7TVhNSSM4t+h Sbh8ROu2bAfLFn/VZfcLjgg2iI4+zoV6J+cdU11jaPhMzncbbPcDbx1p1Te3DdSJr/5t WWXFvGz6+6XhmiVbQxHjxOtGq6qNtc38aXQt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PI/5b293BklTQVu0cOUdF9i9lrUTEslvQLUIwqY6feo=; b=GF4ytoWdOH3J7LQimVAa44HTpN85hteDygGCT/X772NfJiSYx02QtqCRrGJcOVa61G ++RigAF7jq8Prew34BBo8sFV0QS6nUsDwLJWhrtxTFrcqkEsSj1wUByY8YTn0qAbZDmF 9kHt+4FO/tDsqtFxfWZG5f3Wc0WiKxT9RD9iyCEL9VoSSiWCPHihixCDfGRxDEb6Y0up d7QGcCubibO3ITylUpiWuWt4SFnxLlPMblZrjdJexBMDy8jc63r1zou4xp2fjGHZOIov bqzZqT30bqVTqNyD0NdYAII1LG3jbmIV8caMKlf9alN6/NmSjNmkKJQhXxvh9NXOsHo4 Gh5A== X-Gm-Message-State: ABUngveG9dwEKvC5ZWky9vm0xDg1QprlV2oxU1yqrVX0lQOi6VdthEWP3J36nwuwrqWd0G5r X-Received: by 10.28.22.193 with SMTP id 184mr5170715wmw.100.1479232892706; Tue, 15 Nov 2016 10:01:32 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u18sm4675163wmd.1.2016.11.15.10.01.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Nov 2016 10:01:32 -0800 (PST) Date: Tue, 15 Nov 2016 18:01:29 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: Ryan Harkin , edk2-devel-01 Message-ID: <20161115180129.GH27644@bivouac.eciton.net> References: <1478955748-14819-1-git-send-email-ard.biesheuvel@linaro.org> <1478955748-14819-4-git-send-email-ard.biesheuvel@linaro.org> <20161114151614.GR27644@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH v2 3/4] ArmPkg/ArmDmaLib: clean up abuse of device address X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 18:01:30 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 15, 2016 at 01:07:37PM +0000, Ard Biesheuvel wrote: > On 15 November 2016 at 11:34, Ryan Harkin wrote: > >>>> Since we should never access the device address from the CPU, there is > >>>> no need to record it in the MAPINFO struct. Instead, record the buffer > >>>> address in case of double buffering, since we do need to copy the contents > >>>> (in case of a bus master write) and free the buffer (in all cases) when > >>>> DmaUnmap() is called. > >>>> > >>>> Contributed-under: TianoCore Contribution Agreement 1.0 > >>>> Signed-off-by: Ard Biesheuvel > >>> > >>> For the fix itself: > >>> Reviewed-by: Leif Lindholm > >>> > >>> However, can we wait for a few Tested-by:s to ensure this fix does not > >>> reveal any companion bugs? > >>> > >> > >> Perhaps, yes. > >> > >> In case anyone is up to doing that, please find the branch here > >> https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/log/?h=armdmalib-offset > >> > > > > I tested your branch on the usual victims (R0/1/2, FVP Foundation & > > AEMv8 and TC2) and they all work fine for me. > > > > Tested-by: Ryan Harkin OK, so on the off-hand chance that this does break some non-upstream drivers, I'll wait for further comments until I'm back from holiday, 28 November, before pushing this. Additional Tested-by:s would still be appreciated. Regards, Leif