Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp637661rdb; Thu, 30 Nov 2023 14:12:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPiwhd60FYPzJ0DhQjX9IxQXVC+k+1K/IoTQGip56SLnJYWr4D7Qb6ahxbQl/44gQ6s2rS X-Received: by 2002:a05:6359:5801:b0:170:73a:e17e with SMTP id nd1-20020a056359580100b00170073ae17emr869164rwb.4.1701382328286; Thu, 30 Nov 2023 14:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701382328; cv=none; d=google.com; s=arc-20160816; b=nDal7US+MoKlYzMb2xE/M3dd/+o7p6h5tagBEIzHi+18ZcWLpA/y3vjsS4ld18+u/D oCJ7um1U7fmvbf3MW+WgHa2FlqeA/YfaEgaUrp2UBFsbOIhwW27LFbM8qfvGxx2LqaFy qUwMIMLo0e3NIOx0HMro03yJCPzEQg52j3J1WJ7WeX13H/8leT0oGAofkQpYsODmJBaG WbhJ9LI8PeDLkWAg2S9dlf1gwQBtDtI/6OjfGh0tzAixOevIWPU1x96crczPiqmPF1ju wz2royZ7NBtrtnTx1WaimCYQN9zSBP56gqg6jcNgPcw7Lp7IBBR9H+Iezw0WjMF4wPf8 Rq9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2FXLPRPiS6Mdb77R0ffuo1PuZkNG018RX2vgY/WJ7uk=; fh=JMl1w0QyM58QB0gmKBld6lCYg/9Msbtmwd1jpnnobeQ=; b=ViYGkLxLV0p5srHygSw6eYdEBCef83uma03qE47yxvMbkUxV0yXbnAb25KmHwaQIbV 27bk1W5Yv3psfY+TLFDmD/jhtt2wFzKA1Y+UoCq7BKPN9OBCq1rfjreBJQzQ/+KhwhSl SDlTgdqln9JahympzjBQr+9fCITpyrX0v+O1f5OlZGQYSZph4uJ77qtTyQYtKKIF5gZz GUdQvOTvQ0yPCBORxEMa6T084kAdnXbatosvD6sqmA5UCu8lg30kOQSzamK5FcJBYR7F BZboFEVWPKOFj55i6jwmj4298QfEW4TT9+RtYllWneYyCIamMJMfda+lHDeiOPDyyUa0 UgKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Czp1nVZU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h14-20020a63c00e000000b005be34495eedsi2184581pgg.118.2023.11.30.14.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:12:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Czp1nVZU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9A024802458E; Thu, 30 Nov 2023 14:12:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbjK3WLv (ORCPT + 99 others); Thu, 30 Nov 2023 17:11:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjK3WLu (ORCPT ); Thu, 30 Nov 2023 17:11:50 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B24510DC for ; Thu, 30 Nov 2023 14:11:56 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1cc9b626a96so14093185ad.2 for ; Thu, 30 Nov 2023 14:11:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701382316; x=1701987116; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2FXLPRPiS6Mdb77R0ffuo1PuZkNG018RX2vgY/WJ7uk=; b=Czp1nVZUn4izanux1WF8hlUDFrLG8GWEzougKdN6CsSMH2ZOWJDLWhpgCcSReeLZwE ax67c7Lcu4+e4GKcwB77m/p82KEECNynK1mgCVpzCvIkZx/ugiwEsxAjxAot0nhWoviq y6xZCkj30bvLXOVbcnguW/fjSkRWC/Vn+WOLI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701382316; x=1701987116; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2FXLPRPiS6Mdb77R0ffuo1PuZkNG018RX2vgY/WJ7uk=; b=pSeIAWqOFbDFRAZ0E0dXeMkPaJvp3V4qNYTyouw5oe/YTsxCOQ0ovD6ptJfeZeA5OB Xem7Wgx7ZT9eNHiEfdzCRHBnaPQjdSmiRiet2VWfqsCaz1uI203ekn+AiW+a7HMve4+S MWga/NgWghktXpMe/Q7nWXdoG1z5flXMILBAF5SSrOqP80TBhTuAao0dpC4oEOgdbJnL 26ILRp9ivJD8FGqHAZEEVKPH8b6fbYT9OJmk1n8zH4ScQvJVI2eJSvUP0BNMhEUqdis9 KczfHWEp/4o44J6h2DQch+lmc5K5tpq+U+ej2LdcM3QQaFNt+fAmH/CTAeUvWl4SGzuc kLww== X-Gm-Message-State: AOJu0YzqfdRSXuMeSRMY7mJARSMxlXP+gXsfFfMptAbq8lyjsP6GCw4s vPNWcK+Zi5rilhk2DiMku+lhYNnrZx+knXPYxO8= X-Received: by 2002:a17:902:ce84:b0:1cf:c4d3:6db1 with SMTP id f4-20020a170902ce8400b001cfc4d36db1mr18661789plg.8.1701382316117; Thu, 30 Nov 2023 14:11:56 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id o5-20020a170902d4c500b001cf66056a1bsm1900106plg.97.2023.11.30.14.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:11:55 -0800 (PST) Date: Thu, 30 Nov 2023 14:11:54 -0800 From: Kees Cook To: kernel test robot Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: include/linux/fortify-string.h:52:29: warning: '__builtin_strcpy' source argument is the same as destination Message-ID: <202311301409.F2AFF5DA1@keescook> References: <202311301039.7i51bZCz-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202311301039.7i51bZCz-lkp@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:12:05 -0800 (PST) On Thu, Nov 30, 2023 at 12:02:50PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 3b47bc037bd44f142ac09848e8d3ecccc726be99 > commit: ba38961a069b0d8d03b53218a6c29d737577d448 um: Enable FORTIFY_SOURCE > date: 1 year, 3 months ago > config: um-randconfig-r034-20230830 (https://download.01.org/0day-ci/archive/20231130/202311301039.7i51bZCz-lkp@intel.com/config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311301039.7i51bZCz-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202311301039.7i51bZCz-lkp@intel.com/ > > [...] > kernel/kallsyms.c: In function '__sprint_symbol.isra.0': > >> include/linux/fortify-string.h:52:29: warning: '__builtin_strcpy' source argument is the same as destination [-Wrestrict] > 52 | #define __underlying_strcpy __builtin_strcpy > | ^ > include/linux/fortify-string.h:567:10: note: in expansion of macro '__underlying_strcpy' > 567 | return __underlying_strcpy(p, q); > | ^~~~~~~~~~~~~~~~~~~ The only strcpy() in __sprint_symbol() is: if (name != buffer) strcpy(buffer, name); Which is explicitly not the same address... This appears to be a GCC 9 false positive, maybe? -- Kees Cook