Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1917096imm; Thu, 24 May 2018 02:54:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpBD2EWxpSH3PCel8uL7OKA/0k+6iHLgk4XjVHBG8lK3zIWSrme+sCMCHRfFB47VKQbhrJW X-Received: by 2002:a62:c2c7:: with SMTP id w68-v6mr6515994pfk.174.1527155670227; Thu, 24 May 2018 02:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155670; cv=none; d=google.com; s=arc-20160816; b=n3+LQsrGTkHwbrXP+lU1eN4UfxIIqHK2MHl1elHs3xscT/QQ/CIc1Ar2QikePJBuPi f3ypTuLHqccPgEpWwt4v8dvlJhY9e/SfrEHybXFyVXVWT5dZduosZZBlO2N9gqcTSZQB fv0OXdzWNd4/NLBBQEH2wcBW9jvZ97TUNUhy6X4yABvP05VNwXzIaOWFn3ujA5C2MpPv WstjotiKEDKtSR0cOvWNjO9pUzHbYn5cYhxou6nG2I7I1AmcF1Hx9FtgxyfxTi4XcJ3H qtTYcFIsnDm6c9S47BbdPOgDK+tFdpBmwwoaMkYHYnaUFwy+wtVya/E7beO1bA1nBekE 04xw== 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=CRHBAGfqwMsXowRgKZm7NfWeQp56JjQEqR29zT3qDaY=; b=HD8Ne1C1ienDzONQukYgM4B7rsvAhQJJUW++lrmos6GXIqiLgtOk28CvAsg6rng/8C NrZEjON56t/TTKSQRrQwTL1AABbuR8LAk0BmDm+sI4+fgkulpDR9s4T8gkJHZk8rp6Pl 8YVJkWTx05sd/hYjb76QMhRHPRe32CE6P/0CuoYAjHM3tjQA8wDHGjEpdhr5E7RZYDZm JuLjyYXO2HSEjahNTjMNEuNGuS4Me0NfTQMqlmReQ7QMXET01/ivustR76qsmzJ9W43e Vf18oVWHB3LcVua8S1+IM3jAK0JkYW6+b3u9kLwLx/uVnCC2S3qYf+x3tRgCIsWcbIjM bYPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DPRrGfU+; 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 l125-v6si10129300pgl.410.2018.05.24.02.54.15; Thu, 24 May 2018 02:54:30 -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=DPRrGfU+; 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 S967729AbeEXJx0 (ORCPT + 99 others); Thu, 24 May 2018 05:53:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:58580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967476AbeEXJxT (ORCPT ); Thu, 24 May 2018 05:53:19 -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 F2F3820897; Thu, 24 May 2018 09:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155598; bh=61o4gWYqHpsf84mR8M3PaWhbmfzeW9YMDSWIzjg2FdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DPRrGfU+ubzGO+YzYcHkL8ht0LOZS/CB+EWlSCGxMTz78H94yRs9VW392BGy2w7+L T/AryWWxNLjHzDiuERE0DLaQNWBP2IemPVkc30wUYsxRZeMOzLB27MkGqhZmzDpPkQ //iBJStSAxixkQdNBOo45KNRmmsyEs1XEh1XveNM= 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.14 040/165] s390/lib: use expoline for indirect branches Date: Thu, 24 May 2018 11:37:26 +0200 Message-Id: <20180524093623.603335457@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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.14-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 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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: stc %r3,0(%r2) cghi %r4,1 @@ -94,7 +97,7 @@ ENTRY(memset) .Lmemset_fill_remainder: larl %r3,.Lmemset_mvc ex %r4,0(%r3) - br %r14 + BR_EX %r14 .Lmemset_xc: xc 0(1,%r1),0(%r1) .Lmemset_mvc: @@ -117,7 +120,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)