From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2271C48BDF for ; Sat, 19 Jun 2021 01:32:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADE5961279 for ; Sat, 19 Jun 2021 01:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235310AbhFSBen (ORCPT ); Fri, 18 Jun 2021 21:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234846AbhFSBen (ORCPT ); Fri, 18 Jun 2021 21:34:43 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 752F5C061574 for ; Fri, 18 Jun 2021 18:32:32 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id k6so9042669pfk.12 for ; Fri, 18 Jun 2021 18:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=YwFHnlTTaMz13RCYRIL+2y1iQwoDWlR2YjoEQFcO4UM=; b=DSVcX9VOp0AoRrwhOjcyfdYMAXkkdNjdTqQkymnNL2WFFE+veeahA6zvyoqjiUQGEx RE9jwhCayyQg+t+dHq5wT5ZcUR0BD27bD0L+/U/qgwA6xhyjpujFmwG+v17rq786pzJf yUGZemyVbgYZQ2owVxXRhMp6YYDYGiJmry7ligWI+2Gql4bW2RyvDX9ZID1a8ZgP17Ie d9Xj1Pko35WaXqlqNqn/uK4KFT3iOcNyl8luouByQ/69e4WihxIyvmEVil5d/+yvMuP1 c6jqM/f5OxxUJrD5W8VTB8OrxyOA9Vor2YDZQF0kO5y21uDyP6gl317z45E03e6xFE62 WaFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=YwFHnlTTaMz13RCYRIL+2y1iQwoDWlR2YjoEQFcO4UM=; b=GJEP03ubzWoYccd7RWOjqVpO+ULzJaqLaZS9IftgbOM84X6dIbxtBPxlj3IPMCwoYw nwJlbCFD1dbxDasMD851/BZSpPPtVw6IlZnYFQRDs3gDa4gy5wwoshIGCOR2vxcWq6VB w34vLlkwIWDS++bC96pjnCY+KvvVtj1aIZryhmwoSwTDYPJUQs8AJ3UbyRS94ascIBSP XgOX/L9Za5u6M2/4fOpKwhhGQm6TIpeYNYzPxMX+ZxLJvTDAcp2qOK4gyIwOa0cOzu0X kX5VrEhvIYHY1WGFZH0MJZddqvzL1Os9g4Ld9GPCne6b0w9eNSvQqtkl3Pab7Rss3b1E iPWA== X-Gm-Message-State: AOAM5323LB6tcWKKd4mqSXJqySDQdU7TwXebxUX/giE24PdlYoDRsVjm j4IX9TPUbk3RALt7JQeVQvI= X-Google-Smtp-Source: ABdhPJwMtlZprDlyAoxBUyRJHHVl53TnITK8Gnm+SkvEU6OKpcuiyQspgUb4DGPupv+yjGOQi2UZwQ== X-Received: by 2002:a62:834f:0:b029:2f2:9935:8fcb with SMTP id h76-20020a62834f0000b02902f299358fcbmr7863733pfe.68.1624066352036; Fri, 18 Jun 2021 18:32:32 -0700 (PDT) Received: from [10.1.1.25] (222-152-189-137-fibre.sparkbb.co.nz. [222.152.189.137]) by smtp.gmail.com with ESMTPSA id v6sm10522032pgk.33.2021.06.18.18.32.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jun 2021 18:32:31 -0700 (PDT) Subject: Re: [PATCH v2] m68k: save extra registers on more syscall entry points To: Linus Torvalds References: <1623979642-14983-1-git-send-email-schmitzmic@gmail.com> <91865b90-c597-6119-5e14-dfe521a33489@gmail.com> Cc: Geert Uytterhoeven , linux-arch , linux-m68k , "Eric W. Biederman" , Andreas Schwab From: Michael Schmitz Message-ID: <2b2ba866-104c-afea-9c29-145e9d80c2d5@gmail.com> Date: Sat, 19 Jun 2021 13:32:23 +1200 User-Agent: Mozilla/5.0 (X11; Linux ppc; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org Hi Linus, Am 19.06.2021 um 11:38 schrieb Linus Torvalds: > On Fri, Jun 18, 2021 at 3:34 PM Michael Schmitz wrote: >> >> Is your patch to copy_thread() to add the extra stack frame still needed? > > So it's been a long time since I did any m68k assembly, but I think > the m68k patch for the PF_IO_WORKER thread case should look something > like the attached. > > Note: my only m68k work was ever on the 68008, and used the Motorola > syntax, not the odd Sun assembler syntax, so my m68k asm skills really > aren't good. > > Put another way: I'd be surprised if the attached patch actually > works, but I think it's fairly close. I tried to add comments to > explain the code at least a bit. That went well: *** FORMAT ERROR *** FORMAT=0 Current process id is 1 BAD KERNEL TRAP: 00000000 Modules linked in: PC: [<00002af0>] resume_userspace+0x14/0x16 SR: 2204 SP: (ptrval) a2: 00000000 d0: 00000000 d1: 00000000 d2: 00000000 d3: 00000000 d4: 00000000 d5: 00000000 a0: 00000000 a1: 00000000 Process init (pid: 1, task=(ptrval)) Frame format=0 Stack from 0081bffc: 19bc0000 Call Trace: Code: 1029 0007 660c 4cdf 073e 201f 588f dfdf <4e73> 254f 03ec e308 660a 487a ffe0 60ff 002a f6ba 598f 48e7 031e 486f 001c 61ff Disabling lock debugging due to kernel taint Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Looks like the zeroed frame was restored where we'd have expected an actual save frame? I'll next try and apply your solution to IO worker threads only ... Cheers, Michael > > Hmm? > > Linus >