Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp917722pxb; Wed, 29 Sep 2021 12:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz0RXWWyjcxyTJ8P96I7F2cc2C0fLAZeMa0IXFkSi74DhDzCtEN8fSiE5q8vp1pVkjuuEX X-Received: by 2002:a05:6402:1290:: with SMTP id w16mr2055127edv.108.1632943695518; Wed, 29 Sep 2021 12:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632943695; cv=none; d=google.com; s=arc-20160816; b=mzyqeo2Y++NorkQYu2LGaMYJrpnNKGUKFaNZQ15hmsYRaKOMFzDf6OJWon9ycFAh3q E+1wVejiIczdc/xRNpTCYZbZPqI4CzeBKyFukm/LXUKG9lx8Xf+r2S+kme6uKE3yCgEV ldsN6w+U2B4sFhJBqgJpdWodOP5b2OnmoxY6R3ueMhdXEjS8Nm09tG6rYWXUEdGSyOkD yC6C+8VzgAZdv4I+Enf6H38yVUk0umEBInjPkOXGOBJjOXqLrvHijhWf8OiioFVkip0Y dIn2T5RZCFHR4BOtFYoLYvce+s/u3feaJrM7tXVUvDTPS9t6y5cVR/YTULG3MX92/5aH XtnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=y2x6S7nH9jaik0J6Z6GU8rfIpZ/ztNMY7uEdNTzinB8=; b=Id18bu5Du5auexb/y2qtAurYrKrzbfHNGAlzKuHzwat8FalH9jVOD2JYCGpi95bBrS Wu/i+kihVKQfuxte1SXWX6zdoFVUAOkq8euiMCoWzDPV4WknbnLRK9QCTPy1TlKH3tjq WoY61ZWF9T3Z4F/jIMM9BBUcfUhjpNCWCiT02M96KiIkNbm/OoLJYdFxckVzgbpBNd8W zeF/G2ceoybkLM/59RalxaCvDw3gAIeVdRDLjRWVv8EOxdG6jbi2i1CKzRIUVi/CuWso bWsKwBU98x+OmCxkvxrDLVjWH7CZoU6IARpzuS7ygDqkwEdi/uRsXQk3zbrL9SPTLkwc vWuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si890921ejj.578.2021.09.29.12.27.51; Wed, 29 Sep 2021 12:28:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345031AbhI2RGE (ORCPT + 99 others); Wed, 29 Sep 2021 13:06:04 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:40892 "EHLO mail-pj1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243396AbhI2RGE (ORCPT ); Wed, 29 Sep 2021 13:06:04 -0400 Received: by mail-pj1-f44.google.com with SMTP id d4-20020a17090ad98400b0019ece228690so4673579pjv.5; Wed, 29 Sep 2021 10:04:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y2x6S7nH9jaik0J6Z6GU8rfIpZ/ztNMY7uEdNTzinB8=; b=pdy/2zfn3z3Ciyqpf7Iqk25y8cotet/Jv0J62CWHcXPJtp17tbGRkI/uqK2ICsgIp6 j8fFdohYFbDTmcPvHLu+/vW2k0ryeHo4Ep9scLFJyXje8yd5k14xR7M/M9g3JtNN6Wiv f4URg+6cVs504vsxIdVx32WLF+obbAfWhSTiIV8ORY53TJ8WJQlACrQfhXvOGY3XMWJw PhTMyq+Tn7l8otju1CmW7CxJnsEIQgO1PZ2fSEoO1fuQlpKecQOezBMbSGJ2N7VENcjo 4M8EhfZ/YSwEuuzuM/KCeCsh6Ucb7NvGE5OTOL64zeoSaUy1x/9a4Ri9txnOGdtaC3EG wVYQ== X-Gm-Message-State: AOAM530g4FNH5CMIMyy1bR2iZMvLIaVeh1S9zxibxac+MCMAue4VbVFi aIH4N2eWRfedzp0i8KxhjxRRLEpkThen2427d8w= X-Received: by 2002:a17:90b:390:: with SMTP id ga16mr7637268pjb.185.1632935062753; Wed, 29 Sep 2021 10:04:22 -0700 (PDT) MIME-Version: 1.0 References: <20210919192104.98592-3-mcroce@linux.microsoft.com> <202109200526.YYwdkOeI-lkp@intel.com> In-Reply-To: From: Emil Renner Berthing Date: Wed, 29 Sep 2021 19:04:11 +0200 Message-ID: Subject: Re: [PATCH v4 2/3] riscv: optimized memmove To: Matteo Croce Cc: kernel test robot , linux-riscv , kbuild-all@lists.01.org, Linux Kernel Mailing List , linux-arch , Paul Walmsley , Palmer Dabbelt , Albert Ou , Atish Patra , Akira Tsukamoto , Drew Fustini Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Sept 2021 at 12:49, Matteo Croce wrote: > > On Mon, Sep 20, 2021 at 12:06 AM kernel test robot wrote: > > > > Hi Matteo, > > > > Thank you for the patch! Yet something to improve: > > > > [auto build test ERROR on linux/master] > > [also build test ERROR on linus/master v5.15-rc1 next-20210917] > > [If your patch is applied to the wrong git tree, kindly drop us a note. > > And when submitting patch, we suggest to use '--base' as documented in > > https://git-scm.com/docs/git-format-patch] > > > > url: https://github.com/0day-ci/linux/commits/Matteo-Croce/riscv-optimized-mem-functions/20210920-032303 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bdb575f872175ed0ecf2638369da1cb7a6e86a14 > > config: riscv-randconfig-r004-20210919 (attached as .config) > > compiler: riscv64-linux-gcc (GCC) 11.2.0 > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://github.com/0day-ci/linux/commit/9a948fd7d78a58890608e9dd0f77e5ff84f36e3e > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Matteo-Croce/riscv-optimized-mem-functions/20210920-032303 > > git checkout 9a948fd7d78a58890608e9dd0f77e5ff84f36e3e > > # save the attached .config to linux build tree > > mkdir build_dir > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All errors (new ones prefixed by >>): > > > > arch/riscv/lib/string.c: In function '__memmove': > > >> arch/riscv/lib/string.c:89:7: error: inlining failed in call to 'always_inline' 'memcpy': function body can be overwritten at link time > > 89 | void *memcpy(void *dest, const void *src, size_t count) __weak __alias(__memcpy); > > | ^~~~~~ > > arch/riscv/lib/string.c:99:24: note: called from here > > 99 | return memcpy(dest, src, count); > > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > vim +89 arch/riscv/lib/string.c > > > > 86c5866e9b7fdd Matteo Croce 2021-09-19 88 > > 86c5866e9b7fdd Matteo Croce 2021-09-19 @89 void *memcpy(void *dest, const void *src, size_t count) __weak __alias(__memcpy); > > 86c5866e9b7fdd Matteo Croce 2021-09-19 90 EXPORT_SYMBOL(memcpy); > > 9a948fd7d78a58 Matteo Croce 2021-09-19 91 > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > How can we fix this? Maybe calling __memcpy() instead? Yes, that fixes building with CONFIG_FORTIFY_SOURCE=y for me. Kasan already wraps memmove itself, so it should be fine to call __memcpy directly. /Emil