Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1981632pxb; Sat, 2 Apr 2022 10:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkRgl7gAaqduOmHf1hZAnQvrXWeTOR0uknD1AEqdJHnR8miBcKShXWmU8IX5Rg4pZN0mls X-Received: by 2002:a17:907:6d23:b0:6d9:ac9d:222 with SMTP id sa35-20020a1709076d2300b006d9ac9d0222mr4639996ejc.595.1648920498745; Sat, 02 Apr 2022 10:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648920498; cv=none; d=google.com; s=arc-20160816; b=aeq2U7iegLB58zMfdioR5NgMhX4Vfq9DH+2cfTarZjbZV48RsHsKVaoy66LM5CgiOh dwqIP4Q2eWUfYb0bENRd3M3QvrgFotsvaL4w7R9Vko9mBXx+G3/PJU0Oa5GRcnIxazre 4OgiFCCXuTqwIyx1cc6jy4oXdnryxnfKLJmrVQ40istkj/lljJjcPvMPA85urjYG9A22 ToLTFQ2t03bfTERud45CoZ8GJHlo9txfQWv4r+VWZsg+qBChZAI3XGnn4OqRkw6qDb/B xswHRBuCPYDdPqLkCO9brmewFoB2YOsjdayG0j75KqHnoYENHR953yyJ4mYZxXQ1yu0g pLgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=q7i6/O5ILryekqXQJ6olrqRxKKJfslH08xthB5phvm8=; b=h2kECQYeXhoHM6ODYQfVOGlG5IZqAMFCKt31PGoPN2QEDk3eGuGb+iY9WBy85gNGM9 p+lzex49Y5GioRuB7mnCy2iItpZtHQbpbmnbPwQZYC+qKmveOuyVfO0oD9r+1babtTag Vr3Sq4epvGb0ANyaXLcR+9jOmKLQm9XIvixfctCFSaZH8eFVnaOoSUYY43megv+mJHKE XVxaAuERJKi7MZzdexA6HCEcHy1rupEGUg/SRweKKVL1KN4VoIBAzrVp+v7JUb35Kd2q eAcBPMeGtfjMWJot5w9avXfuxVAfyzSMr/JAy4sUlFGIRS752uiGhFiQOU3Sp79b2sJ2 yEeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ev8Fs6xj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a056402358500b00418c2b5be57si4263577edc.313.2022.04.02.10.27.52; Sat, 02 Apr 2022 10:28:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ev8Fs6xj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345573AbiDALq5 (ORCPT + 99 others); Fri, 1 Apr 2022 07:46:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233087AbiDALq4 (ORCPT ); Fri, 1 Apr 2022 07:46:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B6AE33B0 for ; Fri, 1 Apr 2022 04:45:06 -0700 (PDT) Date: Fri, 1 Apr 2022 13:45:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1648813505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7i6/O5ILryekqXQJ6olrqRxKKJfslH08xthB5phvm8=; b=ev8Fs6xjSuQd1unPeFkOUH3G/dtkXgSvoxnrRWpsRb9EeYgvlDnpPVQs2UcY4H40TR7vLb 0VfRbH80ItoIE5PYreUX/vtDdPXjKoG6xM3eI5EjcGpJbPwvttbrSsTP7hONK76+EXDLEP NsgA0J3ieABo5tWzGc2qeXnULdF8muI9qUhUyQNCjAYiGy9FjfOUNoCIARFxtF08eqTCGm UyO6TkK0iLlCBLbjuiJYw+8tXKG/sHbuE0EAuQHQWG5lYqLy55m1oLTEkWPZEHrx495UVk 9+IGhQ5EgJdQ5Pwgp0Xpofat6H+8/GIhGyo/r/MSa3KmdfOPT5MbOj9ipJ1Jqw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1648813505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7i6/O5ILryekqXQJ6olrqRxKKJfslH08xthB5phvm8=; b=zD26LMBkhitDATDDbfX0hFJu7yVNadjpRBFsqon7/6vBOiynr8fgGGOyVVTtD3IERsSoxc V4kRyQMJevqrg6Ag== From: Sebastian Andrzej Siewior To: "Eric W. Biederman" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Oleg Nesterov , "H. Peter Anvin" , Andy Lutomirski , Ben Segall , Borislav Petkov , Daniel Bristot de Oliveira , Dave Hansen , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Vincent Guittot Subject: Re: [PATCH] signal/x86: Delay calling signals in atomic Message-ID: References: <8735j2xigt.fsf@email.froward.int.ebiederm.org> <87zgl9pw82.fsf@email.froward.int.ebiederm.org> <87o81nl3b6.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87o81nl3b6.fsf@email.froward.int.ebiederm.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-03-30 13:10:05 [-0500], Eric W. Biederman wrote: > But it looks like if we are coming from userspace then we use the same > stack as any other time we would come from userspace. AKA a stack > that allows the kernel to sleep. > > So I don't see what the problem is that is trying to be fixed. It is not only the stack. In atomic context / disabled interrupts it is not possible to acquire a spinlock_t (sighand_struct::siglock) which is done later. > I know that code has been changed over the years, perhaps this is > something that was fixed upstream and the real time tree didn't realize > there was no longer a need to fix anything? > > Or am I missing something subtle when reading the idtentry assembly? It certainly is true that the code changed over the years. The per-CPU stack is one problem, the siglock in atomic context is the other one. Thank you for the input. Let me digest the informations I have here and get back. > Eric Sebastian