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 X-Spam-Level: X-Spam-Status: No, score=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36989C432BE for ; Mon, 26 Jul 2021 20:04:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18BF760F6D for ; Mon, 26 Jul 2021 20:04:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232521AbhGZTYO (ORCPT ); Mon, 26 Jul 2021 15:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231570AbhGZTYN (ORCPT ); Mon, 26 Jul 2021 15:24:13 -0400 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A620FC061760 for ; Mon, 26 Jul 2021 13:04:40 -0700 (PDT) Received: by mail-oi1-x22f.google.com with SMTP id t128so12377607oig.1 for ; Mon, 26 Jul 2021 13:04:40 -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=y8qxPhXibeauL3TNJ0rA0BM5c6Te/qTP5D2t4SuhdGk=; b=ShogC7f4yg6AU4ZuvXIJ6iZ2WCzGWAz7XPkIhO4mTtkCm+v3G8CM6P4Q1lXW5rn5d2 9tcKWxpTA5Qap0eV/ivdZJYBpN4AO8YKue4OBZs8NMNpPiAHDsopFPJZ5lTrtYeyIdg+ DDSxOIQCoxDh9oH3d8SViB29WrZNv/IBHXqOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=y8qxPhXibeauL3TNJ0rA0BM5c6Te/qTP5D2t4SuhdGk=; b=SNxWgz5dJscCCGnf/D1nKcooBAtztOUE7hxV8VN91XrMNWkUHPbqs9esJVlUxUzYhd LOh/nZZqZqM38VdU3htAvxx/WqtyJl8lpOu42J8jnGtwKLKrndm0zszTJJQOV5OVSdHg V+gMxv8QV3Aj1/iELdAP94u8vgndR2zs84sGNQdhkDb7w3jPVDXziJIG4ZqRsMg3+XXl Ep2oAJmI5hybxcO/tQhnfpv3X2tBtVB/QY38soI5eifululujRtzBeVUSMtKopAH73bF 7Zfcezsas9H9CwzTWypzrkstaCwJlftkEXPdSLlXWkASRMWIIgHv4ah7YEBM0jcznqAf p+Ww== X-Gm-Message-State: AOAM531XivYnAPN/aZi2HA1fVfJ51RseUUKo9YxqQJFdAfE9ac3sSiaP MfjEE5Ef6YmF2NVlWadeEmhhKw== X-Google-Smtp-Source: ABdhPJx290csJRp5Q9NvP/HUN2LMB44B/K1xiseY90PzZsY0ECUjGoEAo/6RawBwyGx0xv9yWM8BKg== X-Received: by 2002:aca:c40a:: with SMTP id u10mr468462oif.111.1627329880111; Mon, 26 Jul 2021 13:04:40 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id v7sm132569ooj.46.2021.07.26.13.04.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 13:04:39 -0700 (PDT) Subject: Re: [PATCH v5 2/2] cpupower: Fix to return negative value if no permisssion for read_msr To: =?UTF-8?B?5b6Q56aP5rW3?= , shuah@kernel.org, Thomas Renninger Cc: xufuhai , lishujin@kuaishou.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: From: Shuah Khan Message-ID: <2d0dd861-b62e-5bb0-79ba-0be05f0d6028@linuxfoundation.org> Date: Mon, 26 Jul 2021 14:04:38 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/23/21 12:26 AM, 徐福海 wrote: > From: xufuhai > > If the read_msr function is executed by a non-root user, the function returns > -1, which means that there is no permission to access//dev/cpu//%d/msr, but > cpufreq_has_boost_support should also return -1 immediately, and should not > follow the original logic to return 0, which will cause amd The cpupower tool > returns the boost active state as 0. > > Reproduce procedure: > cpupower frequency-info > > Reported-by: yangrui > Signed-off-by: xufuhai > Signed-off-by: chenguanqiao > Signed-off-by: lishujin Please use your full names for the Signed-off-by - similar to the way you would sign a legal document. thanks, -- Shuah