Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp935461pxb; Wed, 6 Apr 2022 04:46:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8eHXcs40BowKTZgoW5TL6mm8xhaTjLA3Y5APaz5Yf0XrhADpD6F2J/rJuebCZBf+0nZPw X-Received: by 2002:a63:e952:0:b0:382:65eb:257 with SMTP id q18-20020a63e952000000b0038265eb0257mr6736342pgj.465.1649245583510; Wed, 06 Apr 2022 04:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649245583; cv=none; d=google.com; s=arc-20160816; b=FG7EK+br4p3PIcgUc2nsofCr5uOIOarpP7hHwmmjsHc50YNdRgoOgSmYN+tMXFiad4 Ork+0v2bDdNUD9NwPBpnYeJnpaVI7ud3bsdxeLXEMop1NR79l20ijZSlCMezH7uOsNzw kuFd9Cx0IGKdrg9y9k7nngPsrq+Hlwrh34fjVbbCbRIHRP4oSJJJcHJu8buw4mbeUzOq 0RO9y/W1kJSvKqLnwF6eo1mY3OggyyxIJMYOu2xxdvrOlwhNO2Vwf/yFRLPPj8jn/9D7 CQWlBsSqjgG+3JbBX3ScUqLfkNAlafwGWSk2xMVkgzoc1H+HKG74IBluhsnHqIuKqEJ0 BARA== 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=tDxIaN96xjpw6WvGHCmom0z1hMDqEyT8CVPxWCTngQg=; b=KhWghnCFe+P7Bat05I1sXr7VT9udSPlY4NgnczBFYd+8pYBG2fk0MUSNyPoIWLuUrx de+oXOoh+brjZh0obTFfvFtXnOnmczX3lh6Md0cYhXcIjxuSDVz3YtqVeS5+4m0ze2uO OY2/6BrU9aGE8l7vfU4q8IoeuH0bDGfPRm1LogwF/gqjvqdsqKIHJ4Iw4vtLvwBTN6ih 2SX6jGFPP7wruXOEuaBPbJsc5vAE2UY1TzhtiXkkZkO7elRxa3Hk07I0xdFeHvdy7wtP u1VqXsMmtgev0oYJ0iRhZrByYtrSPRLXuv8f/b+ofnwQ3GzazjH7a5j/XWIspTteZ3je qAzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l9bmCvbS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e1-20020a631e01000000b003816ff8f842si15614098pge.415.2022.04.06.04.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:46:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=l9bmCvbS; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7F35D55C793; Wed, 6 Apr 2022 03:03:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353279AbiDEKF4 (ORCPT + 99 others); Tue, 5 Apr 2022 06:05:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240494AbiDEIcD (ORCPT ); Tue, 5 Apr 2022 04:32:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF40D7246C; Tue, 5 Apr 2022 01:24:30 -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 558E460FFC; Tue, 5 Apr 2022 08:24:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F005C385A2; Tue, 5 Apr 2022 08:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649147068; bh=8Lxz8YXku8+/UbywXNde6FytYLkgLbFrUsn5jXKeWto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l9bmCvbSwkrfxTzTzJKs0GEoVb/TDtXbdvJ8j1UJX86/nqC4gpb/wDmVKkXFbuHt9 rcYUe4NSnPHjxcOlTkkBij8NAPiAUBbMWniDPyYkjx6G8Xp3IfHPCIUqoiQaB9Phb3 2ixpQblbj1jhrO5QNADL6fj/5G+Qc58iGoATujZE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Anders Roxell , Segher Boessenkool , Michael Ellerman Subject: [PATCH 5.17 0963/1126] powerpc/lib/sstep: Fix build errors with newer binutils Date: Tue, 5 Apr 2022 09:28:30 +0200 Message-Id: <20220405070435.774343569@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Anders Roxell commit 8219d31effa7be5dbc7ff915d7970672e028c701 upstream. Building tinyconfig with gcc (Debian 11.2.0-16) and assembler (Debian 2.37.90.20220207) the following build error shows up: {standard input}: Assembler messages: {standard input}:10576: Error: unrecognized opcode: `stbcx.' {standard input}:10680: Error: unrecognized opcode: `lharx' {standard input}:10694: Error: unrecognized opcode: `lbarx' Rework to add assembler directives [1] around the instruction. The problem with this might be that we can trick a power6 into single-stepping through an stbcx. for instance, and it will execute that in kernel mode. [1] https://sourceware.org/binutils/docs/as/PowerPC_002dPseudo.html#PowerPC_002dPseudo Fixes: 350779a29f11 ("powerpc: Handle most loads and stores in instruction emulation code") Cc: stable@vger.kernel.org # v4.14+ Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell Reviewed-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220224162215.3406642-3-anders.roxell@linaro.org Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/lib/sstep.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c @@ -1097,7 +1097,10 @@ NOKPROBE_SYMBOL(emulate_dcbz); #define __put_user_asmx(x, addr, err, op, cr) \ __asm__ __volatile__( \ + ".machine push\n" \ + ".machine power8\n" \ "1: " op " %2,0,%3\n" \ + ".machine pop\n" \ " mfcr %1\n" \ "2:\n" \ ".section .fixup,\"ax\"\n" \ @@ -1110,7 +1113,10 @@ NOKPROBE_SYMBOL(emulate_dcbz); #define __get_user_asmx(x, addr, err, op) \ __asm__ __volatile__( \ + ".machine push\n" \ + ".machine power8\n" \ "1: "op" %1,0,%2\n" \ + ".machine pop\n" \ "2:\n" \ ".section .fixup,\"ax\"\n" \ "3: li %0,%3\n" \