Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4736229pxj; Tue, 25 May 2021 15:21:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXh7WUmK8nt8qCLyAkvdiFf2hQVoqxrUgStZXQPG+SFJQSGdDM8rsxirpC0xEYVSfN5jKO X-Received: by 2002:aa7:cb84:: with SMTP id r4mr33930528edt.187.1621981282421; Tue, 25 May 2021 15:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621981282; cv=none; d=google.com; s=arc-20160816; b=0v1wc42YNJTAL2I+PJUoONcrOU2/y045+FaQD60fGXjorltvk3A9mu/noc7LaIcNBM 42urgfg/0dFWwHCeQczJ08oMDHG4wo7Vt8j4CpZpMbl/6HsLsOhH41KqBOZBIWszgF1K zSG9S+Z2EyIBREjYFTJDmpEjUVgLV5mROpbAq+NTPapH/52eSgA/69rMKS4u0FaI1wmA lX2tW96sgevwYJ28XztpS6wwTuzV7Wj3emENtqhBwEXALEAc1c/QdcAbX2M5aoGlpgF+ w7Ud7nLmIO/DRdjfDtuA7bX2SF0Yvdwzscil338uO9iY46VSylMWbyk2tdnEcLXBXVqS XJ5A== 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:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=CH7HCrbDrVEjFXI0QZhWRgkDNigLvftrYT53lrwk+bc=; b=DpegzcezsxVOsZ685jTrk5tWaJJLJlxIWR3P4Wfg3so3qtux6RUShHbz3BexX94yHG /tc6jrK8ETewYW3NX8SlNoldsnMFAJQ4kfVzHTrvZiIudsTByGQtHo3Beor4Zi5olS+q PQKuErRKLiwKL7t2p7DPExyHcVShZKnn02u804WUlTvpyTDyZv/GvQjffl2AffjrkSn6 Iu8wUDdrb75/noSgePFQXpsF0E0E2rLZqS7cCMfE/pxdxhGm6dvyUrwqA2YADKRFTHCz 2cnoZkNVywM163qWt6FqJhIJrW7TzFmtdJxi7DQrL3bzYr8H7lZwO42OwJRqCeBYvo4w Py8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 p14si3479224ejd.654.2021.05.25.15.20.59; Tue, 25 May 2021 15:21:22 -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; 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 S232717AbhEYTqp (ORCPT + 99 others); Tue, 25 May 2021 15:46:45 -0400 Received: from cloud48395.mywhc.ca ([173.209.37.211]:50640 "EHLO cloud48395.mywhc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbhEYTqo (ORCPT ); Tue, 25 May 2021 15:46:44 -0400 Received: from modemcable064.203-130-66.mc.videotron.ca ([66.130.203.64]:52978 helo=[192.168.1.179]) by cloud48395.mywhc.ca with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1llczI-0005mz-RT; Tue, 25 May 2021 15:45:12 -0400 Message-ID: Subject: Re: [PATCH] io_thread/x86: don't reset 'cs', 'ss', 'ds' and 'es' registers for io_threads From: Olivier Langlois To: Jens Axboe , Linus Torvalds Cc: Stefan Metzmacher , Thomas Gleixner , Andy Lutomirski , Linux Kernel Mailing List , io-uring , the arch/x86 maintainers Date: Tue, 25 May 2021 15:45:11 -0400 In-Reply-To: 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> <3df541c3-728c-c63d-eaeb-a4c382e01f0b@kernel.dk> <4390e9fb839ebc0581083fc4fa7a82606432c0c0.camel@trillion01.com> Organization: Trillion01 Inc Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud48395.mywhc.ca X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - trillion01.com X-Get-Message-Sender-Via: cloud48395.mywhc.ca: authenticated_id: olivier@trillion01.com X-Authenticated-Sender: cloud48395.mywhc.ca: olivier@trillion01.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-05-25 at 15:39 -0400, Olivier Langlois wrote: > This notion appears to be central when creating a coredump... > Only tasks having the same mm than the one receiving the SIGSEGV will > be zapped... > > in zap_threads(): > ????????????????for_each_thread(g, p) { > ????????????????????????if (unlikely(!p->mm)) > ????????????????????????????????continue; > ????????????????????????if (unlikely(p->mm == mm)) { > ????????????????????????????????lock_task_sighand(p, &flags); > ????????????????????????????????nr += zap_process(p, exit_code, > ????????????????????????????????????????????????????????SIGNAL_GROUP_ > E > XIT); > ????????????????????????????????unlock_task_sighand(p, &flags); > ????????????????????????} > ????????????????????????break; > ????????????????} without fully understanding what I am doing... I am tempted to tweak the condition (unlikely(p->mm == mm)) for (unlikely(p->mm == mm || p->flags & PF_IO_WORKER)) and see if it would resolve my coredump problem...