Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2218918imb; Sun, 3 Mar 2019 22:40:58 -0800 (PST) X-Google-Smtp-Source: APXvYqw11vW6ffu/u48be3OtFBy9Fvx83NUNDPFS2kUM3P5JEaQddcILpl6TGJNJ2NmBr4500Y/h X-Received: by 2002:a63:6cc1:: with SMTP id h184mr17323351pgc.151.1551681658571; Sun, 03 Mar 2019 22:40:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551681658; cv=none; d=google.com; s=arc-20160816; b=vs9rIDDLCB6cx8g6b6zXK2R6wnf20gzZd/SYEicP9t/YIG6+jBOxW+Gb+oF18ULyRO lOxtjkCuxmj6W/FGjE6gZ4LltrJ0RZF31M1Nl0a64cUSYSeBLYmQBPAHxVCBu6CcIifW jRgKCFGg8StOkuc3Kcs4SHI0KfAiRkSfBvk19qmZ66k+LbQYy0gV2fYtOOeEyEs5jWDA NT3rbKvNqqTybdn/lfdt34L2pZQHsiZwv8HKWKnKm0/tgNAWfAHM0PKzWYzsDDe3Ygec +8+1oF+y1s+bcK1NlKDJE4khzVyE2J89TkriCPv+0B005HVXuVIbwSe7Mi1AowW+HyY0 hEqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=7pkjP5TcKrndb06yunykilIbDWIF+vCpKHJVPOJ+F6k=; b=w00D7fAMLSLPgR20pPrWnxdiJZBHgEtmpHD4HM/HBaMasZNO478OkYfR1Nxy4syuZ0 BNhsdnI7z9kWxuiLZ77wwFseg6oZYz96Hj7yG/mIq2QSmDNlcVbW8xC4BTAS5JKtxgeL 8qn8wSNWy0OQfV8iYQQ3dk/N9zFeW9PDUF6NxYBs1GYQwmBIBvCpvCQ0xLw/8QmCIP4D Zb5raYeKqWg1d5jpYu+4+hcnlYn31HKTOiLWbHf1gu/GeiOowhlPB5Z3wichUKJ9guFF kb29M9LJBJ+LIZhpJ24SAjcEvoP092Wa5yd/pF5GiMOROLFftvn02jaABhRuFjDDBTRs CYhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si4796849plc.241.2019.03.03.22.40.43; Sun, 03 Mar 2019 22:40:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726037AbfCDGjL (ORCPT + 99 others); Mon, 4 Mar 2019 01:39:11 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:4206 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725981AbfCDGjL (ORCPT ); Mon, 4 Mar 2019 01:39:11 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C1861CF945D3A53BC3A4; Mon, 4 Mar 2019 14:39:09 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Mon, 4 Mar 2019 14:39:06 +0800 Subject: Re: [PATCH v2] f2fs: fix to check inline_xattr_size boundary correctly To: Chao Yu , CC: , References: <20190214160825.4973-1-chao@kernel.org> From: Chao Yu Message-ID: <82ef0ff8-452c-1894-6776-41c70ad7654b@huawei.com> Date: Mon, 4 Mar 2019 14:39:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190214160825.4973-1-chao@kernel.org> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jaegeuk, On 2019/2/15 0:08, Chao Yu wrote: > --- > v2: > - fix lower bound check, inline xattr size should be larger than > xattr_header's size at least. ... > + if (F2FS_OPTION(sbi).inline_xattr_size < > + sizeof(struct f2fs_xattr_header) / sizeof(__le32) No sure we should set this low bound as above... now I guess original non-zero check is enough. How do you think of setting inline_xattr_size range as (0, MAX_INLINE_XATTR_SIZE]? Thanks,