Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3984585rdg; Wed, 18 Oct 2023 11:16:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpwHqErLu8zvFoNU8TciZWmyqksDTxU8JGFEWQdqeVQB2PJT+4jMed2104gWga/+pYbS9O X-Received: by 2002:a05:6a20:a113:b0:14d:f41c:435a with SMTP id q19-20020a056a20a11300b0014df41c435amr6354059pzk.39.1697652993608; Wed, 18 Oct 2023 11:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697652993; cv=none; d=google.com; s=arc-20160816; b=QAwoxIWyG+ojpk3Xj2Ps4mJqg+xNcJeQxMqD6PoNjX+D3PLpsiWxG2e7tA73iKntvy UQ9MdJ0brAmVXtcIWCTmzIcpL/eSLoR7U1pil3UhzQpvcWFBGlEg8Ls9bqG5vRt2BNiU w3NE3kyeskO2hgiF9M4d+opWGmMuDBWbpD419bKbEuuQgLqr9hBMkxgRZU8NDOnMvDBf stfjXz2xFgytzlMXMyzQo6EyQyO6PZEf69NUWI18UewsCz4IdEfOx0W7jnyUQNJ89MS5 dk4nYrBvi2CxME3/VsR21xHoYBV5gjUpxTyQRcDBBetK0pj9ksYS57S7QTaTCtQ6RkLx TNdA== 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=rwRonke7ZPJesfb6lkAk8Jef9jxQLTB9Ut1BCrObTy4=; fh=3hMqaci1aSMG0AFmuDTcNcT9Fdla45I/j/Dj+Dy/pas=; b=zCbOgEoXTVtJ/9h8vTAY55J+aAkdZlrCP6K0Xq/m+zSxuLxGoXNHWewfc04MOJSSJr B5YK4e4q/Lpixe5GoeDox7+G0ppYxX/GL0tAmAvI9yKYHKdpat55fYdBhlCF/+HaLoYe jg3thr5cQvrU043VkbWzVaQ8kqyr4fFa4JqlsJo5O4O9brOXzcLTUNxn6pJkAsDn61km hknPFypPR9FFkDInAh1JuenKEg7g2ckBD0iO76NU+7TOFB32ASbjwFiVLEshqlaEX9fy Ki+6NITbMEh50jlrmtZLpLRG/a0tAejiIxUIx1idJEvVLPBHTGGGPA/Y4iagrO913waD zHYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q8QC5EFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k11-20020a637b4b000000b005b7180bc067si2829936pgn.17.2023.10.18.11.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 11:16:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q8QC5EFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0C22881B6A9A; Wed, 18 Oct 2023 11:16:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbjJRSQY (ORCPT + 99 others); Wed, 18 Oct 2023 14:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbjJRSQX (ORCPT ); Wed, 18 Oct 2023 14:16:23 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AA52B6 for ; Wed, 18 Oct 2023 11:16:20 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c501bd6ff1so85355721fa.3 for ; Wed, 18 Oct 2023 11:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1697652978; x=1698257778; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rwRonke7ZPJesfb6lkAk8Jef9jxQLTB9Ut1BCrObTy4=; b=Q8QC5EFGy3idAI8OotHJpH82GnEvRxnZbrGKVZtJoEt2ET9cgChsMKQSuR7yDzbdOC WtsFtdVNwww1TBKTm+YdqUtZrX8Ylqv1sBw3sjlicegQXp4qUM4GrZ6y5/qqHI59iJVM B6Ay2jl7KQO8YHyztLCZvghzooYKmI++hXs+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697652978; x=1698257778; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rwRonke7ZPJesfb6lkAk8Jef9jxQLTB9Ut1BCrObTy4=; b=JXsA+Qsqwd+2bNsWKI0LdcG10C9t7BR5XuLBhRLoGPw3m1OF5sPqCo+zfD2UJW6Ouv ZvopyGyziX7Q9BdkUzM25GIF73q5/bjAs2EAz9eHGHnCW1YqTz8K4SECghbOgZDsxONQ duEvIT+BA/tkiyoYtXuJCink24i5QXUXLd8fXtRpqL/oTQMckX7DRxW7STqU9q6G9RnO rN94TYvHMJFKhTy0r6MP8rMNYNz5Hs/7fidnxWN26qdtxcB79wKwI8ZvROfskQHN7ESq 9RXNMaqM6PBqOUyZqGnwUMeyKUExVRSuvcFpw03AAwDxrH6HomGPnnAe2mRCCfFmVLjH 5iXQ== X-Gm-Message-State: AOJu0YwMZ13SVcYBXbKl8PTTlRUXsu3N77weBLvnvRuSdFBL4tPz6mgO anpN9eO/BUnZtuDKj82EjC0l4c54qS8lADHSKKCClEXR X-Received: by 2002:a2e:9d0f:0:b0:2c5:27ca:4784 with SMTP id t15-20020a2e9d0f000000b002c527ca4784mr4317986lji.4.1697652977999; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id q18-20020a2e9692000000b002b6da7e01d3sm802114lji.31.2023.10.18.11.16.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Oct 2023 11:16:17 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-507a0907896so6510526e87.2 for ; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) X-Received: by 2002:ac2:483a:0:b0:505:7896:18de with SMTP id 26-20020ac2483a000000b00505789618demr4333579lft.45.1697652977179; Wed, 18 Oct 2023 11:16:17 -0700 (PDT) MIME-Version: 1.0 References: <20231010164234.140750-1-ubizjak@gmail.com> <0617BB2F-D08F-410F-A6EE-4135BB03863C@vmware.com> <7D77A452-E61E-4B8B-B49C-949E1C8E257C@vmware.com> <9F926586-20D9-4979-AB7A-71124BBAABD3@vmware.com> <3F9D776E-AD7E-4814-9E3C-508550AD9287@vmware.com> <28B9471C-4FB0-4AB0-81DD-4885C3645E95@vmware.com> In-Reply-To: From: Linus Torvalds Date: Wed, 18 Oct 2023 11:15:59 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 -tip] x86/percpu: Use C for arch_raw_cpu_ptr() To: Uros Bizjak Cc: Nadav Amit , "the arch/x86 maintainers" , Linux Kernel Mailing List , Andy Lutomirski , Brian Gerst , Denys Vlasenko , "H . Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 11:16:29 -0700 (PDT) On Wed, 18 Oct 2023 at 11:08, Uros Bizjak wrote: > > But loads from non-const memory work like the above. Yes, I'm certainly ok with the move to use plain loads from __seg_gs for the percpu accesses. If they didn't honor the memory clobber, we could never use it at all. I was just saying that the 'const' alias trick isn't useful for anything else than 'current', because everything else needs to at least honor our existing barriers. (And yes, there's the other user of this_cpu_read_stable() - 'top_of_stack', but as mentioned that doesn't really matter). Linus