Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp685138pxf; Thu, 1 Apr 2021 10:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylOvon/R/EmDdAS8A3AMwifj5IwImxTAPsNw8RsLRTG6f9syHGKaPRiJe0MIxNd8lbAJqr X-Received: by 2002:a17:906:2314:: with SMTP id l20mr10555048eja.178.1617299564716; Thu, 01 Apr 2021 10:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299564; cv=none; d=google.com; s=arc-20160816; b=JvDmVROAhRw30jrevehSxJGTe5BX6OjUyquwXF46DNLk5dg/SmzZ91xOGxWzo45q+8 qUtOBcuEGq3dDYEOPIsglobm+4mpACXbyUQBhzHSeM/stbUWrE2owTHn2G2LoIKVZ2Zc RVEl5OHLsSDf1u+B+TI4QqfZzJSNMv5sSbDkGVdwRjwetMJYh2GDAYd9yUUZ/MLv+cEn z/NqTlEbA/9165hhDTtL1KQpUWU+RQ7QWv7zPWnS04ppAlXHQIfESpF82ldB/ca845Ox W5zIXzQ2yqG8ZsGVObIVWcl3KVhydt+HeEeE5CG7qwXJ86JY5SMqqAUuSQznvnC/34IK LTAw== 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=K4Yc9Fo8nH3qAbpV51g94tw6HmT4cWz0oodkJat7vyU=; b=u+AdtjpwkLl0yFCZIjXHJThhuyy7lgcT5rc7UXXCp2RyuRzzvLYSaxAPsStoZXTrCH USIS0aim5piaP4YoFXrKRk4VKC31+rd3hLz+V6s4XYxZX8vb3PXjwWFriFKAvbMJU0bc jhKllAHlvpdIuhCtdP5fs1S54mNtMiuIrmpHpWGHKY7m6MCMLKR06xzz/4WNnE2Wdg08 SlNpb31LjiQRRl8blnVbZTNfYW44jQ5a4/FhpthOY+PRyFrBHDgfE5AyGxMfxSXsvVyl 7zvC5RhJBNyJnIkaiiVjn5zca42GfY405W9+5XLMkSwcsUcU+T7gV3PhKyoIFiSZHyfC oFPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PnRMEbvu; 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 g23si4362364ejd.676.2021.04.01.10.52.22; Thu, 01 Apr 2021 10:52:44 -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=PnRMEbvu; 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 S237259AbhDARvL (ORCPT + 99 others); Thu, 1 Apr 2021 13:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234807AbhDARkT (ORCPT ); Thu, 1 Apr 2021 13:40:19 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05553C0225B3 for ; Thu, 1 Apr 2021 08:39:44 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id w28so3489485lfn.2 for ; Thu, 01 Apr 2021 08:39:44 -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=K4Yc9Fo8nH3qAbpV51g94tw6HmT4cWz0oodkJat7vyU=; b=PnRMEbvuuxIgoHz2A8hVDovCixxBMZDtl8IbeTG0bOFd0hithGVS/NKIT9zCRfigpP ZhaeGVhzMokB2fSjhktb5RZcFYv+z5OzyTdLl2flYiWVb2dGSZk5ZzfNTNxgshBcrMzG aSaYYF0nnY0xEBSzCpbpl5LJz4L72gcFX1rt0= 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=K4Yc9Fo8nH3qAbpV51g94tw6HmT4cWz0oodkJat7vyU=; b=cBoZVhUKtGc8R/X+ofuBEnYwkrtBtxdgIzQ1Cw5pJzkYvDF91Xt4vMldcaLqhN3lrw wNtbFWiyWNJ3qo/Wk7Wu97RPnB4TXGc9KcULRZQfqxrT+s8eGmw2dMP7gyDcE3aW7WZ4 09VoWabB4fLZOTiTzJcc+Ejpk341uvpHzEZL2Kekzdk/0L8NEXQaz+o1q2xXTkh6oQvz NxbST/tMh7M6jHbBvTmhxHgnbjejmUBmQKo7xgW04V+cFnGcildPUrL9y02zNyjx1FGL YL1xJ+3DgsEeuKwEDKglVFD1fn9TSjK1zFPQk8CgilXY6reylpwO7Q9+Is1vva2Pfpff T/Gw== X-Gm-Message-State: AOAM531XXcAzIU6OY4/xdFp6QsWX7xhvaUZVleank9IWcosc60ZafhS6 cIMDg9bSZBpTiwFy90g8Tk6y7oY29maYE3vK X-Received: by 2002:a19:c309:: with SMTP id t9mr5676476lff.348.1617291583157; Thu, 01 Apr 2021 08:39:43 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id f23sm650824lja.43.2021.04.01.08.39.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Apr 2021 08:39:42 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id d12so3458610lfv.11 for ; Thu, 01 Apr 2021 08:39:41 -0700 (PDT) X-Received: by 2002:a05:6512:308b:: with SMTP id z11mr5648326lfd.487.1617291581178; Thu, 01 Apr 2021 08:39:41 -0700 (PDT) MIME-Version: 1.0 References: <20210326003928.978750-1-axboe@kernel.dk> <8efd9977-003b-be65-8ae2-4b04d8dd1224@samba.org> <358c5225-c23f-de08-65cb-ca3349793c0e@samba.org> <5bb47c3a-2990-e4c4-69c6-1b5d1749a241@samba.org> In-Reply-To: <5bb47c3a-2990-e4c4-69c6-1b5d1749a241@samba.org> From: Linus Torvalds Date: Thu, 1 Apr 2021 08:39:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/6] Allow signals for IO threads To: Stefan Metzmacher Cc: Jens Axboe , io-uring , "Eric W. Biederman" , Oleg Nesterov , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 1, 2021 at 7:58 AM Stefan Metzmacher wrote: > > > > > Ok, the following makes gdb happy again: > > > > --- a/arch/x86/kernel/process.c > > +++ b/arch/x86/kernel/process.c > > @@ -163,6 +163,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, > > /* Kernel thread ? */ > > if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { > > memset(childregs, 0, sizeof(struct pt_regs)); > > + if (p->flags & PF_IO_WORKER) > > + childregs->cs = current_pt_regs()->cs; > > kthread_frame_init(frame, sp, arg); > > return 0; > > } > > Would it be possible to fix this remaining problem before 5.12 final? Please not that way. But doing something like childregs->cs = __USER_CS; childregs->ss = __USER_DS; childregs->ds = __USER_DS; childregs->es = __USER_DS; might make sense (just do it unconditionally, rather than making it special to PF_IO_WORKER). Does that make gdb happy too? Linus