Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1951715imm; Thu, 24 May 2018 03:30:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoProQ6JVOpBalqxDkTuTBZRno0RbelWDwMGENPTT2ClAgx5wntJjRYwxJgvIYS7tbusVAO X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr6624164pfe.115.1527157819998; Thu, 24 May 2018 03:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157819; cv=none; d=google.com; s=arc-20160816; b=hdoh5TBMeCM7cvgb+KULN8cO8hHQD2rFjNhNRkgTSPkkvT0cgXLsWKbwmGzBTMt3HD 2Sa5gF7QJ4T4vcTYngsw/ZFmhoDXhGj+pCk8GgzVrnMkCOZUQUTsy+b7eYe8I/yAgkUL ZqRGlwFFn5UYdDYsbDHEIcCE9hWAHrzasKajEL+cfOZQ/IJdn62hVGxBEvZJZ+hyjBZv qe6Eg3pNjtRwAjYa+7HW7jCSCBMgGcOadUYw+ZSiOnSzZd71lnl/UlWaCfbGVR3Bpu/v Y1bLROtzozFx+ssCHPSXJb+K3m2wgOrB14wnSzd/hMOeaJ3PwP3rcyR9qiMUYXY1yvhw cMjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wfc+JUlc33MCoAf6Zb1Tti8VJCzT1KNbEo7ykm4++8M=; b=d5xd2xB2YxNpvYfFDmTC5NRxbrxDokk+NhQaroRwtCp7e6P3DUAd/bH30SGAaDESt1 IHwPPG2pL965yBNBWiSxufRqnaPY4H++fUZsBeG0x1FUZd4lcIRm/kZ7a8y+d6MMj89E gFnVD0iZOEzorUpaMmnHrlZDQFsH6sJHVNIPX12w5IxhiP0z1w7ocdBrm1UB1uIKg8hX Y1KwtJK00nd5bbdWVo07smS5N148GfCoEJm8Z274eQ+5xsdFTrqHBMXt4Fm0P4FunoPD yfbTti71bzujd1wCpTO85MrwAPX0ZM+zRwhzLpHoM2sczOrV6ojzqUo/+J9nH+CO187I i44A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c9wlPaa9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si20690281plb.478.2018.05.24.03.30.05; Thu, 24 May 2018 03:30:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c9wlPaa9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032072AbeEXK2R (ORCPT + 99 others); Thu, 24 May 2018 06:28:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:47112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030942AbeEXKB2 (ORCPT ); Thu, 24 May 2018 06:01:28 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D74C820870; Thu, 24 May 2018 10:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156088; bh=Za6fSgz3ukevvz0OBoqJO+8oIWrWiF3XCPhQ+hDua0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9wlPaa9kDPLrK2T27kGf054gMsOSHDa48l0uf23re99LcANJKPEgeWahf6+XdnCW Ssqgr9H9WTQ1FQLgN5SxQMlN/1CsAai/O0Yf7UwiidKSlwBYInbOgZW5vQW0gZkWm4 gwBpz3mbDRPZdMhzhyDQLAPA7Wb4r81Ht3LJ5Dk8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Martin Schwidefsky , Hendrik Brueckner Subject: [PATCH 4.16 058/161] s390/lib: use expoline for indirect branches Date: Thu, 24 May 2018 11:38:03 +0200 Message-Id: <20180524093025.442341036@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Martin Schwidefsky [ Upstream commit 97489e0663fa700d6e7febddc43b58df98d7bcda ] The return from the memmove, memset, memcpy, __memset16, __memset32 and __memset64 functions are done with "br %r14". These are indirect branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- arch/s390/lib/mem.S | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) --- a/arch/s390/lib/mem.S +++ b/arch/s390/lib/mem.S @@ -7,6 +7,9 @@ #include #include +#include + + GEN_BR_THUNK %r14 /* * void *memmove(void *dest, const void *src, size_t n) @@ -33,14 +36,14 @@ ENTRY(memmove) .Lmemmove_forward_remainder: larl %r5,.Lmemmove_mvc ex %r4,0(%r5) - br %r14 + BR_EX %r14 .Lmemmove_reverse: ic %r0,0(%r4,%r3) stc %r0,0(%r4,%r1) brctg %r4,.Lmemmove_reverse ic %r0,0(%r4,%r3) stc %r0,0(%r4,%r1) - br %r14 + BR_EX %r14 .Lmemmove_mvc: mvc 0(1,%r1),0(%r3) EXPORT_SYMBOL(memmove) @@ -77,7 +80,7 @@ ENTRY(memset) .Lmemset_clear_remainder: larl %r3,.Lmemset_xc ex %r4,0(%r3) - br %r14 + BR_EX %r14 .Lmemset_fill: cghi %r4,1 lgr %r1,%r2 @@ -95,10 +98,10 @@ ENTRY(memset) stc %r3,0(%r1) larl %r5,.Lmemset_mvc ex %r4,0(%r5) - br %r14 + BR_EX %r14 .Lmemset_fill_exit: stc %r3,0(%r1) - br %r14 + BR_EX %r14 .Lmemset_xc: xc 0(1,%r1),0(%r1) .Lmemset_mvc: @@ -121,7 +124,7 @@ ENTRY(memcpy) .Lmemcpy_remainder: larl %r5,.Lmemcpy_mvc ex %r4,0(%r5) - br %r14 + BR_EX %r14 .Lmemcpy_loop: mvc 0(256,%r1),0(%r3) la %r1,256(%r1) @@ -159,10 +162,10 @@ ENTRY(__memset\bits) \insn %r3,0(%r1) larl %r5,.L__memset_mvc\bits ex %r4,0(%r5) - br %r14 + BR_EX %r14 .L__memset_exit\bits: \insn %r3,0(%r2) - br %r14 + BR_EX %r14 .L__memset_mvc\bits: mvc \bytes(1,%r1),0(%r1) .endm