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>] [day] [month] [year] [list]
Message-Id: <20250210080217.2772467-1-suhui@nfschina.com>
Date: Mon, 10 Feb 2025 16:02:18 +0800
From: Su Hui <suhui@...china.com>
To: wsa+renesas@...g-engineering.com
Cc: Su Hui <suhui@...china.com>,
	linux-i2c@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [PATCH] i2c: core: mark i2c_detect_address noinline_for_stack

When compile with CONFIG_FRAME_WARN=1024, there can be a warning:

drivers/i2c/i2c-core-base.c: In function ‘i2c_detect.isra’:
drivers/i2c/i2c-core-base.c:2507:1: warning: the frame size of 1028 bytes
is larger than 1024 bytes [-Wframe-larger-than=].
 2507 | }
      | ^

Mark i2c_detect_address() noinline_for_stack to avoid this warning.

Signed-off-by: Su Hui <suhui@...china.com>
---
ps: found this warning during running randconfig test.

 drivers/i2c/i2c-core-base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 5546184df05f..59983d2a9cca 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -2405,8 +2405,8 @@ static int i2c_default_probe(struct i2c_adapter *adap, unsigned short addr)
 	return err >= 0;
 }
 
-static int i2c_detect_address(struct i2c_client *temp_client,
-			      struct i2c_driver *driver)
+static noinline_for_stack int i2c_detect_address(struct i2c_client *temp_client,
+						 struct i2c_driver *driver)
 {
 	struct i2c_board_info info;
 	struct i2c_adapter *adapter = temp_client->adapter;
-- 
2.30.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ