From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00BC1C433DF for ; Tue, 2 Jun 2020 03:26:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF2872072F for ; Tue, 2 Jun 2020 03:26:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="WvOpBHvp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF2872072F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5807680007; Mon, 1 Jun 2020 23:26:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 530BF8E0006; Mon, 1 Jun 2020 23:26:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41F6180007; Mon, 1 Jun 2020 23:26:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0180.hostedemail.com [216.40.44.180]) by kanga.kvack.org (Postfix) with ESMTP id 25F848E0006 for ; Mon, 1 Jun 2020 23:26:54 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D6651181AEF0B for ; Tue, 2 Jun 2020 03:26:53 +0000 (UTC) X-FDA: 76882835106.24.joke12_3c2a82894c51b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id B55231A4A5 for ; Tue, 2 Jun 2020 03:26:53 +0000 (UTC) X-HE-Tag: joke12_3c2a82894c51b X-Filterd-Recvd-Size: 3725 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Jun 2020 03:26:53 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id d6so771818pjs.3 for ; Mon, 01 Jun 2020 20:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=EUYHYzoPDKXv9md4g5R5FUtYBgbh9Bfa8Q9FoAo3PQA=; b=WvOpBHvpKheZCFY2Jf29QNCl1nfNniwNwEL0dSvTWL+KkNScu05rwzRERPMKd0DzSr 86ktnsaPRW70Dd6OgzrscU8jQ9i8KTx9bK+qF0VD7d8iKVOXFlArf60NAaMgdwXHrZs6 jPecXlk1/tlGZ8RBmgjKIMIKzH17ARzkDPSTE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=EUYHYzoPDKXv9md4g5R5FUtYBgbh9Bfa8Q9FoAo3PQA=; b=se7SLz9yiWWHZ2WjtJRbI0hC2IPc1YJ9w0ZjZl+H6Y3VgfG+sfaWgvmowoCk8bX1Yn //GG0/1B2M8DWGb4uDr7Szx6OKkY/21j6M9G4tUVK8J6DZDVSdmLjLkikHViz5F/ZdBo XIFPbRZEMboUNPjqudy7lb3mdoQ/ra/lypfs4ZqKv1gvx+O0kHu9ekMEFNxKcjLNWpyV OgJfgwtu+P06AIW24Xv7TzM5P0462lFlrDTuKYcL6rvB4gXYno/XGuAfhktKhFXACSWB m6MbiT26SgL2YQi44x8xl8niuOEB7Pb8irKEwBI1YXv4v0qZ9+s0htdmZjeIU0zrmst6 pcVQ== X-Gm-Message-State: AOAM531BIxcjt4pOI+QoxqAhEGDDCU/Sie+6nbkEglCoUq8Yxk3vY4Yy IafrenlKkYSrHys3tRMq99L5gA== X-Google-Smtp-Source: ABdhPJzn7H1EqqywAsoa6Eqc53BaVTyxvmWAbKDN7KJLyWxakNyhu1Ge3oKEf691aedPWmrTJbsRhw== X-Received: by 2002:a17:902:b206:: with SMTP id t6mr23475172plr.248.1591068412182; Mon, 01 Jun 2020 20:26:52 -0700 (PDT) Received: from localhost (2001-44b8-1113-6700-8c2c-9602-4cd1-9ff4.static.ipv6.internode.on.net. [2001:44b8:1113:6700:8c2c:9602:4cd1:9ff4]) by smtp.gmail.com with ESMTPSA id n19sm699813pfu.194.2020.06.01.20.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 20:26:51 -0700 (PDT) From: Daniel Axtens To: Andrew Morton , kbuild test robot Cc: kbuild-all@lists.01.org, Johannes Weiner , Dmitry Vyukov , Linux Memory Management List Subject: Re: [hnaz-linux-mm:master 169/698] include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy' In-Reply-To: <20200601180455.1a2f38368da33c7a0bb8d6fb@linux-foundation.org> References: <202005301819.G4uARaFJ%lkp@intel.com> <20200601180455.1a2f38368da33c7a0bb8d6fb@linux-foundation.org> Date: Tue, 02 Jun 2020 13:26:47 +1000 Message-ID: <87wo4qywp4.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: B55231A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Andrew, >> include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 8 equals destination size [-Wstringop-truncation] >> 297 | #define __underlying_strncpy __builtin_strncpy >> | ^ >> >> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy' >> 307 | return __underlying_strncpy(p, q, size); >> | ^~~~~~~~~~~~~~~~~~~~ > > Looks like another false positive. > > Daniel, is there a practical way of suppressing these? I think we probably want '-Wno-stringop-truncation'. That will stop warnings where the bound equals the destination size (so there won't be any null-truncation). But it won't stop the overflow warnings about full-on overflows (-Wstringop-overflow). I'll send a patch. Regards, Daniel