From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C26AC433E6 for ; Sun, 30 Aug 2020 22:05:59 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F24E2083E for ; Sun, 30 Aug 2020 22:05:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="EMwKT7r1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="T47Y7jhT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F24E2083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dlrobertson.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kCVSW-00047D-PP; Sun, 30 Aug 2020 22:05:56 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCVSV-00046w-1I for linux-f2fs-devel@lists.sourceforge.net; Sun, 30 Aug 2020 22:05:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Date:Subject:Message-ID:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=z91g8fIg+PvQLjASNW7CqPwn2yMJVUW/iuztP+VGYLY=; b=EMwKT7r1FK/ZApWK0KPySYCEcj shwz8/qMp84udl3DSafd+DsFUujkPA3zrgonA05TtS03zXLFvbsoZHatvznZO4dRwqmPvD44HQ8rH oZQbN0RH+xkVsFif/C5cw4PfMXdPgrckcBsV7KfPknT/TqJ8w6vGqJcfPqmKEMgChPXE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Date:Subject: Message-ID:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=z91g8fIg+PvQLjASNW7CqPwn2yMJVUW/iuztP+VGYLY=; b=T47Y7jhTHAM+ICKX+jkfPwDNG2 si+RocjrX+b1LRpxG+739BPXvBfspgRN6qDYOWf8lGuvvkIBHZtKb7WZQdySNJ5ZE5hEbNxStKLhd Djp3+xaRWjjFxr/3GiujnjaDe4Y7VV8VzQi4tcB6sFT2AtKyYArRg477k16DtbSuOxOc=; Received: from sender4-op-o14.zoho.com ([136.143.188.14]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.92.2) id 1kCVST-007Nzw-PS for linux-f2fs-devel@lists.sourceforge.net; Sun, 30 Aug 2020 22:05:54 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1598825142; cv=none; d=zohomail.com; s=zohoarc; b=YMVozuJ+xTd43g3cB2C03H8tfbTNXQuVxF+MBSyrfhoj1An//UGucSskRq+Sjjr/3AMfcvRX4ApBUR7EZTxteyfEHy0VtukMSEUnVUmTpfClLBWu4B2fSDafK6/pC7qqrPTVxAtJJQrnK0IasmSFPwGc06YILxwolaQGOgCiOKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598825142; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=z91g8fIg+PvQLjASNW7CqPwn2yMJVUW/iuztP+VGYLY=; b=f9M4cSK0Z00NUlZJH0JRB5mya1HiuZNyialD/r+1+p0nCDkrquRnW08OTicoiAXmVoOOozi0CVWLkYt73gvJT4FUjGFUQFO1YAMDqW9QhCed50CohwHP/c/bUfLSId6S2a/fPFVwDfLyjg57bPr3mp672sem/Y/RYomA5z7kgtA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass smtp.mailfrom=dan@dlrobertson.com; dmarc=pass header.from= header.from= Received: from nessie.verizon.net (pool-108-28-30-30.washdc.fios.verizon.net [108.28.30.30]) by mx.zohomail.com with SMTPS id 1598825142430415.2371592589752; Sun, 30 Aug 2020 15:05:42 -0700 (PDT) From: Dan Robertson To: Jaegeuk Kim , Chao Yu Message-ID: <20200830214523.7417-1-dan@dlrobertson.com> Date: Sun, 30 Aug 2020 21:45:22 +0000 X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-ZohoMailClient: External X-Headers-End: 1kCVST-007Nzw-PS Subject: [f2fs-dev] [PATCH v3 0/1] f2fs: check position in move range ioctl X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dan Robertson , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net Changes in v3: - Check the input position as well as the output position. Changes in v2: - Moved check of output position before we lock the source or destination inode. If a negative value is provided as the output position to the F2FS_IOC_MOVE_RANGE ioctl, f2fs_get_dnode_of_data may hit a memory bug like the following: BUG: unable to handle page fault for address: ffffed10b30435a4 [...] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009) ... [...] Call Trace: f2fs_get_dnode_of_data+0xa68/0xde0 [...] f2fs_reserve_block+0x3b/0x230 f2fs_get_new_data_page+0xf0/0x8b0 ? f2fs_get_lock_data_page+0x1f0/0x1f0 ? rwsem_down_write_slowpath+0x8d0/0x8d0 ? rwsem_down_read_slowpath+0x830/0x830 ? ___might_sleep+0xba/0xd0 ? f2fs_get_lock_data_page+0x17a/0x1f0 __exchange_data_block+0x11bf/0x24d0 ? f2fs_ioc_release_volatile_write+0x170/0x170 ? __might_sleep+0x31/0xd0 ? ___might_sleep+0xba/0xd0 ? rwsem_down_read_slowpath+0x830/0x830 ? __init_rwsem+0xa0/0xa0 f2fs_ioctl+0x469c/0x6980 Dan Robertson (1): f2fs: check position in move range ioctl fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel