Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3533480ybi; Tue, 18 Jun 2019 02:19:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/gLcitS1o8btASwxk33feNvCXhMeyMehpOsDTojhBGuagyJ+dg+aJprG5NDvzTzXQDScK X-Received: by 2002:a65:568d:: with SMTP id v13mr1759893pgs.144.1560849553669; Tue, 18 Jun 2019 02:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560849553; cv=none; d=google.com; s=arc-20160816; b=m1cSNsvj0Vjya0qvv9ghhm8wPoo8Mn80ugpVbmOyUTAIupJBMutSvCPdGHN0P52YuB 0SQwlZEd+NCpwIps7jtN7xBQAEvBmvdv5fmMY9/nczasugaM+pPQj9/w2MIKZOCy7P5A P0PQuUYwc1dME6ZBs22YvtL6ajpCxUwcgrARndC0ACDpEt8+dZDSA9Z8SKL8sJDR72o5 IfEjkTpFCq1bCv0IzLYvwqqL+gXJX4tBXAR6UcRBV7pozzbesqE7ff0L603rMoiExays XCFN10sQn4WKl5BUPTFO7TQmhvU1MkwQ2mgoCgTDx7Ey9zRcE8/R0yoFLHiErFsgKJNc VoEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ck9DfEr1n1N/xliLuAp5O1tFJRzPEHxxJLOoLA3be3A=; b=d2BaJCrUsP9GMzLkz/xYADqC5rfGgojIob6cvPsbH7kRUinILR0cWqVmx3cs7dhBBh jesuAbN5sKj5sgorURKiR504tWIB81QnNgRJkpfHPA5IC2boxXMOE1TuPFMJZfk14avu d9+xE+9FwApWOBju5+aWD7hnsrJz4mMUIElrpgziK6lzwzSFZ8aHMbS4JftXvLxmcOdj HUxVz0nv5kSvjm+jKm6/EoZntsowgkMduVUVydcPAv/R5iLIuCRnHSC4KW507cT84zO4 r0oAmnV86Wl9ujroYf2DBMZK/I31bq16cgBtjXrhb8/3hw+adomjmWk1V2GNFvtYcrUG lDcw== 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 i67si12929318pfb.124.2019.06.18.02.18.57; Tue, 18 Jun 2019 02:19:13 -0700 (PDT) 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 S1729420AbfFRJSU (ORCPT + 99 others); Tue, 18 Jun 2019 05:18:20 -0400 Received: from foss.arm.com ([217.140.110.172]:58798 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729137AbfFRJSU (ORCPT ); Tue, 18 Jun 2019 05:18:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D19DC344; Tue, 18 Jun 2019 02:18:18 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2BBBB3F246; Tue, 18 Jun 2019 02:18:14 -0700 (PDT) Date: Tue, 18 Jun 2019 10:18:12 +0100 From: Dave Martin To: Kees Cook Cc: Catalin Marinas , Mark Rutland , kvm@vger.kernel.org, Christian Koenig , Szabolcs Nagy , Will Deacon , dri-devel@lists.freedesktop.org, Kostya Serebryany , Khalid Aziz , Lee Smith , linux-kselftest@vger.kernel.org, Vincenzo Frascino , Jacob Bramley , Leon Romanovsky , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Jason Gunthorpe , Dmitry Vyukov , Evgeniy Stepanov , linux-media@vger.kernel.org, Ruben Ayrapetyan , Andrey Konovalov , Kevin Brodsky , Alex Williamson , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, Greg Kroah-Hartman , Felix Kuehling , linux-kernel@vger.kernel.org, Jens Wiklander , Ramana Radhakrishnan , Alexander Deucher , Andrew Morton , enh , Robin Murphy , Yishai Hadas , Luc Van Oostenryck Subject: Re: [PATCH v17 03/15] arm64: Introduce prctl() options to control the tagged user addresses ABI Message-ID: <20190618091811.GC2790@e103592.cambridge.arm.com> References: <20190613110235.GW28398@e103592.cambridge.arm.com> <20190613152632.GT28951@C02TF0J2HF1T.local> <201906132209.FC65A3C771@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201906132209.FC65A3C771@keescook> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 10:13:54PM -0700, Kees Cook wrote: > On Thu, Jun 13, 2019 at 04:26:32PM +0100, Catalin Marinas wrote: > > On Thu, Jun 13, 2019 at 12:02:35PM +0100, Dave P Martin wrote: > > > On Wed, Jun 12, 2019 at 01:43:20PM +0200, Andrey Konovalov wrote: > > > > +static int zero; > > > > +static int one = 1; > > > > > > !!! > > > > > > And these can't even be const without a cast. Yuk. > > > > > > (Not your fault though, but it would be nice to have a proc_dobool() to > > > avoid this.) > > > > I had the same reaction. Maybe for another patch sanitising this pattern > > across the kernel. > > That's actually already happening (via -mm tree last I looked). tl;dr: > it ends up using a cast hidden in a macro. It's in linux-next already > along with a checkpatch.pl addition to yell about doing what's being > done here. ;) > > https://lore.kernel.org/lkml/20190430180111.10688-1-mcroce@redhat.com/#r Hmmm, that is marginally less bad. Ideally we'd have a union in there, not just a bunch of void *. I may look at that someday... Cheers ---Dave