Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8421182ybc; Fri, 29 Nov 2019 10:13:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwBv+ClAMhewMzEW674bC4LtWvYqqfyhwXY65F8dEwlSqbmCiQLHhL19YO8uijAaTDjFcK5 X-Received: by 2002:a17:906:fac7:: with SMTP id lu7mr63318491ejb.5.1575051212323; Fri, 29 Nov 2019 10:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575051212; cv=none; d=google.com; s=arc-20160816; b=YnA9eSN/7CcfnegO89x2f25A2Gk+l0C7uSAsr9QRRjYzpZpzMAEB2U/A2LtsRfQf1k 02fh0OHQUkJkzuuVU6jOqLSbrcKaLVFbB1pHo4TkvpPpNr9YEwAQmN4tZag2SlzRW4bS XcQ8hJTcb+VSOTGzTMxIlaveP34sdZeV2gzFiU5Vyhs7gl+62LQ2QJCqqNnKwGhiZpUm O/WH1AG79pIp6JIA04dNaKaVu4hFC4uZM315cKedn5f7TnYE9on59VeAJJgFuSb4AxXf mO4ns8dPNquaMHPAKmZuvqODPtHIYu2Kiz9plkw7Pc/Wpq4zX1Klny8NyO6OnGocQYpZ m5og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=FIjJKDhTVJpwR7tpjrAPjzxfqJctwq1WizfhbFZ8W6c=; b=ruFVQO+rCCHoVxkkiiv5sT2vfrD7XLUOIhvZsguKrqwcqiKQxRNR1W2o4ew1CxF+1y mz0T6nP4FducgmRaXhaKsnCjTgpeIX7arnufrPWetz8RMOOfWEJmiRz1R0WXfIb15pOI EiiLWqWdkP+PjIhs7mCdvevOVJFcwdYO2ZL6wcuMbAGzwmJU+gR0bWciDmSY+xpbj/Bl 0Ytl7t7zR7IdbYMVO6fW8hDKOBZFd7L6Gr9xaACYyL93V+LGQ4QBe7fg6LPmvLj7+tg2 8KTwmDbpcubgTMy3sJE3aAhKEzl+oLM8XsJkDC8qvmREUtv9zhLkV0VBQbmb2udUJkKH u65w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n25si8391106ejb.416.2019.11.29.10.13.06; Fri, 29 Nov 2019 10:13:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727034AbfK2SMB (ORCPT + 99 others); Fri, 29 Nov 2019 13:12:01 -0500 Received: from gentwo.org ([3.19.106.255]:39528 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfK2SMA (ORCPT ); Fri, 29 Nov 2019 13:12:00 -0500 Received: by gentwo.org (Postfix, from userid 1002) id ED6833EF26; Fri, 29 Nov 2019 18:11:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id EB5E33EA25; Fri, 29 Nov 2019 18:11:59 +0000 (UTC) Date: Fri, 29 Nov 2019 18:11:59 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Luc Van Oostenryck cc: Dennis Zhou , Ben Dooks , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Nicholas Piggin , Arnd Bergmann Subject: Re: [PATCH] fix __percpu annotation in asm-generic In-Reply-To: <20191127225432.ttwxm3hxtg5utfaz@ltop.local> Message-ID: References: <20191126200619.63348-1-luc.vanoostenryck@gmail.com> <20191127175350.GA52308@dennisz-mbp.dhcp.thefacebook.com> <20191127225432.ttwxm3hxtg5utfaz@ltop.local> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Nov 2019, Luc Van Oostenryck wrote: > 1) it would strip any address space, not just __percpu, so: > it would need to be combined with __verify_pcpu_ptr() or, > * a better name should be used, typeof_cast_kernel() to express the fact that it creates a kernel pointer and ignored the attributes?? > * it should be defined in a generic header, any idea where? include/linux/compiler-types.h > 2) while I find the current solution: > typeof(T) __kernel __force *ptr = ...; It would be typeof_cast_kernel(&T) *xx = xxx or so?