Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2816123pxb; Mon, 1 Nov 2021 02:22:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJsM3+wnLHZxs2z6nm4w5wP+XcrgJWAf//y9tbRHuzCGrkvdxb3taQuYZThL/Zg7gTWdzw X-Received: by 2002:a50:be81:: with SMTP id b1mr39581844edk.59.1635758568651; Mon, 01 Nov 2021 02:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635758568; cv=none; d=google.com; s=arc-20160816; b=TJ0VJXLz6T+UvsTJ2nsTx/EXKn0k8VCo4d3HjecB4gOxuCIbbOsfMN/WB60e/niZyh 5LbsnD0wOrRVy5d08i7W6tA3zA+veWwUd5DCzRUoHXLx01DHxkx9+WFYwq9KWuAqui20 DgIK1Zzm4B4ZwMT0RB2RnEdettMdVjsVwhwHn8r5csqtACUZghhskvOsRiCgzIUyRyRc a/VBcZa/uAV6ScJpMy2OxzPkTIOoYBqoPxhE5g73KDspuRAUhugy2CETU9vzd0hvgsof S7xjRdiLPqmtmEYleYaa1dAllJm7PGAA2fdCktdU2YWb7LNAKK9W+voPKzuXc5TQqnnU HfUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l/Hpx3sZ+/52OoNUj59muz8sSGsRG+u4j+wQFI/LuX8=; b=nFSwxurqpjUepfz7UHjYizw8F5c+ZXYkESWmIXUwgp8xbX0pkZEpKny+Ik/07Tc/TO NPw9QFu3f2jkYxTGrEcc72Jaf7HE15RYHNM6pK00kwgo1mERx7n0tQlkZIVowsxCAOao urFYxBhjOgbaLbPxWYY5hYvZOGWuxXQ5PtvNF/PhLewx78azqM9gpp+yf9hwvO7W/zVW Qd8yLrGF2NmBlv9tW+cdu68r8isRWc1YxiOs6d8Ndv4un58PiNf3uwWO5N0GbGYlHbST QEQc4oyu43VOwnbbrtLTI+/ieouszH1FeleOJ62nAZfLq1UIirH3QMDBI3EXs2GqHE/B fm1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lU7ifzka; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cr20si22646283ejc.762.2021.11.01.02.22.24; Mon, 01 Nov 2021 02:22:48 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lU7ifzka; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbhKAJVs (ORCPT + 99 others); Mon, 1 Nov 2021 05:21:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:57632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232001AbhKAJV1 (ORCPT ); Mon, 1 Nov 2021 05:21:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A333C60FC4; Mon, 1 Nov 2021 09:18:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758334; bh=M4PgJ8Bfn8C+fG6wR8p9pIDnyvVddvMRdsypmjOq1+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lU7ifzkaBK5+vF3suIAZEpq4s1HxShM7qkRANNvDo1zQDy1eUPD6tMxxKgM/QmI3F v2aoYjsosWpw/jxwf1o9gTeiQy5rx9d1ep2QR7ckaAsWdnCV/GbMvvUQd9ZZZn0V4j SrQFW0atw1ALo3LTBsGbBJXbXVwaeDCRS8hyVOo8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Linus Walleij , Arnd Bergmann , "Russell King (Oracle)" Subject: [PATCH 4.4 02/17] ARM: 9134/1: remove duplicate memcpy() definition Date: Mon, 1 Nov 2021 10:17:05 +0100 Message-Id: <20211101082441.177159417@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082440.664392327@linuxfoundation.org> References: <20211101082440.664392327@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit eaf6cc7165c9c5aa3c2f9faa03a98598123d0afb upstream. Both the decompressor code and the kasan logic try to override the memcpy() and memmove() definitions, which leading to a clash in a KASAN-enabled kernel with XZ decompression: arch/arm/boot/compressed/decompress.c:50:9: error: 'memmove' macro redefined [-Werror,-Wmacro-redefined] #define memmove memmove ^ arch/arm/include/asm/string.h:59:9: note: previous definition is here #define memmove(dst, src, len) __memmove(dst, src, len) ^ arch/arm/boot/compressed/decompress.c:51:9: error: 'memcpy' macro redefined [-Werror,-Wmacro-redefined] #define memcpy memcpy ^ arch/arm/include/asm/string.h:58:9: note: previous definition is here #define memcpy(dst, src, len) __memcpy(dst, src, len) ^ Here we want the set of functions from the decompressor, so undefine the other macros before the override. Link: https://lore.kernel.org/linux-arm-kernel/CACRpkdZYJogU_SN3H9oeVq=zJkRgRT1gDz3xp59gdqWXxw-B=w@mail.gmail.com/ Link: https://lore.kernel.org/lkml/202105091112.F5rmd4By-lkp@intel.com/ Fixes: d6d51a96c7d6 ("ARM: 9014/2: Replace string mem* functions for KASan") Fixes: a7f464f3db93 ("ARM: 7001/2: Wire up support for the XZ decompressor") Reported-by: kernel test robot Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann Signed-off-by: Russell King (Oracle) Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/compressed/decompress.c | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/arm/boot/compressed/decompress.c +++ b/arch/arm/boot/compressed/decompress.c @@ -46,7 +46,10 @@ extern char * strstr(const char * s1, co #endif #ifdef CONFIG_KERNEL_XZ +/* Prevent KASAN override of string helpers in decompressor */ +#undef memmove #define memmove memmove +#undef memcpy #define memcpy memcpy #include "../../../../lib/decompress_unxz.c" #endif