From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754767Ab1GLSPl (ORCPT ); Tue, 12 Jul 2011 14:15:41 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:36652 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754458Ab1GLSPk convert rfc822-to-8bit (ORCPT ); Tue, 12 Jul 2011 14:15:40 -0400 MIME-Version: 1.0 In-Reply-To: References: <1310454020-15426-1-git-send-email-abogani@kernel.org> Date: Tue, 12 Jul 2011 14:15:39 -0400 Message-ID: Subject: Re: [PATCH] modpost: Fix modpost's license checking V2 From: Arnaud Lacombe To: Anders Kaseorg Cc: Alessio Igor Bogani , Rusty Russell , Jan Beulich , Kbuild , LKML , Tim Bird Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Jul 12, 2011 at 2:02 PM, Anders Kaseorg wrote: > On Tue, Jul 12, 2011 at 03:00, Alessio Igor Bogani wrote: >> +#define SEC_NAME_MATCH(name, str) (strncmp(name, str, strlen(str) - 1) == 0) > > Surely you meant strlen() or sizeof() - 1, not strlen() - 1? > >> +       if (!is_vmlinux(mod->name) && strncmp(symname, "__ksymtab", 9) == 0) > > Same strncmp pattern here.  BTW, your macro is the strstarts() > function in include/linux/string.h. > modpost is an host tool, it should not include kernel header. Content of this file is not exported to userland anyway. - Arnaud - Arnaud