Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3288097iog; Mon, 27 Jun 2022 12:56:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1utljlXkNtaTj+F6HgCZogFqWl1R7o9TUzV04ogZt+ktyUeR5xcM+nFm6dZ22CKJ1F7LyT2 X-Received: by 2002:a05:6402:5388:b0:435:71b:5d44 with SMTP id ew8-20020a056402538800b00435071b5d44mr18245943edb.364.1656359808959; Mon, 27 Jun 2022 12:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656359808; cv=none; d=google.com; s=arc-20160816; b=J5JXxwFnH467AL2wCIO3ltJ01vnqhPtr0++BKnPv0EUPq5glNgolE5tr1LsKJes3hL Wtxd4ySxLhZhLZ8XOzNxHFWjmNABI31DwfGPkmxaBuDRIje1Egs+HcVaWalGlQZhsYfb vwona4Ws7JocQbjyE4VIGN/F/gbZOai3pBs4uvqYIXqGtPlg+i8f/yKU5i/vsN4dTf8+ tscmLwTtvbUTBctcqurPuCD1Pn9AcGKLhGOkv7BI+J+T0gELOT3jVkK+n7b8yxyubHMK rriMx79mS3VRHAIpiHUq1kXCHi++ZxxpbRgHqLZSSG30YmMpi4CMwhBqogZyeEUUOzis MW1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=sEyIMurSbUDEtnO4sXJJJqiGT9VfNu9mH5Y+RF1zXpM=; b=Va6r4cw947RdiiNMuWR3PKnsMQsxJFNjzU42xspB+lIw8dOtu2o91NGXhjXnH/8t1x b30w0sa1LI7F3xozpm/ZZx/umTR9bMAvhW7LaVUvxGiPgS+YpaIX5Kh7rJp501SLYM/j TIb/ZnRWbEJ8/6Ov5JWIu5WXht5Kr8yxRpS7FNLNpzg6mi8yuvvuCpXFqwVfzttaf0Nx HxzM43Ca+a0RKVXw1NfEQN0SjJvLwNu5xo0jJdT7b9SXrxhEnzOE/pUnRiwgEl1jBZxo Gp0eQ0PrW+SrWQgcMkDxDcbtSSyKUHVrCDo0aSZfSyX98yiIJ0YIV2c3YtbHcnmmZJxn dQ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="Q/XU92Ev"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt5-20020a170907728500b00722a6137b13si1268889ejc.239.2022.06.27.12.56.24; Mon, 27 Jun 2022 12:56:48 -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=@linuxfoundation.org header.s=google header.b="Q/XU92Ev"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240727AbiF0TrH (ORCPT + 99 others); Mon, 27 Jun 2022 15:47:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240725AbiF0TrC (ORCPT ); Mon, 27 Jun 2022 15:47:02 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 815741ADBA for ; Mon, 27 Jun 2022 12:47:00 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id 73-20020a9d084f000000b00616b04c7656so6819083oty.3 for ; Mon, 27 Jun 2022 12:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sEyIMurSbUDEtnO4sXJJJqiGT9VfNu9mH5Y+RF1zXpM=; b=Q/XU92EvXKhdUFHYTfxhesbhCz0S+IitCXqbWL1lwG8PNxG+l+4SrGA2WOvu8Hdddc hxNASREKZON99TgF7gAIPDYD0ndh2+wavjuNnWpuUEeMootx4hkqjxKrR9TgklvfT9DF NCYJjTEFsfdWM9OZUdQ8BfTDKs6pNJBV7n3tU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sEyIMurSbUDEtnO4sXJJJqiGT9VfNu9mH5Y+RF1zXpM=; b=oYrlovojCwRe66S8Yep6fH1p8TS3tVAzUUwcwKayy+6oFnyeXtKWWuL9/RZ9wEsQ4R cnD3BOizqnmdYMBXL63txM88cY0CTfESEM3VkOUjZRXV1whKXCcIrbZTR6hXCoBp52MJ cF4qxoDIiiAY653ko4VCCojaI3TlcCCpTdBqniExtFklH1KyZ+OueVyamR5r3IEPuhUE xh4YPUVr6yCtl99ybM64gWkeEPA8ZaDHowgxwuQncNIRQyH1c7fr9G2ZL4qm4oZRume1 IU3v1PbNJtXJUol5+gaJQbPgfr/IOLF9zHKv3ffdR/R4dWPI7k8A+nkKkStd0l1EZawA hJqg== X-Gm-Message-State: AJIora/FlsNzZX1+9i/0CZYlV2IzQIuiMt6RW44VBwb/azYxi5X8Fieq dv2k0+tjMlbUGI2whsNvfFeLRA== X-Received: by 2002:a9d:76d0:0:b0:60b:53e5:6640 with SMTP id p16-20020a9d76d0000000b0060b53e56640mr6833397otl.241.1656359219758; Mon, 27 Jun 2022 12:46:59 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id h9-20020a056830400900b00616a19aac0bsm6693195ots.51.2022.06.27.12.46.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 12:46:59 -0700 (PDT) Subject: Re: [PATCH v4] kselftests/damon: add support for cases where debugfs cannot be read To: SeongJae Park Cc: SeongJae Park , Gautam , shuah@kernel.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20220627185704.58902-1-sj38.park@gmail.com> From: Shuah Khan Message-ID: <5708a2f6-4555-7bb3-4664-c33fe5b411b1@linuxfoundation.org> Date: Mon, 27 Jun 2022 13:46:58 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220627185704.58902-1-sj38.park@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 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,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 6/27/22 12:57 PM, SeongJae Park wrote: > From: SeongJae Park > > Hi Shuah, > > On Mon, 27 Jun 2022 11:00:18 -0600 Shuah Khan wrote: > > [...] >>>> --- a/tools/testing/selftests/damon/_chk_dependency.sh >>>> +++ b/tools/testing/selftests/damon/_chk_dependency.sh >>>> @@ -26,3 +26,13 @@ do >>>> exit 1 >>>> fi >>>> done >>>> + >>>> +permission_error="Operation not permitted" >>>> +for f in attrs target_ids monitor_on >>>> +do >>>> + status=$( cat "$DBGFS/$f" 2>&1 ) >>>> + if [ "${status#*$permission_error}" != "$status" ]; then >>>> + echo "Permission for reading $DBGFS/$f denied; maybe secureboot enabled?" >> >> btw - does this run as a regular user or does it need root privilege? >> If so add a test for that and skip with a message. > > It needs the root permission, and does the check at the beginning[1]. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/damon/_chk_dependency.sh?h=v5.19-rc4#n9 > > Great. Thank you. I will pull this one in for linux-kselftest next for Linux 5.20-rc1 thanks, -- Shuah