Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp451837imu; Mon, 5 Nov 2018 03:42:16 -0800 (PST) X-Google-Smtp-Source: AJdET5eTasPB4NYD7+THsW4bkw7DOxb1M0EG7J1QccKUTdanq4HmGaAU6SSfSR07y5VO/oihjAL8 X-Received: by 2002:a62:b09:: with SMTP id t9-v6mr21764047pfi.36.1541418136246; Mon, 05 Nov 2018 03:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541418136; cv=none; d=google.com; s=arc-20160816; b=bCvmZRwY1Ij4xf9gmxjPFc/F2It9TKWK4N2/5GWYnmyTo/B3NrwUiZ7G85oNkBIpJR ZFjM5wiYlqvxLt4GyQB/5pyb1GUAUKZZIfzFAixYjVd8OQSYNP+R0KpOA7d0gRPOQMB3 odril6p0eVSg3dd/S63dsSMAvz4nA8cCkM69P1ms7gBKHrVULvBbVFf6/Ehi8aU7NHZ/ NQzAxrqe4DEfotk261NAC9QoKYwfvve9kzPkmQ780cn5s270fv4kMxguPCOamtt3DaMR VAVu7CEixewhB7nn2gVzdj7DM8k5JiKUEtJCqYB0m/S3RFuGNDczsgiAp2/b5/w1K6bf AbUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lp0BKhOwCjP+eXrZgpt5Qdx5giJnbOO5cNTHDAvCCYA=; b=hHbEI2k/52nz26WN2fDloVLNw3uJd+Y+soLTfghtEyGz0fl+KeP6aBXl2KO9kxxOJj 10qz97t46GmJa4/FVeIE1KU7eW6PNRijULg8USWASIqXD+ttUAMAIY9aCCe9jE18q++d 77CyzrgpPyhKBXof4SQd3jhMdo4AHVo5eamwfBhhYfe8MY56KtLgmuR5EgUYLv90HOxn CFQpJaRCOcQjPNFOtsFaPDFtIqROGwIjVGy0Yj0bI70PLGdSNprtbhfXup8QWM9g7WE6 7N1ofvqC3LlDvgjGJp3GVOQzNrwQLub9jRkHKG0uyaybrH7G2cEGytNYVdpzLLw5QIkW ehrQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si19856115pgd.509.2018.11.05.03.42.00; Mon, 05 Nov 2018 03:42:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728122AbeKEU7P (ORCPT + 99 others); Mon, 5 Nov 2018 15:59:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727048AbeKEU7P (ORCPT ); Mon, 5 Nov 2018 15:59:15 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 899D930821F6; Mon, 5 Nov 2018 11:39:57 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.khw1.lab.eng.bos.redhat.com [10.16.200.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC39D26352; Mon, 5 Nov 2018 11:39:56 +0000 (UTC) Subject: Re: [PATCH] kdb: fix strncpy warning To: Daniel Thompson , Jason Wessel Cc: Olof Johansson , Linux Kernel Mailing List , kgdb-bugreport@lists.sourceforge.net References: <20181102212405.5911-1-olof@lixom.net> <20181103153925.ozyb4pqnixu6hw4z@holly.lan> From: Prarit Bhargava Message-ID: <2b728c10-1c76-5e7f-1aa1-c7c1dc4a7125@redhat.com> Date: Mon, 5 Nov 2018 06:39:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 05 Nov 2018 11:39:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2018 12:54 PM, Olof Johansson wrote: > On Sat, Nov 3, 2018 at 8:39 AM Daniel Thompson > wrote: >> >> On Fri, Nov 02, 2018 at 02:24:05PM -0700, Olof Johansson wrote: >>> kdb does a strncpy(a, b, strlen(b)+1), which makes no sense. Might as >>> well do a strcpy at this point. >>> >>> Fixes this warning: >>> >>> In function 'strncpy', inlined from 'kallsyms_symbol_next' at kernel/debug/kdb/kdb_support.c:239:4: >>> ./include/linux/string.h:253:9: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=] >> >> I think we already have a pending patch for this: >> https://lore.kernel.org/patchwork/patch/989013/ >> >> When we looked into this there actually is an unchecked overflow here so >> Prarit's fix adds infrastructure to keep track of the remaining length. > > I'm not surprised that there are more bugs. > > The above patch was posted a month and a half ago though, why is it > not yet merged? Can we get it in by -rc2, please? > > Jason? ping? Just making sure the above patch is in your queue. P. > -Olof >