Received: by 10.223.185.116 with SMTP id b49csp3314290wrg; Tue, 13 Feb 2018 00:29:18 -0800 (PST) X-Google-Smtp-Source: AH8x224w3VHedqG70r48kPmterVA+Wt+hE04cRaWgY4Jh/PggT5kp2TbgmsPbWFqvzsTw2sZKivm X-Received: by 10.98.161.7 with SMTP id b7mr484755pff.68.1518510558033; Tue, 13 Feb 2018 00:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518510558; cv=none; d=google.com; s=arc-20160816; b=SPCIwxqfptITo6D8UVIpmkN3FMUQ/xPCXedr2bHSasfAuFjM5pmxiC0ftej4P8gAQw 3OK9rpHrP/VggaGW9MQLYf8KajpCTBTYgp1LEdNmLSCfi27kl4mY6xi+1W1z3cOkKvWS yQkZ6PsgCdR/C187/gBvejgKrtbQJtZx+h7Xh8xuKlL1bjEJgVW6gnNMvCwSzkTkq3V4 FbO8OMzlRW1NSI27JA9auflfx9TP/Gfi91Vq/hKe9fhILtT6hXCaVCfoQpF3flgq7I6n QjwHFU3HewqeX/SJeqKx5jEuHrWEeLzC/0xeYI+vcLmLPjAjW7kKcGNtaRSscS2nF8Ou 0cyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=8Gx0ffn0WVzegCENkixM3q0x2SadteJrAfqBI+uGY/U=; b=Es9K3hVZ2rqr9sLxt30TtM8R1wgrmjkLL7h2TpAtnmQHbDuXBMZOuYauIn782LviNR N2ab8SGPeG1/UOtCJTpxVHwVOdlngluD4PYBdqJrZDwp85G7ZjZZhq6i9g+fKREYWcZ2 NUEVrC+acdtACG1YnMZ5hj238akfBZC4/5/vbyOlffirP+H/NuxooZzq4AE12+ioRR9i QmyQrn1OvjYN/Rzky8+KoVKwsRDFdyNrstiitla2U3jqBW71QLsMmJPZ0ohcMcFAIk90 LWxio2YWqrdjDqH/jM2OCRSgoxX4EJbLrA9TFdVgZLsZusqlEpgGOvpqNns+GHwn8how tHlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tGYFcjCR; 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 c74si5142387pfb.306.2018.02.13.00.29.02; Tue, 13 Feb 2018 00:29:17 -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=fail header.i=@gmail.com header.s=20161025 header.b=tGYFcjCR; 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 S933779AbeBMI2X (ORCPT + 99 others); Tue, 13 Feb 2018 03:28:23 -0500 Received: from mail-ot0-f194.google.com ([74.125.82.194]:41271 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933692AbeBMI2T (ORCPT ); Tue, 13 Feb 2018 03:28:19 -0500 Received: by mail-ot0-f194.google.com with SMTP id r23so16564103ote.8 for ; Tue, 13 Feb 2018 00:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8Gx0ffn0WVzegCENkixM3q0x2SadteJrAfqBI+uGY/U=; b=tGYFcjCR10KROnvOmZYdClbvd2FwqOQ1CA1EOIS4JfsTYrqLnCj3fIZsU82j6RfT/q fAsKX5ObAPWv7ZmZOrAE8m5hDeSiYHiroZoP02EQOZyAqcV4cBKbNxDKSOt6YUjGs+XJ R5dzdt58hoMYhszoEFikJFfIokyTdM1OA/yg3qRzO4+AjmTZi5T5XJEgVTDG+i8brypT 8m8sKiSjo/K1v1hnO+LfYB6fO7zNXm0OfB+ssa8jXATnIEWkU3kbpeZZccOwywiUdkmK K9p/71Jd59TTPVB3uLEd4iqTUXbTKGieQhTLzZwHmyAn5V5lKaFblZ1PmnIBx/AgNy2V 4f0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8Gx0ffn0WVzegCENkixM3q0x2SadteJrAfqBI+uGY/U=; b=JPt8BNjiUbSzYx3csBK4iEWQJSYcwHChMx4ahXRpwUyo3Q65JcJhT+lyu2ndEhtWDd hJ8MfkLH9nCMeGFONl2Hebr4qrCmUQHXvQYhpaeblc01rmfOvA3YVAAToNmbF0wxA0Kp fJgAsJTs74cCVCHp2nmK3hE68BEYG3QR0uFonXzxqebaHwuIvsE4PngK4Xj367S07mGX d4oJKff5BznMEto+3+GvBO43E2ST0frgeX3NfDxkUn1bY7dwoJc40v5PXUP1QP9I6X6d /BCRY8YsEjBrnD4aKQYRhl5zDhyjxkuxZxZOpNC2T9nvb/NYS6pwwYsewofcCgDHTmBR tltg== X-Gm-Message-State: APf1xPBuTnoS8Sbyz/3SI7v+v/zfS6Zasg1ioA5PCNKgU5hbRSOivgE5 uEkrber3Viy31keh/x9a8eOg0tkDsRvnDWMbgV4= X-Received: by 10.157.38.42 with SMTP id a39mr291085otb.112.1518510498627; Tue, 13 Feb 2018 00:28:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.168.66.10 with HTTP; Tue, 13 Feb 2018 00:28:18 -0800 (PST) In-Reply-To: <20180213072328.GA1636@1wt.eu> References: <1516095490-83827-1-git-send-email-wangxiongfeng2@huawei.com> <20180213072328.GA1636@1wt.eu> From: Arnd Bergmann Date: Tue, 13 Feb 2018 09:28:18 +0100 X-Google-Sender-Auth: cRYIMcEvIT_M7Ve6JGdFOWmv4ng Message-ID: Subject: Re: [PATCH V2] auxdisplay: use correct string length To: Willy Tarreau Cc: Xiongfeng Wang , Miguel Ojeda , Dan , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 8:23 AM, Willy Tarreau wrote: > On Tue, Feb 13, 2018 at 09:19:21AM +0800, Xiongfeng Wang wrote: >> This may suppress the gcc warning. > > In fact there are two big problems with gcc warnings : > - writing -Wno-something-unknown triggers an error on versions where > "something-unknown" isn't known, making it difficult to permanently > disable warnings (though in the kernel we handle this pretty fine) We have the $(call cc-disable-warning) helper for this. > - warnings and diagnostics are conflated. Some warnings should only be > provided when the developer explicitly asks for suspicious stuff > (-Wsecurity, -Wsuspicious, etc) that would *not* be part of -Wall > since -Wall is usually used to report real warnings. And this is what the W=1 and W=2 make options are for. I originally asked Xiongfeng to look at some of the new gcc-8 warnings, but must have miscommunicated at some point. I think we do want to enable the new -Wstringop-overflow warnings by default and fix all instances, including the false-positive ones. This is a useful warning because it tells you when you actually write past a buffer, e.g. using strcpy() with a source string that is longer than the destination. For -Wstringop-truncation, we can decide whether it should be W=1 or W=2, but I'd still make it possible for users and maintainers to easily enable the warning when test building new code. Arnd