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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE8BDC433EF for ; Fri, 1 Apr 2022 11:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345576AbiDALq5 (ORCPT ); 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> 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