Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1390584pxv; Fri, 23 Jul 2021 07:17:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/hZyZOU7DhKwkGEc6Td7oEZVWCrLmngMPpOX8y89SabfLvCvu9xZHBdiv0fwiBfV4tv0G X-Received: by 2002:a17:906:fc6:: with SMTP id c6mr4778890ejk.65.1627049848313; Fri, 23 Jul 2021 07:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627049848; cv=none; d=google.com; s=arc-20160816; b=kUb6rKCd2h1ODjCIdaCIFs5UMmxkKXL03R0hik03tN20AvCwLRbU/R4SlqNYeYlBoJ Re8haqzfFYZOmLyuAJ4+kq8a3Lvh9NICiXA+fDUqmphrZsb9wYOrnVhDrk9tx9WUNZKn hygRH4vemvEBjfNv4XSXUHhcQ2qzSf2UWxgYRMMTbSyQU+JOaxPOAaEH4l5qbMkEog6J JU/RoiaHS+Px17A1gtO82Il19Vjises68EOoyaFwJ2NB2QrwLSHfDUuyQyuHJRGVmz8M eH18mvh0qc/4/OkOKQz9uZqWm+GuJTIrqsceel+nms1Zbisch0umzrly/R/zAWPxSeOU qwtA== 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=euNmOr9QM+5La8vTSkG1bHW1OGt5VsXlTMXXTJrMbjg=; b=anNymnK+CuJH1PHLftER/9E9XBrQwDtfd7ZHU2ZIUfm/BRF7/ER+1aqDcejlNaw6xN iRWUNlSZzLcTPJGqG7XfX9WFVdi4hNa4h7TII3Ld5DGg7kqPxtorVxdAM3vBL+5a30y1 kahNMOav5qLacEO6QRFo+6wV5NAi//5+uL1HEmOfeD+l07G0h9z3QykqlHWuv8I4KrSw mL3W/nLLwKJr+1rV3jR7LUsKFt6zcPbjRI+Rw3w/YDPqEsJJmK62NHws3GdAGSaACmpk G4ELqHqkr+6GJEd98pTkW3jQCmBe4jKN0uSeLneDfJ9eFwMmx/BME/ol+l2Hdw/ULiFd ZuBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jCruH8X7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs11si1433609ejc.637.2021.07.23.07.17.01; Fri, 23 Jul 2021 07:17:28 -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=@kernel.org header.s=k20201202 header.b=jCruH8X7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235401AbhGWNc2 (ORCPT + 99 others); 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-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 >