From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965752Ab3FUL5z (ORCPT ); Fri, 21 Jun 2013 07:57:55 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:60431 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965662Ab3FUL5y (ORCPT ); Fri, 21 Jun 2013 07:57:54 -0400 Date: Fri, 21 Jun 2013 04:57:46 -0700 From: Christoph Hellwig To: Paolo Bonzini Cc: Christoph Hellwig , James Bottomley , Tejun Heo , Jens Axboe , lkml , "linux-scsi@vger.kernel.org" , asias.hejun@gmail.com Subject: Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542)) Message-ID: <20130621115746.GA5142@infradead.org> References: <20130522221737.GA12339@mtj.dyndns.org> <519DC926.4000106@redhat.com> <20130523090222.GA26592@mtj.dyndns.org> <519DE5AD.7080303@redhat.com> <20130524014405.GB16882@mtj.dyndns.org> <519F12FF.6090809@redhat.com> <1369456502.5008.5.camel@dabdike> <20130525052744.GA25186@infradead.org> <51A062B5.8040601@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51A062B5.8040601@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 25, 2013 at 09:05:25AM +0200, Paolo Bonzini wrote: > Linus wanted to keep that for CAP_SYS_RAWIO. We found two uses of SG_IO > on partitions: zfs-fuse used SYNCHRONIZE CACHE; some proprietary driver > used TEST UNIT READY. FYI I looked at the zfs code and the way it uses it is part of a huge braindamage. Given that the upstream appears dead I've Cc'd Asias He as he appears to somehow maintain it as part of the Debian package. Asias, the flushwc() routine in zfs-fuse is overly complicated and will not do the right thing for many cases like using device mapper, many modern SSD device, or much simple file backed filesystems. Fortunately fixing this is trivial - the call to flushwc can be replaced with a call to fdatasync() and the the kernel will do the right thing for any backing device or file.