Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2460459imu; Thu, 17 Jan 2019 14:48:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN4p15VpeWt92qv9Lmtki0xjQzNJngk/DexUL0SS10lT2CekLN9hEuIZwrISuZPtKJY8T88d X-Received: by 2002:a63:981:: with SMTP id 123mr15324791pgj.444.1547765305195; Thu, 17 Jan 2019 14:48:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547765305; cv=none; d=google.com; s=arc-20160816; b=CZxwBmFq2g/hABDaENBpwvLvkFgNfJQ2J6zIqWkfu6o5fSQJn5A4b3pPthuVaivuYL vp5m4kCSbdFzjaHEwBms5UCyh6P8jwo88TPt/o/v40BWdBMQuqm4qeENcG/iqkfLGROG NpNwqdhgQj7l9JHzw2mK4+j7GSUyC4EEKkX6t9U8MdaxY1lE2242bD/F4Gci4qrhEdkJ N1HsSng3SddGxKVejBJDUR6E2t293RFMUfhlMuRLFgutvN4O27nLrK1ZixC4ltMtWO/F HW7UCDoA/Y4kwORnZA/R7c34jFfly7rWnrHdb/LvmxCTOTDd+Yyo3Gsk7Xddz+CbVcaN s/eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=0o6owPltpYV/6XBI7Z0gwP7fkogYOo4J8h3GQayBr2g=; b=v1/zpHA5wvxC+M6U59rQpfu+6LP9N+Oyk8iR/OIzvGlT1E9BAQxz9MoW8aQov1dWK+ Nmk5G3k1GRfH7ms7Vh2cUHfy9JYhl5jgOpj/GMp6a/aRnwLxxk1/GjK+nahvOB759whU KNo1meqqyxNihQkBODfAs7jlespCVtyf2fcket9Vp4FzKMivhD4x4EV7d8HN+3Q7PvOb MfP8aEVvGRKGDC+5/IizE9t+gjFGD31NdLH5TyChZlEeC09oGBewBbiS/Fw/krEgboDZ iZHwfQYk+VmLlbc/9QNI4+rxMlZ2YdpQaoWjSZWdgzAVjC0XYndtR/Mwj2inb4EAPzYY mZtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=pjzZPC48; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si2489460pgb.424.2019.01.17.14.48.06; Thu, 17 Jan 2019 14:48:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=pjzZPC48; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726880AbfAQWqT (ORCPT + 99 others); Thu, 17 Jan 2019 17:46:19 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:42488 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbfAQWqS (ORCPT ); Thu, 17 Jan 2019 17:46:18 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0HMdAho153337; Thu, 17 Jan 2019 22:46:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2018-07-02; bh=0o6owPltpYV/6XBI7Z0gwP7fkogYOo4J8h3GQayBr2g=; b=pjzZPC48sPF3TlDEOCUwRww5RMUTNlT8WlR6d40mKr/x7SCblgvTxy8DqeyYax6XoJ7H ub/uV9+gS/b+L91ucaavV4K3bTw4ngU81OGAIvImbJdxXN2U3A1vwqIjNHwOGihFB6V8 qU6zNBgS1yhgcmKckZzN8LyyqFgZFiIwblxs4fFYVXtlCl8lPtmBl76smt7cMljewXGk nkIkXMTKHPicR7xthY02GTVuuIqMybsSQ5uPTRkAIL5LjgClPBJLVeFQgMlVEW5lZe0H gN41WFHXPUoLc+DX8Edsn+ez9yJE6DarRncyltKnmJ6dv2B+uYzmyNHiVi0ECE4tkUqC 5w== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2pybjp2pk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jan 2019 22:46:12 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x0HMk6wZ031453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jan 2019 22:46:06 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x0HMk5TE017132; Thu, 17 Jan 2019 22:46:05 GMT Received: from localhost.us.oracle.com (/10.211.15.82) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 Jan 2019 14:46:05 -0800 From: eugene.loh@oracle.com To: linux-kernel@vger.kernel.org, ard.biesheuvel@linaro.org, ak@linux.intel.com, andi@firstfloor.org Subject: [PATCH] Kbuild: Handle too long symbols in kallsyms.c Date: Thu, 17 Jan 2019 14:46:00 -0800 Message-Id: <1547765160-15502-1-git-send-email-eugene.loh@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9139 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=861 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901170157 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eugene Loh When checking for symbols with excessively long names, account for null terminating character. Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c") Signed-off-by: Eugene Loh --- scripts/kallsyms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 77cebad..f75e7bd 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -118,8 +118,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) fprintf(stderr, "Read error or end of file.\n"); return -1; } - if (strlen(sym) > KSYM_NAME_LEN) { - fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n" + if (strlen(sym) >= KSYM_NAME_LEN) { + fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n" "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n", sym, strlen(sym), KSYM_NAME_LEN); return -1; -- 1.8.3.1