Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4323375ioa; Wed, 27 Apr 2022 00:44:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0v56p8D6slNNR4I5Dyifx1qok/LWSAy4alhhaD55kgge3NSI6rsGzNOWFwCUBNe0/p963 X-Received: by 2002:aa7:9110:0:b0:4fa:e388:af57 with SMTP id 16-20020aa79110000000b004fae388af57mr28411766pfh.1.1651045490444; Wed, 27 Apr 2022 00:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651045490; cv=none; d=google.com; s=arc-20160816; b=o7VD60h+un4dC66xUyy8lgro4B4JMRIaUxGl1Q+VxOQjrRcmy+9jxfn0vuSz1GyCJX Ci0ap0MiIIX/GZd8pekyY9C8yuyPSdCRUb2JvdsVeuhRaIMu4lJ4pVzEC42t6c6vEDwV JOFTpE/6RDqAcQELGB5BMKJT6AN/d3pr60IN09JFkTTKC/WNtJ/I4h1YSNVVUFO/Sh3n V/1+6sTNz8IRMO1LNe5H7Nxy3HoX3qZvRgkLwXx2iOadiAfgCw+nmVHkP0jzNjQWYjxX +mU7Kmb0EwSak4hncBrqTJVkc7SUOwotDM3insBYS2Sy13n78HeXnL94eDyhyKKml+qM V+Xg== 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=gqh9YYfL9+Pxi74LL+sdgtB27Rcpda5pj9Fb0VhacCo=; b=JZQLN3+Up35ANmF3FDnVZpO7nqkZBFUJE8RMOtKl9Z6f1jfbOFgrtquNszWdO6Ru8A rUyphctTrSsHYJN1iavjMC5MMkKvWPwIZebs+8amdGxuaeG7hD9UdevDwN4mNhE1ntzd C+om4w/tOn0XUsHUCguMtrZkzmZmuc8Z/jplYeKeDMxSSvajmJMvwMvBUMp8pmzSWaPS QQ1bMxUNc9Iv4Z/DYiJGOsBayV/ToyLY4PKo6hjd1I+qtszRZ5HGxs0HxPDLZnbL5ZJy mT2rf0E7tcfdEv+Yfb224lUpHaqWIytNhdoWJiQyEH6l1TkqZ2fvfDhMkKx+6AK4Kzsg jegQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2LJRHLZi; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i23-20020a63d457000000b003a75aa6cc74si732324pgj.814.2022.04.27.00.44.36; Wed, 27 Apr 2022 00:44:50 -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=@linuxfoundation.org header.s=korg header.b=2LJRHLZi; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347150AbiDZJTb (ORCPT + 99 others); Tue, 26 Apr 2022 05:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346064AbiDZIyF (ORCPT ); Tue, 26 Apr 2022 04:54:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D6CDA6DD; Tue, 26 Apr 2022 01:41:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id 24812B81CF0; Tue, 26 Apr 2022 08:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60BFFC385A0; Tue, 26 Apr 2022 08:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962462; bh=Wt2pwS5chaUbBRJuBDKVa2Ii4R6pBPHlO8KbXsTNmGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2LJRHLZivD5GlR0hsE1mRuq9toePwigR4Cv5wqD4z9XsKUTsHUfij0DoFxPKYWf8w 1uoKOjjPfhe3XMz9Btkr2mC8jj+EDPEH2vFyTDuA1LFm7kYcpPvZ8osLp3o5KRcWex Jx5kuJcGnmkSxbHXHVK+NkSw00jwkqkiwi4pidms= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Matyukevich , Vineet Gupta Subject: [PATCH 5.15 105/124] ARC: entry: fix syscall_trace_exit argument Date: Tue, 26 Apr 2022 10:21:46 +0200 Message-Id: <20220426081750.281218016@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@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=-7.7 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 From: Sergey Matyukevich commit b1c6ecfdd06907554518ec384ce8e99889d15193 upstream. Function syscall_trace_exit expects pointer to pt_regs. However r0 is also used to keep syscall return value. Restore pointer to pt_regs before calling syscall_trace_exit. Cc: Signed-off-by: Sergey Matyukevich Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- arch/arc/kernel/entry.S | 1 + 1 file changed, 1 insertion(+) --- a/arch/arc/kernel/entry.S +++ b/arch/arc/kernel/entry.S @@ -196,6 +196,7 @@ tracesys_exit: st r0, [sp, PT_r0] ; sys call return value in pt_regs ;POST Sys Call Ptrace Hook + mov r0, sp ; pt_regs needed bl @syscall_trace_exit b ret_from_exception ; NOT ret_from_system_call at is saves r0 which ; we'd done before calling post hook above