Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4533332rwi; Mon, 17 Oct 2022 07:30:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6e/zWqOG5UcPOI5gXncEMAq3efqrOvj2jLvHG/QKxZqBi5o6JJiGuVMOiXIq1B/DRjiAID X-Received: by 2002:a62:1e83:0:b0:545:6896:188 with SMTP id e125-20020a621e83000000b0054568960188mr12706398pfe.51.1666017023137; Mon, 17 Oct 2022 07:30:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666017023; cv=none; d=google.com; s=arc-20160816; b=bIu+Q1TeXnl8Z7XyxwpaJexT1ER9NIPcyiAhcAVYibHxlCCS4grAwmSIC5lgNHODJS q0SV1h9BpLgkO2pZnxZMhws84EVtqXMqRyG1AiSy3aO8wcUqokuT8UkjujPpRo6nrGT6 1fyHXcfqB2daucxoVQRGgODHXaflxIN2r2RID+O9WSYrn8XXY6Mi7xMpYGo24RQXXaMS bowqum/qqc8Rbgfuv0VSVOqN2GSJdOViHcGeCDGjUGfl+x48vGT8TSfTCpGXZECXxhlU 6Ucv0ibmzHkEU5ZMzimNLHusl2wz/aOBCJlkMoED70p5OzLcKZqzBKMF3xN32OmgDraq lPxg== 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:dkim-signature; bh=iW2GiO48mPmwygTs8a42H1kPiWmR4e0MC4/6FvFqwuc=; b=AxLZ6VmyFlQeKWzbzxgNd8aIl7PrGo0QwcIX2Ycb9o5FWAsfFX/Upr3rLj5F7otSR3 VkmP/cQzTDcAN7cyk5l9din0SPhlTPob5hzFfl7QdpDrQqnqZKkS5F89T3NvNUM90ABY 588n54d208eo9h5QF7ApsNdRsSvKqeTH7LJpXXUCy/rw0I87C/t8rLEmO4IlCV2r7MiY WMgymJ6VCpdDYVPuVjLtN4lEJWIVWhdYP0DNXnIuGAmmrtUsLBeGhcf+7NS1BCVzW8Ty rm3mR63bmLlgX2RSrl8QCaW3jO5y/byfqynOUK9SbDYtj1nF/btkyDC3G49zNTnP/ene j6GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rutma+kR; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a656ab1000000b004347b49d045si13022548pgu.631.2022.10.17.07.29.44; Mon, 17 Oct 2022 07:30:23 -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=@kernel.org header.s=k20201202 header.b=rutma+kR; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbiJQNuI (ORCPT + 99 others); Mon, 17 Oct 2022 09:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbiJQNuE (ORCPT ); Mon, 17 Oct 2022 09:50:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF72A1EC69 for ; Mon, 17 Oct 2022 06:49:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E277261143 for ; Mon, 17 Oct 2022 13:49:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DDD5C433C1 for ; Mon, 17 Oct 2022 13:49:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666014596; bh=cVbTBys4QY/+4OrJqqpY4vnMEBSGMFjEPQuoM2lpzek=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rutma+kRxkw7vk2KlS6yGAiGODDwXBzfJz4ZHhOcXQqqT4T+rYgJq8CJBcWd9VTrZ rg/IawzhiiXlN1eWGQ+7Z3ZL28h/yUfl0U+TXYCTrrqh+/bbRIFHB6TeG0eoonDqj1 G3/9gu/3MEbiMoDWWUWqhUwt5X4H0zgwEVzw/AbibinItrI7XAl00vrxkyFGESYiJ0 dtf/0E67Hi1SNnKhxHGOUAokqIf6jFC/yNtZs5/o9mqXar1oIiZlKxlP66O0NJ7vSs sqLGLAOFgDm9X+RY1tyU9RFtYLcMmL3kpjxs25yPUXGcH8jsgAKg0Lhq+PcC2TvkXl htUFcsVqWeriQ== Received: by mail-lf1-f49.google.com with SMTP id g1so17587802lfu.12 for ; Mon, 17 Oct 2022 06:49:56 -0700 (PDT) X-Gm-Message-State: ACrzQf3ELzmGTlMHe57IhaEFseGuoOO+Wo9lRO8a7/pfUe9uLRUBLL1A Hg+PiMhk00IMjYNHUaZdIWNw4nRCqf8PsyGNOOE= X-Received: by 2002:a05:6512:150e:b0:492:d9fd:9bdf with SMTP id bq14-20020a056512150e00b00492d9fd9bdfmr3823504lfb.583.1666014594327; Mon, 17 Oct 2022 06:49:54 -0700 (PDT) MIME-Version: 1.0 References: <202210072120.V1O2SuKY-lkp@intel.com> <20221010175134.2671410-1-ndesaulniers@google.com> In-Reply-To: <20221010175134.2671410-1-ndesaulniers@google.com> From: Ard Biesheuvel Date: Mon, 17 Oct 2022 15:49:42 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] lib/xor: use r10 rather than r7 in xor_arm4regs_{2|3} To: Nick Desaulniers Cc: Russell King , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, 10 Oct 2022 at 19:51, Nick Desaulniers wrote: > > 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 Reviewed-by: Ard Biesheuvel > --- > 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 >