Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2792202ybt; Fri, 3 Jul 2020 20:07:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzfDNpBI7OkvOKXbCSbbLwrAQGJ3KpkJALq1x5r7wvwMn6pmrZEPf3WXWYHKTcy5olM0el X-Received: by 2002:a50:ab53:: with SMTP id t19mr44524828edc.179.1593832073739; Fri, 03 Jul 2020 20:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593832073; cv=none; d=google.com; s=arc-20160816; b=gTv1GgqzY6+l0z6pser5mx/4kEJklDHUwn9jSNUDNptvCMom+jWsfXFJXcwY5+r3Rc ezSE8/v6F6mwyhp8j4+oPvTAZhtRTAkwhDO7X+niZ3bQFjBw7nACWsPZZYr7SjG/LJaJ ntFapO6QHh8CXbSKLod37cYjl6fBS6avKOvVO9Ga3vogrk9MPJDXW48ziH5ZEa3poM0K SpK6veb37LL9hK2gmqn9KeIpggvR/xV3I+1dIVa4qq3L1w01XjQwsEdDRXBWcVIRUgSU S3wKRCOLFuPqnInV+YVmrWZYQr0hEFkQ18YAGcgOlcE219tqYa2a7IY9OgB/qARQiedo MkMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UG4D45IGvmPqWscTI03JmD9b95WYlSr/vxzeTQecpNs=; b=L0YW4NzqmpqWXXv6YWyaVzKg6qYjXYHqZyBSV4U3swdAdq8uMUJ1Kahks//2i1g0ly +Ubr6mFVNXhurGkoLjFhFnBHuldwpIit4qTU49nEULZwBGK+42EHzo1qrpnqwHj5S3Xi qvLVXhqDaKp0+lhQph04Fyx5IbKzwpc1Akhuu/bttlrtDrTafj9AefZPW3Q50rwEoy+1 Q8C+uZkkn6FbsqZlR5s1u/BpNBRaxRmM9fynckbOQRFn1yq3zYBe6B1Bojst9VYEeEP5 KhHMNJzZUPB2zlKv5Iqt+lMZfGpOncmsd2+KxA7Yt6MMDwGiWM5vb9SO0W0Phl001FU5 lMtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=OFliIcc6; 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 c25si9167862ejb.6.2020.07.03.20.07.30; Fri, 03 Jul 2020 20:07:53 -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=@linux-foundation.org header.s=google header.b=OFliIcc6; 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 S1726738AbgGDDGX (ORCPT + 99 others); Fri, 3 Jul 2020 23:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbgGDDGX (ORCPT ); Fri, 3 Jul 2020 23:06:23 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB893C061794 for ; Fri, 3 Jul 2020 20:06:21 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id e8so4798758ljb.0 for ; Fri, 03 Jul 2020 20:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UG4D45IGvmPqWscTI03JmD9b95WYlSr/vxzeTQecpNs=; b=OFliIcc6JNYrXG67+Czse3+riioZN7JmepQcVtBmDtleLZBHTMX/zeeeF0WeF6tuCi 0IWXWfM8I7NzAEGfwrlEm0UTwIhp1oRAcR6VAP9M2fmSj1kJO2RGM/3SddS3RngrSQG1 8HBZGD7bn16gdo1ixBsBJFDQJia9jiXQN1bq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UG4D45IGvmPqWscTI03JmD9b95WYlSr/vxzeTQecpNs=; b=VZtT2DSscHt4dOxNvkqkNM180xkLNMkaH7NLeAo72kaHlFW/cGdiWw8XW3PIrxpxnC ItYGQW49+o5zULzq4Rupk43vruJr8z7oEPhEOBA64YqY7NselFMxVT1b+xbaCGONEa1P a28JY9kv5xDxPrsMuTkhTOm/XFTz6moobI175wbZJb06095XkLZqtqLbGCnGeUtjQYBu CBNPE9tNaH5/XdHH54q5HZRrGefmz4vV2opkc1vdkkVNlKcVi9ZXELMpgMeBrevZvpXJ m8R06ENVWkcg16gQVIkZ/YD22veW52HP0ckjxx7l6imp/vH+NsuvEmuI9yha+RuxVNIz swBw== X-Gm-Message-State: AOAM530cqiO+00T/YDopj15W6qAyOCoYUf7wY3wDEcAXOpLHP00jnjrT +OIipV3oj9wV1SpahtL9z4zZv09GdUM= X-Received: by 2002:a05:651c:118f:: with SMTP id w15mr21735124ljo.211.1593831979976; Fri, 03 Jul 2020 20:06:19 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id l4sm1065430ljc.83.2020.07.03.20.06.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 20:06:19 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id h19so39075867ljg.13 for ; Fri, 03 Jul 2020 20:06:18 -0700 (PDT) X-Received: by 2002:a2e:760b:: with SMTP id r11mr6880848ljc.285.1593831978454; Fri, 03 Jul 2020 20:06:18 -0700 (PDT) MIME-Version: 1.0 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> <20200704004959.GY2786714@ZenIV.linux.org.uk> <20200704023009.GA2786714@ZenIV.linux.org.uk> In-Reply-To: <20200704023009.GA2786714@ZenIV.linux.org.uk> From: Linus Torvalds Date: Fri, 3 Jul 2020 20:06:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: objtool clac/stac handling change.. To: Al Viro Cc: Michael Ellerman , Christophe Leroy , Josh Poimboeuf , Peter Zijlstra , "the arch/x86 maintainers" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 3, 2020 at 7:30 PM Al Viro wrote: > > Lovely... So basically this is the rare place where we might use those > insns on userland addresses? Honestly, I think the code you quote is just confused. First off, we have special "is this page fault due to a prefetch" logic in the x86 page fault handler anyway. Second, we probably shouldn't have those prefetches there in the first place. Sp I think the nasty code is likely just pointless and legacy. It may exists simply because that case was the first time somebody noticed the prefetch errata and it triggered in kernel mode. Who knows.. I'd be inclined to remove all the prefetching code from that csum thing entirely. Most good CPU's do better prefetch pattern detection in hardware than we can do in software. Linus