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: <20250530200234.1539571-1-pratap.nirujogi@amd.com>
Date: Fri, 30 May 2025 15:59:49 -0400
From: Pratap Nirujogi <pratap.nirujogi@....com>
To: <rdunlap@...radead.org>, <hdegoede@...hat.com>,
	<ilpo.jarvinen@...ux.intel.com>, <sfr@...b.auug.org.au>,
	<linux-next@...r.kernel.org>
CC: <platform-driver-x86@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<benjamin.chan@....com>, <bin.du@....com>, <gjorgji.rosikopulos@....com>,
	<king.li@....com>, <dantony@....com>, Pratap Nirujogi
	<pratap.nirujogi@....com>
Subject: [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set

When CONFIG_MODULES is not defined, 'adap->owner->name' used in amd_isp4 platform
driver will not be valid and is resulting in build failures.

../drivers/platform/x86/amd/amd_isp4.c: In function 'is_isp_i2c_adapter':
../drivers/platform/x86/amd/amd_isp4.c:154:35: error: invalid use of undefined type 'struct module'
  154 |         return !strcmp(adap->owner->name, "i2c_designware_amdisp");
      |                                   ^~

To fix this issue, I need to make changes both in platform and i2c driver modules.

* In the amd_isp4 x86/platform driver, replace 'adap->owner->name' with 'adap->name', this removes
the hard dependency on 'struct module'.
* In i2c amdisp driver, initialize unique name to i2c adapter and also make a change in
i2c-designware-common to avoid overwriting with generic name when adap->name[] is already set.

Thanks,
Pratap

Pratap Nirujogi (3):
  i2c: designware: Initialize adapter name only when not set
  i2c: amd-isp: Initialize unique adpater name
  platform/x86: Use i2c adapter name to fix build errors

 drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++
 drivers/i2c/busses/i2c-designware-master.c | 5 +++--
 drivers/platform/x86/amd/amd_isp4.c        | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ