Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4773338pxj; Wed, 12 May 2021 12:58:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvuMjhTszXTjF6pBhN4X+eywD3cX//yMZ97auX7ppylRMIbAkUx9gywzys0PROf5lPaoOz X-Received: by 2002:a17:906:2482:: with SMTP id e2mr39390275ejb.212.1620849483602; Wed, 12 May 2021 12:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620849483; cv=none; d=google.com; s=arc-20160816; b=wpRAdW8Y//KTXnyS+i8T2O2T7WXYKOOMVDB6ssxKs1sZsZeWGHrcqveKi7M0bNlrKD nww1Gb9ZujLe8Dzu7CRZ+rEZqRwEk6N6K5FnIcHQK5oZs6xpzaVJ2LrlZW0nPsW0UE9o wnPle4odzFFV5KISmcKwUXhc0tB0MurP9kUL6RWWpdRopp0nJnauBVyAlC7svX+eFmgi XHkkcRLe4o4CVAK0SGQGG8Vmw9Sum81E2h2AFYcnnUJfjWUK4XB+5UDqYzXPemahghoY GrCT0hPe+wSiMk7ViiqOQ3mdNpT4JZX3NAjZQVLz8u0DM267EwmStlgN5uybtDuW0b2i Z/vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EnLmte8GJt9Bb4Yd8FS7Fvu9RWF8YS8wdhW8/1E4zQQ=; b=yALppK+3e1E/Vo6Q6lDnNyL5jpq2OS/1YCidvPQJ1pLM17+4uS8TwgJda81imQM+Jt +EdJxEyjt1Pwhi67cKKmbsyLOiGvTv1EAzHqoXViAYH7mBVzQB7XTr+BsvW9g0++EWfV hykAD+1TYus8OB0MToTcGJxMCONiIbJtI0iASnqU6SAS/ODrivZ1kRpz1ZwDRPh1SZFy p7IBDspduAd16qe5skLCHk85ye4po4GaYVrthLY1OOXtuT3/sviOiE2qq/ook528U9a5 7nwj2/G7AMLZUxYsc43tpMbU6+HoDbTk15/iqCU5NhIjeFVe5IYOrbu2Lm3SzrBsgvcd Fpuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=FdGhpYQR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si552386edc.478.2021.05.12.12.57.40; Wed, 12 May 2021 12:58:03 -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=@linux-foundation.org header.s=google header.b=FdGhpYQR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381546AbhELTeg (ORCPT + 99 others); Wed, 12 May 2021 15:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349894AbhELRqx (ORCPT ); Wed, 12 May 2021 13:46:53 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D066EC061761 for ; Wed, 12 May 2021 10:45:00 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id i9so28369229lfe.13 for ; Wed, 12 May 2021 10:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EnLmte8GJt9Bb4Yd8FS7Fvu9RWF8YS8wdhW8/1E4zQQ=; b=FdGhpYQR9EJbOPTteKhrCj0ZG6s92OcG2YCJlMUtFF5hCaG7UqrDHELczhFojbbgqn eAVv4deyYW5mjRHjJLMGvedL/b+KVwQ9YyO9MQiIvn/VBLfyDaQh4frsubScc4vnJSPr M5j7oAfrCStdWjsg9Zhj6FJ0qVw/yVCYo6lqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EnLmte8GJt9Bb4Yd8FS7Fvu9RWF8YS8wdhW8/1E4zQQ=; b=TWqxw7GF+rzFMkJ0saA8XSxdtlkAvGlASciQyVa2XEK86BSHERNHN8guiMrkV4kUCR KS2B/zFxvll1LYcnsqMhm77XnMZll0J4kgnab0y1VeDcaGHZaaJQ+vGBnMWRBjnrsP0q PDwB0kROgYFg2Cb5XuDY5IzsHVx/wQGMnp96aIVY41icoYxUY8JqqiTttkf0CpFocDy/ eWS34n4u/GDfOr6ySBQxbJfVrK+aZIyWeqNRjyfqG824Z82ezBPJ7CdrZ5CpS4ae5OlU l+bXy4SEL3OdovA+s24/O5jYEEt87VcmXtW5VFwYDJHk/D78Q3pznR7e9G68Y+9nUoiB YmDw== X-Gm-Message-State: AOAM5319LU23hNffFeYzaV7z6aNesT7zklu4wLcrE5vQe8LPHiVAMlx+ z1GU3ZE04p/M+J++Qz/6b5Y9rhJDNW3eWQPg X-Received: by 2002:ac2:4ed9:: with SMTP id p25mr24955187lfr.576.1620841498735; Wed, 12 May 2021 10:44:58 -0700 (PDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com. [209.85.167.45]) by smtp.gmail.com with ESMTPSA id z18sm34090lft.57.2021.05.12.10.44.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 May 2021 10:44:57 -0700 (PDT) Received: by mail-lf1-f45.google.com with SMTP id z9so34909698lfu.8 for ; Wed, 12 May 2021 10:44:57 -0700 (PDT) X-Received: by 2002:a19:4cd7:: with SMTP id z206mr11366696lfa.487.1620841496852; Wed, 12 May 2021 10:44:56 -0700 (PDT) MIME-Version: 1.0 References: <8735v3ex3h.ffs@nanos.tec.linutronix.de> <3C41339D-29A2-4AB1-958F-19DB0A92D8D7@amacapital.net> <8735v3jujv.ffs@nanos.tec.linutronix.de> <12710fda-1732-ee55-9ac1-0df9882aa71b@samba.org> <59ea3b5a-d7b3-b62e-cc83-1f32a83c4ac2@kernel.dk> <17471c9fec18765449ef3a5a4cddc23561b97f52.camel@trillion01.com> In-Reply-To: <17471c9fec18765449ef3a5a4cddc23561b97f52.camel@trillion01.com> From: Linus Torvalds Date: Wed, 12 May 2021 10:44:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] io_thread/x86: don't reset 'cs', 'ss', 'ds' and 'es' registers for io_threads To: Olivier Langlois Cc: Jens Axboe , Stefan Metzmacher , Thomas Gleixner , Andy Lutomirski , Linux Kernel Mailing List , io-uring , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 9:24 PM Olivier Langlois wrote: > > I have reported an issue that I have with a user process using io_uring > where when it core dumps, the dump fails to be generated. > https://github.com/axboe/liburing/issues/346 I suspect most kernel developers don't have github notifications enabled. I know I have them disabled because it would be *way* too noisy not to. But maybe Jens does for that libiouring part. > Pavel did comment to my report and he did point out this thread as > possibly a related issue. I don't think this is related. The gdb confusion wouldn't affect core dump generation. I don't see why a core-dump shouldn't work from an IO thread these days - the signal struct and synchronization should all be the same as for a regular user thread. That said, I do wonder if we should avoid generating core dumps from the IO worker thread itself. The IO thread itself should never get a SIGSEGV/SIGBUS anyway, it should have been turned into -EFAULT. So maybe the if (current->flags & PF_IO_WORKER) goto out; in kernel/signal.c should be moved up above the do_coredump() logic regardless. Jens, have you played with core-dumping when there are active io_uring threads? There's a test-program in that github issue report.. Linus