Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2817785pxb; Mon, 1 Nov 2021 02:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9qnhf7U9IFgyKJInNn4tUv9VWZO5GyRJDDnmnrhkbaYxKeGrgQiVFpGpWSh+IIyB/6M9A X-Received: by 2002:a05:6e02:1b8a:: with SMTP id h10mr19038961ili.219.1635758724530; Mon, 01 Nov 2021 02:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635758724; cv=none; d=google.com; s=arc-20160816; b=vkN+dDZtd/3hI8xyF78N8zWW7ftPX2+PN1fSSdNr95RITTIMPXbDnflrtI01ymRnKH 1W1zpxLs/3ATZW/P3u7a08aNn7pq3bEGX2Ibt6rC3jlLz9n/bts0j07vSnwa4BG64w53 JNqLfc7cfbTiYcn/zjlaBTxJfKlA8gIyebYE39TdlMVYq0TSKwYxuFanrIJgISn8ZQj1 ObrNZ5g+EZuKax1+NXLXrzK2sLZ3q3F7bvwYpzBsoTAtENt6YrXQQdxvi79hIUDc98zl 70/Xx/2gAnIgo2TzHtuuXV4itYTwtHsXWJ8VUma60c4NmOxDDHRWX7K4r0dmuuHOVgBi F5Pg== 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=CBol+NjXfHUvmOR92KhpYI2HCfM6buJwB4HVPOLVySk+M8vanNOUnBAoYhhL4KHf4l fDUk7XU3M3HP1FkEUajK33EGBqcuQtl5W3qYIFM8MhPu7Np0wshE49J3KC37gJKJ9GMQ +dgwIMZPnT++oRz0RTfxNQ5ouHtM9gGwvCbLgoqVjNBGdaI1XbkO2qb5DrxV7pLkvTRO qS4CTTA5yRAlNDnfal3UwAuD8SOrbdpsvFeg7u23G+x05g9JG054OqpU+/MUtCG1dxdN bJ/UwGNi37sPf3t/9EBzlV1EfEZ0gphXjnv5eRf/iDViWasu0wqKL9di5rcIZVuwGO50 87pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XIDcxpLb; 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 t8si25012833iov.1.2021.11.01.02.25.13; Mon, 01 Nov 2021 02:25:24 -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=XIDcxpLb; 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 S232517AbhKAJ0m (ORCPT + 99 others); Mon, 1 Nov 2021 05:26:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:58246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbhKAJWi (ORCPT ); Mon, 1 Nov 2021 05:22:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 885D661101; Mon, 1 Nov 2021 09:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758381; bh=M4PgJ8Bfn8C+fG6wR8p9pIDnyvVddvMRdsypmjOq1+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIDcxpLbo3VPzSWbvFbRO554w3VuRv3ZGNhcICVXatxRiqjR4WETsiSq5BnyO7W2w ektVmbyj1Vt+f2ID1BRM8M+8OewbwSMeRrG+hckIjCsTZWbESp4RfHQI+1tmp/u9f3 4G+0SiDIxpy7zyRAryXBcPK+XhGK2ECrd66NhwrU= 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.9 02/20] ARM: 9134/1: remove duplicate memcpy() definition Date: Mon, 1 Nov 2021 10:17:11 +0100 Message-Id: <20211101082444.650245644@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082444.133899096@linuxfoundation.org> References: <20211101082444.133899096@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