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 X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A689C4320A for ; Fri, 23 Jul 2021 14:13:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53D7960EB4 for ; Fri, 23 Jul 2021 14:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235420AbhGWNc2 (ORCPT ); Fri, 23 Jul 2021 09:32:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:37168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbhGWNc1 (ORCPT ); Fri, 23 Jul 2021 09:32:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE4EA60EB4; Fri, 23 Jul 2021 14:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627049580; bh=9zgAdN2R83/AZuFoRURWsWq5ldzAHeQTlvqMRC3gzBg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jCruH8X7ttLvopYjhCJO7sQuRtFQA9BDS5phMv2YmQjXfut/sQA3bOGpr9kl+ggyP PDuH/e+s4vAzz5Kbwzi0SZtUQW16NTmqndd7jdnE3ZCuAANqbcUbGf58mVXGSRDpKj LDCQrtLHCHZnJuXmjnqbTdEEZlZJs3wNuJy0atP593sM5RiSVFkwTwnCxfh4Wrv8tG Ox1hr1TSxhukpenSIo80VcTfNSi1iHpmChFKycwaCzYPt8w2qITx/TVrOlYLBpvIlR 9YarBcIVpbHXdCdyAjnJzAHvB+RFTGDUVBtOM63GdeUR0T3rTGFbVlwuQLVjkLQ27L vBKpJMr28iDZA== Received: by mail-oo1-f41.google.com with SMTP id k7-20020a4abd870000b029025e4d9b0a3dso412086oop.6; Fri, 23 Jul 2021 07:13:00 -0700 (PDT) X-Gm-Message-State: AOAM531+Nm4uxvv260GhbiPpSLyRPd8xAnMbtdaM/pZVicQfYCm9j1yk nakpTCyofNw65tVzt0dKRYiO85bVmIKeNKP1jWs= X-Google-Smtp-Source: ABdhPJw1EADKet1m/Ts4jll8W2cR5Nkp1FQ05/qz/DVoG35kETxmRNs3KWUEW9UXNJ9E3g7oimll8XZHEWO4W71ls4o= X-Received: by 2002:a4a:6558:: with SMTP id z24mr2823148oog.41.1627049580214; Fri, 23 Jul 2021 07:13:00 -0700 (PDT) MIME-Version: 1.0 References: <20210722175157.1367122-1-valentin.schneider@arm.com> In-Reply-To: <20210722175157.1367122-1-valentin.schneider@arm.com> From: Ard Biesheuvel Date: Fri, 23 Jul 2021 16:12:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] sched, x86, arm64: PREEMPT_RT, FPU and preemption To: Valentin Schneider Cc: Linux Kernel Mailing List , Linux ARM , linux-rt-users@vger.kernel.org, X86 ML , Catalin Marinas , Will Deacon , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Peter Zijlstra (Intel)" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Brown , Dave Martin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Jul 2021 at 19:53, Valentin Schneider wrote: > > Hi folks, > > This stems from some more v5.13-rt1 breakage on arm64. This time per-CPU access > safety isn't sufficient, we really need to keep preemption disabled. > > In a happy accident I stumbled on > > cba08c5dc6dc ("x86/fpu: Make kernel FPU protection RT friendly") > > so I packaged what was done there into some common helpers and plastered them > over the problematic areas. > > Cheers, > Valentin > > Valentin Schneider (3): > sched/preempt: Introduce preempt_{enable, disable}_bh() > x86/fpu: Make FPU protection reuse common helper > arm64/fpsimd: Fix FPSIMD context handling vs PREEMPT_RT > Thanks for fixing this. Reviewed-by: Ard Biesheuvel > arch/arm64/kernel/fpsimd.c | 6 ++++-- > arch/x86/include/asm/fpu/api.h | 19 ++----------------- > include/linux/bottom_half.h | 26 ++++++++++++++++++++++++++ > 3 files changed, 32 insertions(+), 19 deletions(-) > > -- > 2.25.1 > 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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2838C4338F for ; Fri, 23 Jul 2021 14:14:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1C3E60EBC for ; Fri, 23 Jul 2021 14:14:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C1C3E60EBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4jrcsxiK7vjoYJHVTOL6x5MK6dQsN6S1ghxuAlMeHoo=; b=XeQBh8EkuaVzwN LFtsfezyKsp17n9vGHibSVbhofxmbVfEvQ6c9Dg6IfyEH8jlCVCWBqVWbxKd15LwGDatHA6i5Eyon v3aA+UggUIQwLgWVpvXdNZPQFvuKQE7/zjHdjJDvpYPzBqMRc2BhEzEOH7xF1NZ7JU9+4MyWrd6MB Lt4JMQpi87oSf0j9Ch/vyd/OrvWZOtYD4fKAI7XciJGiX4jszgL5CWdDncu9ecsQtVpM3G1ZSJPme K9G7Jz3FdRvN22cwV5oC20qZ0JY5plCwEkek41+fmL8Rn3IsHwu7Ni6r4pw8wQpwi8BzOe4o06RrK dNa4nF/ElPMqeZxr7nCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6vvH-004yqZ-5U; Fri, 23 Jul 2021 14:13:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m6vvB-004yoQ-KP for linux-arm-kernel@lists.infradead.org; Fri, 23 Jul 2021 14:13:02 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CAC2360EB1 for ; Fri, 23 Jul 2021 14:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627049580; bh=9zgAdN2R83/AZuFoRURWsWq5ldzAHeQTlvqMRC3gzBg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jCruH8X7ttLvopYjhCJO7sQuRtFQA9BDS5phMv2YmQjXfut/sQA3bOGpr9kl+ggyP PDuH/e+s4vAzz5Kbwzi0SZtUQW16NTmqndd7jdnE3ZCuAANqbcUbGf58mVXGSRDpKj LDCQrtLHCHZnJuXmjnqbTdEEZlZJs3wNuJy0atP593sM5RiSVFkwTwnCxfh4Wrv8tG Ox1hr1TSxhukpenSIo80VcTfNSi1iHpmChFKycwaCzYPt8w2qITx/TVrOlYLBpvIlR 9YarBcIVpbHXdCdyAjnJzAHvB+RFTGDUVBtOM63GdeUR0T3rTGFbVlwuQLVjkLQ27L vBKpJMr28iDZA== Received: by mail-oo1-f50.google.com with SMTP id 13-20020a4ae1ad0000b029024b19a4d98eso412611ooy.5 for ; Fri, 23 Jul 2021 07:13:00 -0700 (PDT) X-Gm-Message-State: AOAM533DVoBXFepMOpyb3QeUuBjfff7BsCAA/vmhUc5HQRUpRpA93s7Z GbbE+wMG/qUpUP+c+q0xUwsO+nN0p7ZIpoALOII= X-Google-Smtp-Source: ABdhPJw1EADKet1m/Ts4jll8W2cR5Nkp1FQ05/qz/DVoG35kETxmRNs3KWUEW9UXNJ9E3g7oimll8XZHEWO4W71ls4o= X-Received: by 2002:a4a:6558:: with SMTP id z24mr2823148oog.41.1627049580214; Fri, 23 Jul 2021 07:13:00 -0700 (PDT) MIME-Version: 1.0 References: <20210722175157.1367122-1-valentin.schneider@arm.com> In-Reply-To: <20210722175157.1367122-1-valentin.schneider@arm.com> From: Ard Biesheuvel Date: Fri, 23 Jul 2021 16:12:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] sched, x86, arm64: PREEMPT_RT, FPU and preemption To: Valentin Schneider Cc: Linux Kernel Mailing List , Linux ARM , linux-rt-users@vger.kernel.org, X86 ML , Catalin Marinas , Will Deacon , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Peter Zijlstra (Intel)" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Brown , Dave Martin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210723_071301_735606_92C19A0B X-CRM114-Status: GOOD ( 14.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 22 Jul 2021 at 19:53, Valentin Schneider wrote: > > Hi folks, > > This stems from some more v5.13-rt1 breakage on arm64. This time per-CPU access > safety isn't sufficient, we really need to keep preemption disabled. > > In a happy accident I stumbled on > > cba08c5dc6dc ("x86/fpu: Make kernel FPU protection RT friendly") > > so I packaged what was done there into some common helpers and plastered them > over the problematic areas. > > Cheers, > Valentin > > Valentin Schneider (3): > sched/preempt: Introduce preempt_{enable, disable}_bh() > x86/fpu: Make FPU protection reuse common helper > arm64/fpsimd: Fix FPSIMD context handling vs PREEMPT_RT > Thanks for fixing this. Reviewed-by: Ard Biesheuvel > arch/arm64/kernel/fpsimd.c | 6 ++++-- > arch/x86/include/asm/fpu/api.h | 19 ++----------------- > include/linux/bottom_half.h | 26 ++++++++++++++++++++++++++ > 3 files changed, 32 insertions(+), 19 deletions(-) > > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel