Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1591302 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-03-02 18:20 +0100 |
| Last post | 2017-03-02 18:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 16/26] [media] i2c: adv7604: mark register access as noinline_for_kasan Arnd Bergmann <arnd@arndb.de> - 2017-03-02 18:20 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-03-02 18:20 +0100 |
| Subject | [PATCH 16/26] [media] i2c: adv7604: mark register access as noinline_for_kasan |
| Message-ID | <tgCyu-5uu-5@gated-at.bofh.it> |
When building with KASAN, we get a stack frame size warning about a function
that could potentially cause a stack overflow:
drivers/media/i2c/adv7604.c: In function 'adv76xx_log_status':
drivers/media/i2c/adv7604.c:2615:1: error: the frame size of 3248 bytes is larger than 3072 bytes [-Werror=frame-larger-than=]
This is caused by adv76xx_read_check() being inlined repeatedly, and
marking this function as noinline_for_kasan solves the problem
completely.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/i2c/adv7604.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index d8bf435db86d..176f46ac85fd 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -339,8 +339,8 @@ static inline unsigned vtotal(const struct v4l2_bt_timings *t)
/* ----------------------------------------------------------------------- */
-static int adv76xx_read_check(struct adv76xx_state *state,
- int client_page, u8 reg)
+static noinline_for_kasan int adv76xx_read_check(struct adv76xx_state *state,
+ int client_page, u8 reg)
{
struct i2c_client *client = state->i2c_clients[client_page];
int err;
--
2.9.0
Back to top | Article view | linux.kernel
csiph-web