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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 D7B29C432BE for ; Tue, 31 Aug 2021 00:06:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCFF060FD9 for ; Tue, 31 Aug 2021 00:06:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239166AbhHaAHn (ORCPT ); Mon, 30 Aug 2021 20:07:43 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:47148 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233270AbhHaAHm (ORCPT ); Mon, 30 Aug 2021 20:07:42 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mKrIV-00HR8r-KE; Tue, 31 Aug 2021 00:06:39 +0000 Date: Tue, 31 Aug 2021 00:06:39 +0000 From: Al Viro To: Linus Torvalds Cc: Dan Williams , Thomas Gleixner , Borislav Petkov , LKML , the arch/x86 maintainers Subject: Re: [patch 01/10] x86/fpu/signal: Clarify exception handling in restore_fpregs_from_user() Message-ID: References: <20210830154702.247681585@linutronix.de> <20210830162545.374070793@linutronix.de> <87zgsyg0eg.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2021 at 03:00:06PM -0700, Linus Torvalds wrote: > On Mon, Aug 30, 2021 at 2:33 PM Al Viro wrote: > > > > There's a place where we care about #PF vs. #MC (see upthread)... > > Interestingly (or perhaps not), that case is a problem case in general > for "fault_in_pages_readable()". s/a/the one and only/ > I'm not sure what the right model here is. We might need to make > fault_in_pages_readable() do things a cacheline at a time, at which > point those repeat loops start working, and the error code thing > becomes pointless. We really don't want to do that to fault_in_pages_readable(); a separate primitive doing that - perhaps, but fault_in_pages_readable() is used on fairly hot paths and all callers except this one don't need anything of that sort. Similar for fault_in_pages_writeable() - there's exactly one caller that needs the same kind of warranties, only there it's in arch-independent code and I'm fairly sure that it (btrfs ioctl) really is broken on arm64...