Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2650496ybt; Fri, 3 Jul 2020 15:04:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9FL3SFkv45eJY6qTblmOcnVq2TqZxPXSfsXvX4E1RKaakzuTMjRI2AIj14mK7A0s0nLLc X-Received: by 2002:a50:ee8d:: with SMTP id f13mr41133572edr.302.1593813892941; Fri, 03 Jul 2020 15:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593813892; cv=none; d=google.com; s=arc-20160816; b=0wYSE8FHWj0GGO3u9S6alj4xHcrI1YJNMEIfJrNeH6mj0dk2Rj/esGosclqythQAVK U2jTKWD1wryPqEBSLGXfKHMY+dLZz+FPMFHXRuRx5/5QoXOTzc5hWUibmmeKirmagZ5V YjEpP5+vuSZyUb6+tnH6o6tR+WcN1GSlI25zq30FiJEb4VXs9rxxvEqsBb49x9vmgIJ4 AZbdbcpfwAcBp+hFsGFi0r2trxK3ITY2/1QA6P/Y63FDKyGQRMpsAYUMY9IUwvatICfZ 5BxIjBs6CA415n945g5LvH3rBaevi6I9Pfg/Slyz84YWeXouRNRy7QAcHdafR/XEJY5J LBtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ell6bR7UrYln2GkhxshFhNy/Hne7za45GYRdQV+/brc=; b=CpnlLuNjXscJCm4tTJWwQScTWcSU6eK+NO6nW9F6wy9WdNiaYwfUdnXOxull/QHPf9 AkmWIvh2CiesgnO0wwwvPJZxQqg7tdRfgD2kpi9QQhQCIQywn0KE2V5WuJvc+pcQhhtC uc9E69p9uCbx6yzt96AdmhCAXU2NdzRXCbLuffssm5M33W+F/iPR8zXCJciBz00nBWBh XDPra64wOQNQ1QD38TgU7g0fADFI/VJfQuAtMxmqsdjxevsXFAv/vjxUw3UoLpaeeJ0m jsthHCepKBX8s7G6emc/XeiYqx8n2DZyKKuTK+yCnhqPVS9TkY/iJZ41digTlv93YOuO XI8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck29si7960867edb.236.2020.07.03.15.04.29; Fri, 03 Jul 2020 15:04:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726610AbgGCWEV (ORCPT + 99 others); Fri, 3 Jul 2020 18:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbgGCWEV (ORCPT ); Fri, 3 Jul 2020 18:04:21 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01337C061794 for ; Fri, 3 Jul 2020 15:04:20 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrTmx-004qwZ-UT; Fri, 03 Jul 2020 22:04:08 +0000 Date: Fri, 3 Jul 2020 23:04:07 +0100 From: Al Viro To: Linus Torvalds Cc: Michael Ellerman , Christophe Leroy , Josh Poimboeuf , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: objtool clac/stac handling change.. Message-ID: <20200703220407.GU2786714@ZenIV.linux.org.uk> References: <87lfk26nx4.fsf@mpe.ellerman.id.au> <20200702201755.GO2786714@ZenIV.linux.org.uk> <20200702205902.GP2786714@ZenIV.linux.org.uk> <20200703013328.GQ2786714@ZenIV.linux.org.uk> <20200703210237.GS2786714@ZenIV.linux.org.uk> <20200703215922.GT2786714@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200703215922.GT2786714@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 03, 2020 at 10:59:22PM +0100, Al Viro wrote: > On Fri, Jul 03, 2020 at 02:10:08PM -0700, Linus Torvalds wrote: > > On Fri, Jul 3, 2020 at 2:02 PM Al Viro wrote: > > > > > > Actually, for more serious problem consider arch/x86/lib/copy_user_64.S > > > > What? No. > > > > > In case of an unhandled fault on attempt to read an (unaligned) word, > > > the damn thing falls back to this: > > > SYM_CODE_START_LOCAL(.Lcopy_user_handle_tail) > > > movl %edx,%ecx > > > 1: rep movsb > > > 2: mov %ecx,%eax > > > ASM_CLAC > > > ret > > > > > > _ASM_EXTABLE_UA(1b, 2b) > > > SYM_CODE_END(.Lcopy_user_handle_tail) > > > > In the case of "we did an unaligned word at the end of a page, we took > > a fault, and now we have to start all over", the _least_ of our > > problems is that part of "starting over" would now imply doing a > > "stac" again. > > What do you mean, start over? It's picking a few remaining bytes out > of that word, *not* redoing the entire thing. I'm _not_ saying that it's a performance-critical place, in case that's not obvious - just trying to head off potential confusion re what that code is doing.