From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F09D5C31E5D for ; Tue, 18 Jun 2019 09:18:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5257206BA for ; Tue, 18 Jun 2019 09:18:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n8m2kSzN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5257206BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DDODwRewHtY2pJzn58oi46hdc6FWh4+KGE+2Vv3wbos=; b=n8m2kSzN2atlYJ aAEVGH5sNRy6SkW2C3sjdbKmhKBJgWbc1umozbbNVvK2bAJ+4kroenQFc8mVcS5MdF2UyNQHleYY7 Jix9g0IVZnAJpHSswg9wDAmbV35CJ3DHqZVud6ykMU8QdirounIS9fdnL6AXwKWRG8v6ngdvn3zFL 2BCqSBjnr7jcgzVE51AgJg6WcfsNFM8DolpuDJZIgJtpDJ+4OL2xiqjD7/SHIlh4HLh9DHuD6+Btk tIfXyr/jXuohA/P7xixff6PTPtbpi5sLcxMHaKr+UCorfwYbALESdJGkpzmKTeymA+QkJhlKgFn3t daQF6LFnPW7B0qLZi3bg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdAG2-0008HM-3S; Tue, 18 Jun 2019 09:18:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdAFx-0008Dc-5o for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 09:18:22 +0000 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 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-Disposition: inline In-Reply-To: <201906132209.FC65A3C771@keescook> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_021821_300025_AD6BE098 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , kvm@vger.kernel.org, Szabolcs Nagy , Catalin Marinas , Will Deacon , dri-devel@lists.freedesktop.org, Kostya Serebryany , Khalid Aziz , 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 , linux-arm-kernel@lists.infradead.org, Ramana Radhakrishnan , Evgeniy Stepanov , linux-media@vger.kernel.org, Ruben Ayrapetyan , Andrey Konovalov , Kevin Brodsky , Alex Williamson , Yishai Hadas , Mauro Carvalho Chehab , Dmitry Vyukov , linux-mm@kvack.org, Greg Kroah-Hartman , Felix Kuehling , linux-kernel@vger.kernel.org, Jens Wiklander , Lee Smith , Alexander Deucher , Andrew Morton , enh , Robin Murphy , Christian Koenig , Luc Van Oostenryck Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel