Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2596825rdh; Mon, 30 Oct 2023 01:54:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFf4g3IIqsD9SnUlDBu/23hlcJhENmzG5ss94gLMf+qD0CDDTiKriz9aTsohEGa6p6UGu8W X-Received: by 2002:a17:903:11cf:b0:1ca:362b:166c with SMTP id q15-20020a17090311cf00b001ca362b166cmr7835816plh.61.1698656098280; Mon, 30 Oct 2023 01:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698656098; cv=none; d=google.com; s=arc-20160816; b=ej2yUdBonOBQaNKf3QhG04de0QoBmvCaP2znMTdgli2MvQwUvNtGEZex3ffnr5nWU4 XPN15Q0R6FuqrbaX7UC9/vZTOMbrF2sEdwqRruNAKGD+k7AgRksH3wlFObJy4kku/AgB /1nvQFTjZI1ir53llRKQ2zz9VvmSILUBStO9z69zKsHMhReifn0Z8G5Fr69+1lvnEG/Q lvNtatDS9TLiFMkOcBgw6TnhogN6s/bjaDno8D7UpzUiFvJ8PV3qLCj1+K24UpAXULWO WnPHcCqaFy9jsYDQWDwCLy9KJ4eszINJYaCLTOuDIfYozfW4Js6nDArl+wTEH1QNH+Ka DfhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=BJRzdFx9wrWlCa+OkPx4gynROJoS7IAt0rXCos2lNNc=; fh=Iof8+H3kY95kAHvIGg18hTfV4DGbcRQ7/a/cIINaayk=; b=Plj68LeNA02FDCAN+j/5Ldln2xDtyuLsvzBlSSYllRtuGknELPxEA+h1iRhYK0noDE pcPSBIKPVWwhN1T0YFqP5ala5twnDTKFZQmwUh8c/In4kgK8PL1NsKYtTZRyiLZlownj /rfeaXex5dG40gnhsXDThXUTsXKs9tw0NXxn3PMtQDD7mADqJwZr5QlteW1DkSKGcZMo ri+xvmlu34OGWPkwkFncUIy5Gk4Rma5KiifuZwlinYtvoz3XQy414n5UoRENMXhifN0F vcuc9cWiW9atv9UTSFfdeyzs4UTx0hLMFB0j4AKjXYwpS6887ZiKUvDs9dMwhZVFXln1 KYSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=cn+rmzhl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id kp8-20020a170903280800b001c9d03042b6si2526543plb.7.2023.10.30.01.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 01:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=korg header.b=cn+rmzhl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20A948051162; Mon, 30 Oct 2023 01:54:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232299AbjJ3Iyu (ORCPT + 99 others); Mon, 30 Oct 2023 04:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbjJ3Iyt (ORCPT ); Mon, 30 Oct 2023 04:54:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9707494; Mon, 30 Oct 2023 01:54:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPS id 3F9DEC433C7; Mon, 30 Oct 2023 08:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.dev; s=korg; t=1698656086; bh=Y6RkweAiaJcVTeeS6WX5S7GACsI1tkgdNxGrycq560I=; h=From:Date:Subject:To:Cc:From; b=cn+rmzhle65x84iyJBGFRYCM2SAQk6RZcrLyMpA0vG4eQkzCnT94mAodYULDbIJHP kTk1MQvNbEo7Y+DyDz3wOOafQ8FCAN5+0dg0GMXigbyOxhBNoXvfNcWPyjEW0bL88P Crlsmg8Y44fGHA6XivePoPKWiIhN/LW3EyfSEkoU= Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15061C4332F; Mon, 30 Oct 2023 08:54:46 +0000 (UTC) From: Itaru Kitayama Date: Mon, 30 Oct 2023 17:54:45 +0900 Subject: [PATCH] Lower the ptrace permissions so that the memfd_secrect test program runs without an issue. MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231030-selftest-v1-1-743df68bb996@linux.dev> X-B4-Tracking: v=1; b=H4sIAFRvP2UC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2NDA2MD3eLUnLSS1OIS3WRz0yTDJBMzAwtDcyWg8oKi1LTMCrBR0bG1tQB ajs+YWgAAAA== To: Andrew Morton , Shuah Khan Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Itaru Kitayama X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698656085; l=1171; i=itaru.kitayama@linux.dev; s=20231030; h=from:subject:message-id; bh=0yXLvAw3hkhizEEQX735jRdYWkFus1UusgKEaYjOuWM=; b=89ytidZI13PJru53wdET0bYxdvD3UHcUSfWSvoeULHl5lYVnnUAZXTBUz7i3iDUa7HYr/SDzo 9SsAc+E87oFCrEQEpJS+9zCDSPF8qhi3AinWq3wst4TTeAt6gA+9RPt X-Developer-Key: i=itaru.kitayama@linux.dev; a=ed25519; pk=4yYhz2CbKL7F2qR5IzP7QvqM9B6c+dfWJRHWez+rMDw= X-Endpoint-Received: by B4 Relay for itaru.kitayama@linux.dev/20231030 with auth_id=92 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 01:54:56 -0700 (PDT) --- On Ubuntu and probably other distros, ptrace permissions are tightend a bit by default; i.e., /proc/sys/kernel/yama/ptrace_score is set to 1. This cases memfd_secret's ptrace attach test fails with a permission error. Set it to 0 piror to running the program. Signed-off-by: Itaru Kitayama --- tools/testing/selftests/mm/run_vmtests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh index 3e2bc818d566..7d31718ce834 100755 --- a/tools/testing/selftests/mm/run_vmtests.sh +++ b/tools/testing/selftests/mm/run_vmtests.sh @@ -303,6 +303,7 @@ CATEGORY="hmm" run_test bash ./test_hmm.sh smoke # MADV_POPULATE_READ and MADV_POPULATE_WRITE tests CATEGORY="madv_populate" run_test ./madv_populate +echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope CATEGORY="memfd_secret" run_test ./memfd_secret # KSM KSM_MERGE_TIME_HUGE_PAGES test with size of 100 --- base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa change-id: 20231030-selftest-c75b1b460817 Best regards, -- Itaru Kitayama