Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp459708imm; Sat, 14 Jul 2018 04:56:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfbdEeAHRNokryR/seS7swfwN8LST3FIeQrvhYKgxV1WHKFhYnkzET5ZYh3XcMq0FByiRI4 X-Received: by 2002:a62:47c4:: with SMTP id p65-v6mr11029034pfi.170.1531569406204; Sat, 14 Jul 2018 04:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531569406; cv=none; d=google.com; s=arc-20160816; b=UgIMKLpHoHT06aqNrBYOtKWNi7Jgf1IW1wGckk0p96/B5nqT73nLrPL7SLKa6WTst7 vTMSa/GY2B22a1XVOyyiCLwLw5UGqX0RQsaT8aHCQbGKLhJ4vVNNy3QbjW9YUvLRexj9 BVETCfF4gf4hZ/sEtCeh29MdA4L1VbKOrn+PRkJGRfESDnhSR/MmwTsa/YPRnPj50bWX 6DDCSHKVjRQY4Pw+LFmkiaoJAUFS9UAXx/dZvSsAoJCZke+4VSwfGLziQGYFr+WFfmXj kyPoEtmF5J75b8BIkD2C2oEwU9ZQQeXdkqSB2ap7haB+LkyoZVHysMlQ3Dil1kX4KeFW shMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=hdPIWh9fH9JuGBDckVjbJRyLKZ3ZSkKtTYYK+pULOhQ=; b=IcYRfnWVBjtS1FZV3mJftSocQ/SFbtkGFPSn4iKiZ0apiSWV4Pa4rxg57Y8g7qVMUW 9HfPKQcqmq3e8D8KcE7Yiaq3tyYIrK1e9pXKFs9jqFGY0faaO8bVa32R0KjwjuCwWXzy R7Azi1Vre8HjySbQCMVaMbiGf3/VSQJSb2SjOlhx9HFRfPpm5V4Z5GUk+CjwHW+7USjp ZNnNLaQNSs4P8zNLcFZeAacuODXUcMYS9zqMz/WB6ZFOgYu/uzrfH5ObdUy7zNrp/+4O Ec5d+SbDCRxsYvBt8V5KMfVupwuzyIDQ76g+cMM+7rNUiWB3Kia5osO9GOmpTv78dOcB a0mQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l81-v6si28777761pfa.368.2018.07.14.04.56.01; Sat, 14 Jul 2018 04:56:46 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726618AbeGNMNX (ORCPT + 99 others); Sat, 14 Jul 2018 08:13:23 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46535 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbeGNMNX (ORCPT ); Sat, 14 Jul 2018 08:13:23 -0400 X-IronPort-AV: E=Sophos;i="5.51,352,1526335200"; d="scan'208";a="272990708" Received: from 76.8.75.174.nyc.electricfiber.net (HELO hadrien.local) ([76.8.75.174]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2018 13:54:30 +0200 Date: Sat, 14 Jul 2018 07:54:29 -0400 (EDT) From: Julia Lawall X-X-Sender: jll@hadrien To: Dominique Martinet cc: Masahiro Yamada , =?ISO-8859-15?Q?Ville_Syrj=E4l=E4?= , Julia Lawall , Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, fengguang.wu@intel.com Subject: Re: [PATCH v2] coccinelle: strncpy+truncation by strscpy In-Reply-To: <1531555951-9627-1-git-send-email-asmadeus@codewreck.org> Message-ID: References: <1531444483-17338-1-git-send-email-asmadeus@codewreck.org> <1531555951-9627-1-git-send-email-asmadeus@codewreck.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +msg = "SUGGESTION: strncpy followed by truncation can be strscpy, if the destination buffer does not need to be fully overwritten" > +coccilib.report.print_report(p[0], msg) This is the first SUGGESTION. I don't know if anyone out there is relying on it always being WARNING or ERROR. julia