Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp828034ybl; Mon, 2 Dec 2019 19:02:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxn0Ay+0jk5hxfOM7TBiGjzuoozt0NmWfZ3T32ZmyqAqbfWs8aCoHnURtcL0FM/Xha17A4T X-Received: by 2002:aca:fc06:: with SMTP id a6mr1887033oii.12.1575342130353; Mon, 02 Dec 2019 19:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575342130; cv=none; d=google.com; s=arc-20160816; b=SnFyp5hMjGZyt5gbXUEXZbR0Isf14260AqZtv7FY8JDXK5JNcLL/zMz+cBnbqCB4JT vpqOv1Q9Yi1ZlLbZCbLOjDKgI1vEQSTAD3b4pBbgeW27Qa7+nIYDZ0aGe29xYZlGVebK jHGM+rZv9X//Lldt3c16bbELcTMqV9sYHZN5qdycQRraHIMcQrTZcDcxjUfTs37zy21T xxLdV4Psbx8rOp4/6I2n63Ma+YFCmOxX42vlDu9gmom/WrSU0koeaZNVf7ZUSctY5AYr hUajAmrVIoU7z0G4mOAqn2028TJFwvNqMSLXjwj810f7xlWLofa6nSHCOQr2y6VnUVYI 7Kww== 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 :dkim-signature; bh=HZYl9ujPBCb4Q8KhFCqYu50tnO5uzcIOpRaURtSjLV4=; b=SOk0v8ynEFolyqjVMjp6wkvwAETAI7bOqSfeQIWWNxxsjegs7aLf58qNBK5H6QnyKk lkDT+ZBM+EIkVHImggjV7o4YJifyJyk8kBoQvZY2vC7m94EwMXjrYZB2INLVA+DZvpKk Q/VXunZPClSeu4+2YS3L0VtEptdppqZdm9iHQ/FbDp3G3skOlQTDq9hS8AYMM9O/UzVY vDpoPNQvwmtomGbuGTLWIEUAnUlB3lOoemnQ7YqMqC9aXBCT8fthoqiXGLTVs4b5Mxe1 JyhskPeOH/FgTxQ7FiHfqT0VaixsO3fx14C4qlVi3MIqwVxxaZjx5G+27D5QxTIpBhNA t7jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QOLrjCYa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p25si545119oto.191.2019.12.02.19.01.57; Mon, 02 Dec 2019 19:02:10 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QOLrjCYa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbfLCDBN (ORCPT + 99 others); Mon, 2 Dec 2019 22:01:13 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34442 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfLCDBM (ORCPT ); Mon, 2 Dec 2019 22:01:12 -0500 Received: by mail-wr1-f66.google.com with SMTP id t2so1835009wrr.1; Mon, 02 Dec 2019 19:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=HZYl9ujPBCb4Q8KhFCqYu50tnO5uzcIOpRaURtSjLV4=; b=QOLrjCYaBxKjhhZsd6wWwsrpY0JN76eUSuBQRYbPxwRC271sdqVzpNeIRMG8KbovZI kYy83hLhtwapkakeoCeqF2btcYS+n3P0LE3pFT1zwDckWZbCZmTtkQYcc/vA29LlLwa7 DtaKdYUU8+2do7kmE5+ThSCaaWuKIm5ZMQdryvSAUaNfZotK8prpkX/+W3Cn+Z1rIUPI slbvt1XKOmiwrm719n75mTorHpGprHHcM0aOFu14gs2Hx//U1ZHc+QfZB8gxchISGUjj vg6mFh6b8vvxbRI8mpYeMVxnmt0Pd8uady9sdg+sAUvw23t1wbR8B6zpomolXoq3k+4p DQqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=HZYl9ujPBCb4Q8KhFCqYu50tnO5uzcIOpRaURtSjLV4=; b=qjUqjHdtUQi4/pod0gYAlYLjfth3m7nvOxumK6sNrUpR0LkJGvTUyBJfRsXQtYYrqq 9evmF0m37EkkxDPmo2jCj/3EV6jWJt1Kad3P7y4TgNpdhahDgnQpruHWss1h5t8wUZmk YvpS2GR4pRxat2JvsanDLL75t/DzpnzdSsyiXxUBltSKUZfFaVtBgK9qqkRvaCoJHfLa AzjdPZujWO5TGUswv5FvQi8zvM7OJ+yhHH0WsRnX+JlaSqkAYgw0ku/FBL8f8PiFA1eW UQPpsXE6fX1t2HazTvPnKGD3eWsTZeT9gyKo/kUmqtmp14RZofFt6MsXrphjZkmsJQRR KHJw== X-Gm-Message-State: APjAAAUodWAzwQQW561Lgj0KdtEtQdSlxDz06FmXhG9Q1DydsRdK56CQ fYFpE+O/43/sodHKaq0GN1c= X-Received: by 2002:a5d:50cf:: with SMTP id f15mr2364769wrt.381.1575342070498; Mon, 02 Dec 2019 19:01:10 -0800 (PST) Received: from ltop.local ([2a02:a03f:404e:f500:442d:b656:b1a0:d761]) by smtp.gmail.com with ESMTPSA id f2sm1269093wmh.46.2019.12.02.19.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 19:01:09 -0800 (PST) Date: Tue, 3 Dec 2019 04:01:08 +0100 From: Luc Van Oostenryck To: Dennis Zhou Cc: Christopher Lameter , 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 Message-ID: <20191203030108.ch7n6yoqgsco2alj@ltop.local> References: <20191126200619.63348-1-luc.vanoostenryck@gmail.com> <20191127175350.GA52308@dennisz-mbp.dhcp.thefacebook.com> <20191127225432.ttwxm3hxtg5utfaz@ltop.local> <20191130000037.zsendu5pk7p75xqf@ltop.local> <20191202190718.GA18019@dennisz-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191202190718.GA18019@dennisz-mbp> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 02, 2019 at 02:07:18PM -0500, Dennis Zhou wrote: > On Sat, Nov 30, 2019 at 01:00:37AM +0100, Luc Van Oostenryck wrote: > > On Fri, Nov 29, 2019 at 06:11:59PM +0000, Christopher Lameter wrote: > > > 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?? > > > > typeof_strip_address_space() would, I think, express this better. > > It's not obvious at all to me that 'kernel' in 'typeof_cast_kernel()' > > relates to the (default) kernel address space. > > Maybe it's just me. I don't know. > > > > I think typeof_cast_kernel() or typeof_force_kernel() are reasonable > names. I kind of like the idea of cast/force over strip because we're > really still moving address spaces even if it is moving it back. Well, 'typeof_cast_kernel()' somehow conveys the idea but sounds a bit weird as the macro doesn't contain a cast (expression). > Thanks for debugging this. I'm still inclined to have a macro for either > cast/force. I do agree it could be misused, but it's no different doing > it in a macro than by just adding __force __kernel. I'm glad to help making the kernel type-clean (with the goal of catching more bugs earlier) but I admit that I absolutely detest these layers of ugly macros. I'm working on a nicer implementation but it's not yet ready. Best regards, -- Luc