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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7FD7C433FE for ; Wed, 19 Oct 2022 12:50:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232955AbiJSMug (ORCPT ); Wed, 19 Oct 2022 08:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232645AbiJSMt1 (ORCPT ); Wed, 19 Oct 2022 08:49:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05111E4E78 for ; Wed, 19 Oct 2022 05:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666182679; 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=vdyF20motJAcGwhEZFkcIJUXHpFy/FT1+InzXbprcxQ=; b=dixvTUWCpV1hNhuHHlJ50BYnYtd/ddnmCoHXZ514wlPMuDCvbASEEEDf1MssVsrI8HKOwG QxMlYrOuLspN+TZb6Mm6kHk1+mmcXccin+pncRouof9GTFMmwBN1JFPBVFOgO1VvAHm5WT f/ifio+UAaHNX54DQPqfdEvViBMvYgU= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-407-WmHMVIgUOui7gcB0b9uwRw-1; Wed, 19 Oct 2022 08:31:18 -0400 X-MC-Unique: WmHMVIgUOui7gcB0b9uwRw-1 Received: by mail-wr1-f69.google.com with SMTP id j8-20020adfa548000000b0022e2bf8f48fso5581650wrb.23 for ; Wed, 19 Oct 2022 05:31:18 -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:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vdyF20motJAcGwhEZFkcIJUXHpFy/FT1+InzXbprcxQ=; b=PhJSlRgAoJrByQbY5TFQXiK+M2vKyy90sQdjsSkd0C4MlC6RKui8tBgaNr3UutVggU y95NgyazaXk/+2D3c7VjAHFzaa2KymH4peEPlVy/4nXbTmCygxBNZ72OjjilQ1fPEYeQ pl/FpJoAPGWOlnWvMq2SvxiGJAkfzDKhjgpv0KUyStSNt9mnxngP6njajblhIpnIJr6s 3qo7bmDWjyRQLPq+n0ekQL49UhTWXBIPPJrboGJfzsEFQLU6PvZCgA0QFRkUQvWKod+2 amQ4vTbpxAtBXVf73DYvUQvulmdL3y/4ijNtMW5I/kLhh+VUdXrzcca5FDTJGWfPgb0b 07iA== X-Gm-Message-State: ACrzQf33CxLPjSEpriM6hOUL8I4N20HpP8zEB23OjVBVhZDjtyPvLgxx FRyEThEt5QDpCKUtQzeq2QfNn/NVdToAZNx6cZtZR6TJ9p7bzy+ap4z5GV1llbJCPXMDpzVN8DG TE4jipx7JxHE/n8Brl/+Q6uXYt8IdoZOd4vE81h+BySbKYXfDYtUwkHb5BoklmpLawPZ4hu5A X-Received: by 2002:adf:e2d2:0:b0:22f:6a2a:92ab with SMTP id d18-20020adfe2d2000000b0022f6a2a92abmr4785885wrj.545.1666182677393; Wed, 19 Oct 2022 05:31:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6vpRf1nx8zR6YQpm368M0MQZZnl74qgOl7S9XqjCF6QToT5rTsmXN0Wg87YGXaLyxnO8ihgw== X-Received: by 2002:adf:e2d2:0:b0:22f:6a2a:92ab with SMTP id d18-20020adfe2d2000000b0022f6a2a92abmr4785851wrj.545.1666182677037; Wed, 19 Oct 2022 05:31:17 -0700 (PDT) Received: from ?IPV6:2003:cb:c707:2c00:d4ac:d2c:4aee:dac1? (p200300cbc7072c00d4ac0d2c4aeedac1.dip0.t-ipconnect.de. [2003:cb:c707:2c00:d4ac:d2c:4aee:dac1]) by smtp.gmail.com with ESMTPSA id u5-20020a5d5145000000b00232251d71c7sm13533415wrt.68.2022.10.19.05.31.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 05:31:16 -0700 (PDT) Message-ID: <74adbb51-6e33-f636-8a9c-2ad87bd9007e@redhat.com> Date: Wed, 19 Oct 2022 14:31:15 +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 7/7] selftests/vm: anon_cow: add R/O longterm tests via gup_test Content-Language: en-US To: linux-kernel@vger.kernel.org, Andrew Morton Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, 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-8-david@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220927110120.106906-8-david@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.09.22 13:01, David Hildenbrand wrote: > Let's trigger a R/O longterm pin on three cases of R/O mapped anonymous > pages: > * exclusive (never shared) > * shared (child still alive) > * previously shared (child no longer alive) > > ... and make sure that the pin is reliable: whatever we write via the page > tables has to be observable via the pin. > > Signed-off-by: David Hildenbrand > --- The following on top should silence the warning on 32bit: https://lore.kernel.org/all/202210182101.XOyPZEQV-lkp@intel.com/T/#u diff --git a/mm/gup_test.c b/mm/gup_test.c index 2bbfacd31f5a..57c343f2dc51 100644 --- a/mm/gup_test.c +++ b/mm/gup_test.c @@ -299,7 +299,8 @@ static inline int pin_longterm_test_read(unsigned long arg) for (i = 0; i < pin_longterm_test_nr_pages; i++) { void *addr = page_to_virt(pin_longterm_test_pages[i]); - if (copy_to_user((void __user *)user_addr, addr, PAGE_SIZE)) + if (copy_to_user((void __user *)(unsigned long)user_addr, addr, + PAGE_SIZE)) return -EFAULT; user_addr += PAGE_SIZE; } -- Thanks, David / dhildenb