Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp312656rdd; Tue, 9 Jan 2024 05:09:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXjw3tA2gi7f0z7P4NpH0WwLANBCW7MPFkF8wCUbqfZiXbLjfROBNQ07U9iqvGkT1gckRg X-Received: by 2002:a05:6e02:1445:b0:360:7bff:df56 with SMTP id p5-20020a056e02144500b003607bffdf56mr6560467ilo.22.1704805765633; Tue, 09 Jan 2024 05:09:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704805765; cv=none; d=google.com; s=arc-20160816; b=lBm9lCJG6BWK2Ezs4kTLXTR76cUfz5Jz4gKNhX8PONyxXp7FEG4ahu1xaz3y2IU8rd 1arF85V04QEqIWXfn22lIT4OGtS/aOLcZnbtHKS+n1VvmQB6U6zguvyLQCZymz064xDh TaFb15tIEup+Zg7OShuuoSqiAk/MluSv5LemK4CNOEbCZb6U5ceEES9S7+EmmY0j2svb xvzFzDbZr6eSG/6SPeybsBwjJpX44h0gkkfpyYOZlBp5sdyDQ+PkNh2NcUKiczshJD8m KoA8DvkQP6vmWGeAfAan5ztJbPXLBYEhNaDLr8zzT0/ocNm4pGTOx/elyUEK5ChUtN6W 90bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=/svxzZmIh8j0CHFFINhIgyBxdrk96PaZOTl+A6ApJOM=; fh=nSKpcQO5ryQlQONbHVfJs9SgTc/wuYdAkwcSZWFFeQg=; b=SAHoQ6a98dO1Ku3QlcvGhGlHaMyzKVmHdbwH4sKB5nhyGLAehlNgxaDdSZP9ITjt9Y 3TR7NHhuq/AMmY5pVqNNGaIqwHM8Cb5kV1vLr1ZMGawwYdsWagnh8rFrVeZD8hqxQLcg RPqy3wA0AnUo80lZGyuONiZBuiiEl/Me9WQzZwLRMkXw595Xp6prqsnWfq9fO+FtWx2z noINlKxC5GbIKHeY2+WtWxw7vwaKDseC+tMiATQXTcADkp0ukS6mPoTsvrQhB9lGKp+7 9pbwJVrcqW9wLd8/zgGfT2df0oHNsX7NhWROTpASORd+484IAXyh76XPT2Osd4DBmvvY swUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j192-20020a638bc9000000b005cdde8425cfsi1375603pge.611.2024.01.09.05.09.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:09:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs+bounces-990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 169A3282DEA for ; Tue, 9 Jan 2024 13:09:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0759E38F84; Tue, 9 Jan 2024 13:09:20 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCDB238DE9; Tue, 9 Jan 2024 13:09:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=27;SR=0;TI=SMTPD_---0W-IeJTb_1704805422; Received: from 192.168.33.9(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W-IeJTb_1704805422) by smtp.aliyun-inc.com; Tue, 09 Jan 2024 21:03:44 +0800 Message-ID: Date: Tue, 9 Jan 2024 21:03:39 +0800 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/6] cachefiles: Fix signed/unsigned mixup To: David Howells , Christian Brauner , Jeff Layton , Dominique Martinet Cc: Steve French , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , kernel test robot , Yiqun Leng , Jia Zhu References: <20240109112029.1572463-1-dhowells@redhat.com> <20240109112029.1572463-6-dhowells@redhat.com> From: Gao Xiang In-Reply-To: <20240109112029.1572463-6-dhowells@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/1/9 19:20, David Howells wrote: > In __cachefiles_prepare_write(), the start and pos variables were made > unsigned 64-bit so that the casts in the checking could be got rid of - > which should be fine since absolute file offsets can't be negative, except > that an error code may be obtained from vfs_llseek(), which *would* be > negative. This breaks the error check. > > Fix this for now by reverting pos and start to be signed and putting back > the casts. Unfortunately, the error value checks cannot be replaced with > IS_ERR_VALUE() as long might be 32-bits. > > Fixes: 7097c96411d2 ("cachefiles: Fix __cachefiles_prepare_write()") > Reported-by: Simon Horman > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202401071152.DbKqMQMu-lkp@intel.com/ > Signed-off-by: David Howells > Reviewed-by: Simon Horman > cc: Gao Xiang > cc: Yiqun Leng > cc: Jia Zhu > cc: Jeff Layton > cc: linux-cachefs@redhat.com > cc: linux-erofs@lists.ozlabs.org > cc: linux-fsdevel@vger.kernel.org > cc: linux-mm@kvack.org It looks good to me, Reviewed-by: Gao Xiang Thanks, Gao Xiang