Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761972AbcLSPei (ORCPT ); Mon, 19 Dec 2016 10:34:38 -0500 Received: from mail-pg0-f46.google.com ([74.125.83.46]:35668 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755484AbcLSPeg (ORCPT ); Mon, 19 Dec 2016 10:34:36 -0500 Subject: Re: [PATCH RESEND] block: allow WRITE_SAME commands with the SG_IO ioctl To: Mauricio Faria de Oliveira , linux-block@vger.kernel.org References: <1481824098-5555-1-git-send-email-mauricfo@linux.vnet.ibm.com> Cc: hch@infradead.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, latha@linux.vnet.ibm.com, manjuhr1@in.ibm.com From: Jens Axboe Message-ID: Date: Mon, 19 Dec 2016 08:34:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481824098-5555-1-git-send-email-mauricfo@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 388 Lines: 10 On 12/15/2016 10:48 AM, Mauricio Faria de Oliveira wrote: > The WRITE_SAME commands are not present in the blk_default_cmd_filter > write_ok list, and thus are failed with -EPERM when the SG_IO ioctl() > is executed without CAP_SYS_RAWIO capability (e.g., unprivileged users). > [ sg_io() -> blk_fill_sghdr_rq() > blk_verify_command() -> -EPERM ] Added for 4.10, thanks. -- Jens Axboe