Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8016957rwi; Tue, 25 Oct 2022 01:03:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+z0Dv0zko6H8t96NOvze07XGvlxvXEp7FjuToKB0tzuJD/h6zNyT8v+anZyBj1DpOpEny X-Received: by 2002:a05:6402:e87:b0:456:c93c:5361 with SMTP id h7-20020a0564020e8700b00456c93c5361mr33624536eda.88.1666684997393; Tue, 25 Oct 2022 01:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666684997; cv=none; d=google.com; s=arc-20160816; b=ZBrC4Vr241yVtWzGXxw+YuQ7JmUbZkE/jq4SxijcqVolrcpjtAxhzIKpoXO9NOpvCc wbSNviXO8EkkMcmaDFR8YWSnaXngaM7Lm3Ll4/Tgub7n5WNiDWSYPzeW3krjpqbBrDPr a3xbUtlY87F4n8fyZTdEab01UwW7d8kbSNnWt7zwUU9EPwVDtbKXJsjYWI2oqZKbASxI USKqjnQR4WW4t2VlWKYtiVYIiw1UAU4z1TK08ckdEs2LbsEr93X2tQev/YGBB8239Bym ignNDgVrCBblIbUasOVpBM63IYjjsnU13t3JWhjgumeFEXtCttAwqpmpf0s1wKBOWODF 3X5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=fe1WZpWI0+WNHlpXUbrxZSAOPfSw/3F9thWPXoPIAVs=; b=Krf3hH68UtNWmIV1eB3CViHY6DsaPylSt6neuWNKSuLcAgEmpD9L6GzcCMPZ6t60UL awxOzWoZHBM2JpfojjeH7+sAZPNygAAAPo5jKVelOZc3MyTpM9KFnVokW9VMgV+2JZC9 5QLDg0FRqrYUaChfCFw2/7cn+zPoQlWQkqpjs3SFegjmgAh4yxEOrLIBOw9gMP0MOd23 KRNnuxuylyDg+BXd6JZ7Cg6qgm+iOakggRCCUrcFST/7EzjVeHAxIKEJZ6tMWMf0Je7r qjzS85APcRcTbVzypqAU+7rsFbkC1E9SjBqeMZvXOU6rPZtlxqPF3G3FEnxlneo5ledD v43Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AtGwgNSD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a056402084a00b00459dc4e4b7fsi2531067edz.143.2022.10.25.01.02.52; Tue, 25 Oct 2022 01:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AtGwgNSD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbiJYHFq (ORCPT + 99 others); Tue, 25 Oct 2022 03:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231408AbiJYHFm (ORCPT ); Tue, 25 Oct 2022 03:05:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B3B4A806 for ; Tue, 25 Oct 2022 00:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666681539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fe1WZpWI0+WNHlpXUbrxZSAOPfSw/3F9thWPXoPIAVs=; b=AtGwgNSDpIm6obnesW0L75VfF3/OFXAOFVlnGfOlzJwPclzWBj9C642Ii5LsyTmP4n4Dru fLFmO7yAMl5rRXEYbCD7ehSCq5t8ixS+yi5LqHMWt29BWsjji6YpigbatbPur4npfOzw3S qP+yE7iQTftUUtIiMVeXfNG1od7uz9c= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-542-B6uGGz2ANlqrM-3qyV8Hmw-1; Tue, 25 Oct 2022 03:05:37 -0400 X-MC-Unique: B6uGGz2ANlqrM-3qyV8Hmw-1 Received: by mail-wr1-f71.google.com with SMTP id h18-20020adfa4d2000000b00236584fc8c7so3642456wrb.7 for ; Tue, 25 Oct 2022 00:05:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fe1WZpWI0+WNHlpXUbrxZSAOPfSw/3F9thWPXoPIAVs=; b=ff5gPjp0KxwuIIV0V2jnflhwqIeU7gMuqBcEQ7yXoku9azP6mtMAlFbkcnAu1uuHcs yrOhMcVmphj309/5ZRFKfE88htJdbQ9nOooBtM9lDnjv9otKZWoXACXmZqKZULbhg7l4 DvzG/mYNz2zUspciRZhGuq/ZTn+OCSi9Wlqnjbvtdp0oJe65oJ3+1U81uHiyXaCazNWY RnGGED6UyzqKhVAX3WRVjMIcGumV13JVk2Wp+yfI6/nowIt/mbMlfHZ4thZtyU5uoS3C NWewwQgYeHl7/2y1zrg6XwM6dp3GVl6qvK8J1HDhmNWAi5aB6Y7L6dlAdX8k3GYdd6Q4 fOkA== X-Gm-Message-State: ACrzQf06ZuWnwub5007Ye7Y8DU8tlAE3iUh0SgbDRP52fbVezytpLecr dMCfCPV04AvIKzoB/tU0LWhq/N1bjRrA23bojGI9RkuHXcczHtYMX8JtxtNsY8xfMHsqj9n/MgP wcO5hO5t6GlnuReHS3OgvQXGQ X-Received: by 2002:a5d:6d8a:0:b0:236:6123:a8a5 with SMTP id l10-20020a5d6d8a000000b002366123a8a5mr9839557wrs.229.1666681536432; Tue, 25 Oct 2022 00:05:36 -0700 (PDT) X-Received: by 2002:a5d:6d8a:0:b0:236:6123:a8a5 with SMTP id l10-20020a5d6d8a000000b002366123a8a5mr9839535wrs.229.1666681536103; Tue, 25 Oct 2022 00:05:36 -0700 (PDT) Received: from ?IPV6:2003:cb:c70b:4e00:3efc:1c60:bc60:f557? (p200300cbc70b4e003efc1c60bc60f557.dip0.t-ipconnect.de. [2003:cb:c70b:4e00:3efc:1c60:bc60:f557]) by smtp.gmail.com with ESMTPSA id h20-20020a1ccc14000000b003b492753826sm1686070wmb.43.2022.10.25.00.05.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Oct 2022 00:05:35 -0700 (PDT) Message-ID: Date: Tue, 25 Oct 2022 09:05:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v1 1/7] selftests/vm: anon_cow: test COW handling of anonymous memory To: Rafael Mendonca Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, Andrew Morton , Shuah Khan , Jason Gunthorpe , John Hubbard , Nadav Amit , Peter Xu , Andrea Arcangeli , Vlastimil Babka , Mike Rapoport , Christoph von Recklinghausen , Don Dutile References: <20220927110120.106906-1-david@redhat.com> <20220927110120.106906-2-david@redhat.com> Content-Language: en-US From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> + /* See if we still read the old values via the pipe. */ >> + for (total = 0; total < transferred; total += cur) { >> + cur = read(fds[0], new + total, transferred - total); >> + if (cur < 0) > > Hi David, > I was looking at some coccinelle reports for linux-next and > saw the following warning for this comparison: > > WARNING: Unsigned expression compared with zero: cur < 0 > > I think 'cur' needs to be of type 'ssize_t' for this comparison to work. > > The same warning is reported for the variable 'transferred' above, and > also for do_test_iouring() and do_test_vmsplice_in_parent() in > "selftests/vm: anon_cow: add liburing test cases". > Thanks for reporting! Indeed, we need a signed value. -- Thanks, David / dhildenb