From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdCAVet (ORCPT ); Wed, 1 Mar 2017 16:34:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33846 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbdCAVeq (ORCPT ); Wed, 1 Mar 2017 16:34:46 -0500 Date: Wed, 1 Mar 2017 23:25:14 +0200 From: "Michael S. Tsirkin" To: Omar Sandoval Cc: Amit Shah , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] virtio-console: avoid DMA from stack Message-ID: <20170301232508-mutt-send-email-mst@kernel.org> References: <075115ddd99246ffc4228a3e050ba68eb36c6a8c.1485935920.git.osandov@fb.com> <20170201134712.GA7935@amit-lp.rh> <20170301200110.GA24754@vader.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301200110.GA24754@vader.dhcp.thefacebook.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 01 Mar 2017 21:25:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 01, 2017 at 12:01:10PM -0800, Omar Sandoval wrote: > On Wed, Feb 01, 2017 at 07:17:12PM +0530, Amit Shah wrote: > > On (Wed) 01 Feb 2017 [00:02:27], Omar Sandoval wrote: > > > From: Omar Sandoval > > > > > > put_chars() stuffs the buffer it gets into an sg, but that buffer may be > > > on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it > > > manifested as printks getting turned into NUL bytes). > > > > Seems reasonable. I wonder since all implementations of hvc do a > > memcpy, if we can abstract it - but that'll need some work. > > > > Reviewed-by: Amit Shah > > > > Michael, please add to the virtio queue. > > > > Amit > > Hi, Michael, > > I don't see this in Linus' master or in your git tree, is it going to go > in for -rc1? > > Thanks. Yes. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] virtio-console: avoid DMA from stack Date: Wed, 1 Mar 2017 23:25:14 +0200 Message-ID: <20170301232508-mutt-send-email-mst@kernel.org> References: <075115ddd99246ffc4228a3e050ba68eb36c6a8c.1485935920.git.osandov@fb.com> <20170201134712.GA7935@amit-lp.rh> <20170301200110.GA24754@vader.dhcp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170301200110.GA24754@vader.dhcp.thefacebook.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Omar Sandoval Cc: kernel-team@fb.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Amit Shah List-Id: virtualization@lists.linuxfoundation.org On Wed, Mar 01, 2017 at 12:01:10PM -0800, Omar Sandoval wrote: > On Wed, Feb 01, 2017 at 07:17:12PM +0530, Amit Shah wrote: > > On (Wed) 01 Feb 2017 [00:02:27], Omar Sandoval wrote: > > > From: Omar Sandoval > > > > > > put_chars() stuffs the buffer it gets into an sg, but that buffer may be > > > on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it > > > manifested as printks getting turned into NUL bytes). > > > > Seems reasonable. I wonder since all implementations of hvc do a > > memcpy, if we can abstract it - but that'll need some work. > > > > Reviewed-by: Amit Shah > > > > Michael, please add to the virtio queue. > > > > Amit > > Hi, Michael, > > I don't see this in Linus' master or in your git tree, is it going to go > in for -rc1? > > Thanks. Yes.