Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1084003rwi; Mon, 10 Oct 2022 10:57:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kH9xEmxWmQRf18kx/gkFwFOVSG+00zbH4BHKo2E6J0NarJQaZ14FNVwxrnJ6J5KE2kgFK X-Received: by 2002:a17:907:a047:b0:78d:9b73:79bb with SMTP id gz7-20020a170907a04700b0078d9b7379bbmr8957608ejc.657.1665424661877; Mon, 10 Oct 2022 10:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665424661; cv=none; d=google.com; s=arc-20160816; b=l9PvnncSJKEoDhFe2FViWfb6pFZ/slfJPaAQqLDAzmH4UstNJ2xYAGSefkkzz/f0Sp VGCzyf4u5PfzFJ7W8xJ/l1uaRvQ06RyLQAs2b01kLKVzMs8jSsR5dhlWmCFjPNFqzADn J8OFQXqyJNdMZmHiAIXo0AQylVCHpNeQ3SanLiI8Ye3FA+ZBHk8Vp5CZBzVDFtszbWzH 6l2qpGWU/8QA5szqXHeJDjtxCE/DN3YiiPI96BSQLsd2tKmiY+ArwZs0VZ1ugKA2du+u 4O7NcaWWQm80tnPJpjDxxKG1bEcSYv3pxKGTcF01d/MhG6GKAFQzB4AHTj1T+Ft1g+wA GCgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=fBlnd4XOswp/sg9aQW3gv5szg86tXu6TkQ8l/Mwzfog=; b=D7aHpLTIHnxUhHZlJlxpZ81Q9gUvfSJkSGcBJljYbxfBBvZU3UCdBVY+Aw4Bq1Yejl UvEetiLNyqkHN9a/vJ3dswuDMrx6xUAbjk7Xy4Gh5Z2WYrbxZhiW7OigE/URsmwINpVe dpzYY5SlhOb3Jtr+2Qpc15iJWgowgBRxqIdSjL/iwr3VvQJPfavIOOXM1IPyOCdjb9gr LVmnQfa5yG3VeilmQDupyf03JmmZdQBFZWy5bK6lFjtNDw4oIzkX1/ujPplQDsOyzYAQ ebTpap/7xBi8jnOfP16Y+pheWhLD5mqolqDS9gk7jarlfXCQTHu7/SEqMn2UrCTM2XH4 YanA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="nk/3rxvq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id si30-20020a170906cede00b0078dad659776si4674193ejb.320.2022.10.10.10.57.12; Mon, 10 Oct 2022 10:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="nk/3rxvq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbiJJRvq (ORCPT + 99 others); Mon, 10 Oct 2022 13:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiJJRvn (ORCPT ); Mon, 10 Oct 2022 13:51:43 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1721B15800 for ; Mon, 10 Oct 2022 10:51:43 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id o4-20020a258d84000000b006bcfc1aafbdso11341580ybl.14 for ; Mon, 10 Oct 2022 10:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fBlnd4XOswp/sg9aQW3gv5szg86tXu6TkQ8l/Mwzfog=; b=nk/3rxvqJoK9SyUHQWL4FrcBRa1u5cO4vRwonLiomf+mwgVgWWJI1zDI2WrsG4X70S nmYcNaaINMTJvz4X+rhldlAAsnDEIdQ1m/0le3N3a4jcmuJBnx7ADpYTD37EtiIQ8Ek4 UdZRVtpQ9jRuCSlVU0a7FPDzhLIVxEVRtxg1As+928YvNnSFB/ebJx9BGRXZ+TqF7Yvx 1RE2jxe2d5hBME089OeAg4k07EJx1sEL1FXum8kBR1LYise8GCM5CrRWtjtenaTYKGO8 7ToFnDGrUdgCeG5TNXYr09gkPBJU4y/mo/PCaw7hg1fsyCBRDaiMRFl5EKrZexrFlMpB 5aaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fBlnd4XOswp/sg9aQW3gv5szg86tXu6TkQ8l/Mwzfog=; b=6QGaUOqdvG3ITk7OeMKQbH1x2MtEyONPXZdUOj/CgBxacVcZdO3+kykbmb1gz2IfT5 zxR9MYSVYNwSfpfd3HWBnbyZrvQw0Rta87EKRzOt5Rn0B04T94fZ70faaYATFKCXGO4M JBjAjPQG23PUosIXsNFj3RiVR2AFC9mPaAK7l0HMSuczbBGyDbeiHoYZCUArQ6l3Y52J 29JhG1DxEAM4/5+2LmmvuIRKKzZ3S9QVMWrLbp2O70Doldim6M3wSNJzFRtEzZzNeWI8 5E3FNqTMjcmAW1qSkumdDvezZyuI9TetO7JGLDi5p0M5c6Z5Kc7FFTL/tVKZov2OY73E 2YNQ== X-Gm-Message-State: ACrzQf2i88HR0Xlj12lWUKhH/JN/v1fzLwUDGnWOb4DSSGgMNiOJkMwM nHOJDxH78TdKPB9KJQCZeATOEJ5QPm1Rxnr/HRI= X-Received: from ndesaulniers-desktop.svl.corp.google.com ([2620:0:100e:712:883d:1c60:2d47:598d]) (user=ndesaulniers job=sendgmr) by 2002:a81:d45:0:b0:356:d50d:d010 with SMTP id 66-20020a810d45000000b00356d50dd010mr18174102ywn.437.1665424302401; Mon, 10 Oct 2022 10:51:42 -0700 (PDT) Date: Mon, 10 Oct 2022 10:51:34 -0700 In-Reply-To: <202210072120.V1O2SuKY-lkp@intel.com> Mime-Version: 1.0 References: <202210072120.V1O2SuKY-lkp@intel.com> X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=UIrHvErwpgNbhCkRZAYSX0CFd/XFEwqX3D0xqtqjNug= X-Developer-Signature: v=1; a=ed25519-sha256; t=1665424294; l=2791; i=ndesaulniers@google.com; s=20220923; h=from:subject; bh=79P/bvbEb7lOxoUitL3cE1zzO5WZPlSo0wty3dVeQAY=; b=B5zs5846RZppHTs/CE8/c+09IEq445Jvsd3Vdr73h8bHw68EC4yYmabbF1udsPYDDSop/Y6KuyI3 Q9t55mKQDsfxtPXBKw7hoZQJMbxVuxixwsIYFa/HaIIjtnJ9joA3 X-Mailer: git-send-email 2.38.0.rc2.412.g84df46c1b4-goog Message-ID: <20221010175134.2671410-1-ndesaulniers@google.com> Subject: [PATCH] lib/xor: use r10 rather than r7 in xor_arm4regs_{2|3} From: Nick Desaulniers To: Russell King , Ard Biesheuvel Cc: Nathan Chancellor , Tom Rix , Herbert Xu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, "Steven Rostedt (Google)" , kernel test robot , kbuild-all@lists.01.org, Nick Desaulniers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kbuild test robot reports: In file included from crypto/xor.c:17: ./arch/arm/include/asm/xor.h:61:3: error: write to reserved register 'R7' GET_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:20:10: note: expanded from macro 'GET_BLOCK_4' __asm__("ldmia %0, {%1, %2, %3, %4}" \ ^ ./arch/arm/include/asm/xor.h:63:3: error: write to reserved register 'R7' PUT_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:42:23: note: expanded from macro 'PUT_BLOCK_4' __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" \ ^ ./arch/arm/include/asm/xor.h:83:3: error: write to reserved register 'R7' GET_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:20:10: note: expanded from macro 'GET_BLOCK_4' __asm__("ldmia %0, {%1, %2, %3, %4}" \ ^ ./arch/arm/include/asm/xor.h:86:3: error: write to reserved register 'R7' PUT_BLOCK_4(p1); ^ ./arch/arm/include/asm/xor.h:42:23: note: expanded from macro 'PUT_BLOCK_4' __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" \ ^ Thumb2 uses r7 rather than r11 as the frame pointer. Let's use r10 rather than r7 for these temporaries. Link: https://github.com/ClangBuiltLinux/linux/issues/1732 Link: https://lore.kernel.org/llvm/202210072120.V1O2SuKY-lkp@intel.com/ Reported-by: kernel test robot Suggested-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers --- arch/arm/include/asm/xor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/xor.h b/arch/arm/include/asm/xor.h index 669cad5194d3..934b549905f5 100644 --- a/arch/arm/include/asm/xor.h +++ b/arch/arm/include/asm/xor.h @@ -51,7 +51,7 @@ xor_arm4regs_2(unsigned long bytes, unsigned long * __restrict p1, register unsigned int a1 __asm__("r4"); register unsigned int a2 __asm__("r5"); register unsigned int a3 __asm__("r6"); - register unsigned int a4 __asm__("r7"); + register unsigned int a4 __asm__("r10"); register unsigned int b1 __asm__("r8"); register unsigned int b2 __asm__("r9"); register unsigned int b3 __asm__("ip"); @@ -73,7 +73,7 @@ xor_arm4regs_3(unsigned long bytes, unsigned long * __restrict p1, register unsigned int a1 __asm__("r4"); register unsigned int a2 __asm__("r5"); register unsigned int a3 __asm__("r6"); - register unsigned int a4 __asm__("r7"); + register unsigned int a4 __asm__("r10"); register unsigned int b1 __asm__("r8"); register unsigned int b2 __asm__("r9"); register unsigned int b3 __asm__("ip"); -- 2.38.0.rc2.412.g84df46c1b4-goog