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: <cover.1739961770.git.guchongchong@xiaomi.com>
Date: Wed, 19 Feb 2025 18:54:10 +0800
From: Chongchong Gu <chongchonggu21@...il.com>
To: vkoul@...nel.org
Cc: kishon@...nel.org,
	aford173@...il.com,
	linux-phy@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	guchongchong <guchongchong@...omi.com>
Subject: [PATCH v3 0/1] phy: freescale: limit div value in FIELD_PREP()

From: guchongchong <guchongchong@...omi.com>

In fsl_samsung_hdmi_phy_configure_pll_lock_det, the variable named
div becomes 4 after loop. It must less than 4 in function named
FIELD_PREP(REG12_CK_DIV_MASK, div).

A way to reproduce when run the following shell command
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4

The error log is following:
'''
In file included from <command-line>:
In function ‘fsl_samsung_hdmi_phy_configure_pll_lock_det’,
    inlined from ‘fsl_samsung_hdmi_phy_configure’ at drivers/phy/freescale/phy-fsl-samsung-hdmi.c:469:2:
././include/linux/compiler_types.h:542:38: error: call to ‘__compiletime_assert_538’ declared with attribute error: FIELD_PREP: value too large for the field

...

drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion of macro ‘FIELD_PREP’
  344 |  writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
      |         ^~~~~~~~~~
make[5]: *** [scripts/Makefile.build:207:drivers/phy/freescale/phy-fsl-samsung-hdmi.o] error 1
'''

changes in v3
 - Simplified code structure

changes in v2
 - modify the commit message

guchongchong (1):
  phy: freescale: limit div value in FIELD_PREP()

 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ