lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220331072843epcms2p5c9e7ee4756d1aa267cf4af56b0ca22fc@epcms2p5>
Date:   Thu, 31 Mar 2022 16:28:43 +0900
From:   Sang Min Kim <hypmean.kim@...sung.com>
To:     "bzolnier@...il.com" <bzolnier@...il.com>,
        "krzk@...nel.org" <krzk@...nel.org>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "amitk@...nel.org" <amitk@...nel.org>,
        "rui.zhang@...el.com" <rui.zhang@...el.com>,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        "edubezval@...il.com" <edubezval@...il.com>
CC:     "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-samsung-soc@...r.kernel.org" 
        <linux-samsung-soc@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] thermal: exynos: fix masking value for exynos7
 temp_error

 
Modify mask value for the temp_error in the sanitize_temp_error() function.
 
Fixes: aef27b658b43 ("thermal: exynos: use sanitize_temp_error() in exynos7_tmu_initialize()")
masked temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) value even in the case
of EXYNOS7.
In addition, when entering the if statement, both temp_error1 and 2 are
masked with EXYNOS_TMU_TEMP_MASK(0xff).
 
By modifying to use the previously declared local variable tmu_temp_mask,
the mask value suitable for the SOC can be applied.
 
Signed-off-by: sangmin kim <hypmean.kim@...sung.com>
---
 V1 -> V2: Add fixes tag
 
 drivers/thermal/samsung/exynos_tmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index f4ab4c5b4b62..08c63fe5566e 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -243,17 +243,17 @@ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
 
         data->temp_error1 = trim_info & tmu_temp_mask;
         data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) &
-                                EXYNOS_TMU_TEMP_MASK);
+                                tmu_temp_mask);
 
         if (!data->temp_error1 ||
             (data->min_efuse_value > data->temp_error1) ||
             (data->temp_error1 > data->max_efuse_value))
-                data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK;
+                data->temp_error1 = data->efuse_value & tmu_temp_mask;
 
         if (!data->temp_error2)
                 data->temp_error2 =
                         (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) &
-                        EXYNOS_TMU_TEMP_MASK;
+                        tmu_temp_mask;
 }
 
 static int exynos_tmu_initialize(struct platform_device *pdev)
--
2.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ