Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp863263pxb; Wed, 15 Sep 2021 15:22:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwz4TDQn/Pr7P077CgSXZrAJvDgB/Gkist4NjjfaLcWRp/NY0gqTGsYsn9NMwwUqwbR4kTB X-Received: by 2002:a6b:b883:: with SMTP id i125mr1931589iof.144.1631744521514; Wed, 15 Sep 2021 15:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631744521; cv=none; d=google.com; s=arc-20160816; b=cLVYBYU1gQnpgzr80GreXwdoo7QH5ThC/nJlDsAdl6dbOzWsz7vwzpCFC1bnDV+ehw DZvkjyK8A4XkOPbyPwIMeQ73ad8QmHfTGqgwgOhZEK8hqDXvS5CQzXZ38A3OtiCVm8Ru /IhyAiu3b8BkcT7bwt+QirNuJVBJ0IX1fznNxpqhGgiHbCh1RaXZpUJ0egHs/NXU5bNt aXBC7cWpY/3jpN0xpA+z7G5RflG2MhXJg9Azy9EVpVioSg0cmlwq7eLhC2J/Q2LAdtNc rJU4BIMAdvpAbkyXuo4TNaf1Fikc98t5kxQr7mTxNtnewPINLjHyQBANKZz9cDJXFDVc fslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=NM8i/UdoQZLwyBLW2erL7u2GZQeN1E2oMNEHemsAuX4=; b=fFnfLTZ0RTGE52cTlbpMs3WiIeou2Wvjqel+sOsx8ctWIUnCb8nxrm7qvCW6eA4JLe /9WIhZm+jJtly0LlLDKQYIqPF/kpx56ig4ClbYce0mPKcR8JuPbuMUhHNBkVJZ8u3W1e QmSPzwRtIHYwRJvmkgVxGOHyj+zm9YJgvF6BUGtyvxoPcVzCpbeYZStghjUO6rTNEeCl Fv9qdl/u1cugpVgUDvlYnDEWPev0viCX9myV6GIXb+QypRdfGiSxWbhBmF26HYVlj29D PzpYgdUUUPhgz/FTNzvTMBt7Tempz0JVM8kEZpPsc/t1MI59GbO3Lo8X353F0V0EBlE4 Ic6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FyuEZKOX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si1177264jaa.58.2021.09.15.15.21.35; Wed, 15 Sep 2021 15:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FyuEZKOX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232442AbhIOWU5 (ORCPT + 99 others); Wed, 15 Sep 2021 18:20:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231969AbhIOWU4 (ORCPT ); Wed, 15 Sep 2021 18:20:56 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11B4CC061764 for ; Wed, 15 Sep 2021 15:19:37 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id e16so4047379pfc.6 for ; Wed, 15 Sep 2021 15:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=NM8i/UdoQZLwyBLW2erL7u2GZQeN1E2oMNEHemsAuX4=; b=FyuEZKOXvPe58EtcdQq58xV1eadbZcmFX9ED9Yw4+hjeUb5d9gVDG+0pshyFRcYNBg F5h+RU7/TORme7In6WWZsQWfsRW7oDlLqh2btmvtHnbwJ5Szb6OUxg5cTu3ykbMHR1tb IZn8VVlpmoTiAZJEr+/G1RRmxidolo+UenstSKH9xjXYG0BpmCmLhyvRw2PERUt8N+Ic VRgfkjaD2U8yGSGTWcEp2++VHbSOArXh5sL+aKWZYRzCTzmtwwAUdU6cCmXAbN1FT9Nc Un77475qDgUD/kiX5VnE+MD7Hx1JpQb+m8oy6GTSUJZeNyP2721q1EnDTOJpFMBhz1mh 5tjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=NM8i/UdoQZLwyBLW2erL7u2GZQeN1E2oMNEHemsAuX4=; b=g/g8WB7MHN3ii9ET4qF0AsTj2QAVZ5yQbk27j+cq8Mp+bwODbyu4uKVFRS9/RTDLt7 dSWWGjPJHIlsia64IPSj8mZtqDfiegsnpNEP7RZqukC3dv0tQDXs15AbztzujLEmkFiO fYAejO4avFH7yYuGbU//ndq8N88KbJRQikBej2CbsMK+Lsy1ldUVroil9BFQ+ZqSLKnr K6t5n14ZzZsWF/HtT0AbwEmRjZVFQxa30NbnzIX2JNyTwolcndvQTs2L/d5gmNTKc7ev dHCiRE3NI9eHPjSi7YfqrX5uMMpOYwolZc0jasi51zzSyi8oQPE+bsqd027fZehKGuy4 8pxQ== X-Gm-Message-State: AOAM532KTO874KhCie6EaFiyWARkxo4V+/74UdUmG8fmMR0lLjj7+aVo LK3uapc+Y8lesaU/WCtVYskqI7lwnXo= X-Received: by 2002:aa7:8d58:0:b0:439:d68:b405 with SMTP id s24-20020aa78d58000000b004390d68b405mr1931114pfe.2.1631744376163; Wed, 15 Sep 2021 15:19:36 -0700 (PDT) Received: from ?IPv6:2001:df0:0:200c:9b0:7226:558a:f377? ([2001:df0:0:200c:9b0:7226:558a:f377]) by smtp.gmail.com with ESMTPSA id pc3sm5620593pjb.0.2021.09.15.15.19.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Sep 2021 15:19:35 -0700 (PDT) Subject: Re: [PATCH 2/3] m68k: update ->thread.esp0 before calling syscall_trace() in ret_from_signal To: Al Viro , linux-m68k@lists.linux-m68k.org Cc: Geert Uytterhoeven , Greg Ungerer , linux-kernel@vger.kernel.org References: From: Michael Schmitz Message-ID: Date: Thu, 16 Sep 2021 10:19:31 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Al, On 26/07/21 5:19 am, Al Viro wrote: > We get there when sigreturn has performed obscene acts on kernel stack; > in particular, the location of pt_regs has shifted. We are about to call > syscall_trace(), which might stop for tracer. If that happens, we'd better > have task_pt_regs() returning correct result... > > Fucked-up-by: Al Viro > Fixes: bd6f56a75bb2 ("m68k: Missing syscall_trace() on sigreturn") > Signed-off-by: Al Viro Looking good also, and should go to -stable. Tested-by: Michael Schmitz Reviewed-by: Michael Schmitz > --- > arch/m68k/kernel/entry.S | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S > index 9dd76fbb7c6b..ff9e842cec0f 100644 > --- a/arch/m68k/kernel/entry.S > +++ b/arch/m68k/kernel/entry.S > @@ -186,6 +186,8 @@ ENTRY(ret_from_signal) > movel %curptr@(TASK_STACK),%a1 > tstb %a1@(TINFO_FLAGS+2) > jge 1f > + lea %sp@(SWITCH_STACK_SIZE),%a1 > + movel %a1,%curptr@(TASK_THREAD+THREAD_ESP0) > jbsr syscall_trace > 1: RESTORE_SWITCH_STACK > addql #4,%sp