Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp692566ybk; Sat, 9 May 2020 15:41:21 -0700 (PDT) X-Google-Smtp-Source: APiQypKe8+SN/r0uIRqGdkTjSZkiR7TPDhpuwlKnmaBTL9aa8HzTUBYGILA5ZEQvPa/XAnb6CDrB X-Received: by 2002:a17:906:3d69:: with SMTP id r9mr7712663ejf.20.1589064080946; Sat, 09 May 2020 15:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589064080; cv=none; d=google.com; s=arc-20160816; b=aMiusVjt6zKwJOkg/+UAEf3ISckseBcug+ou/4dx0yyoIeNy0aIQY9mazsMBnIiwM6 dwM3Mn2uLebB0XbOYjIGeWjMll8zLxl1ct9yvHBm+gEzoni+i6qmqhhPSWVooMaEPE25 EdT4I3wjm9i2BzbO8WGjeZELilLO9clkD+13+OZQ5D++7+k71r3m177KALs4GQylZ+wt 91xKPH02MBa8CynfaCxzKu6s/4b6a+ssbsyWHgvwkrSE+rerKFi2ZSg2jZamMlW+ZmQ2 wGWfWmsK99YFI/sY1hqAKOaBGgST+FJlUZXyKPZrqDwXaoh89pivk/sN68duoJf3o5CS +k7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RTmENfxU5R9K/kqZ8fgl7re90upWsOKx87bajtg/0vQ=; b=0yHxZBiPGk8gFoS78PIkv6vBdu49WYuNTpphvDTWpEJWun/EJF6pddvsAiTwNuEO8G Cua2F7CQkdSWyodkXnDUTb2Tx1ZfsVZCKxybVmDnW+Pr7UpRn9mcOVamGaI2VZv0f/K/ pv7hN3K7zNhidvLVmzUoW83XH6F0P9Ek29lJp+RtuG8d1Xs/qQ0a/lSDsTf1epQx2YwI IPjsLE5Y8vuuBXfaQk18AE3uOQogZeeGueZf26AUVuYmH5tybGwxuj5095FNalOGp1KH UzWtzNKG2eam8CMjMW/E2fUKdPw6W1YhkFbpOILq/mQk46pk7vW2oOHM87PSMs5LPCMO vRFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CVNbL4ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si1798218eds.571.2020.05.09.15.40.58; Sat, 09 May 2020 15:41:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CVNbL4ks; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728630AbgEIWjo (ORCPT + 99 others); Sat, 9 May 2020 18:39:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:46752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbgEIWjn (ORCPT ); Sat, 9 May 2020 18:39:43 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3643821473; Sat, 9 May 2020 22:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589063983; bh=SwQUS2Nt2C8FBvN11lGb6nzUbV64QKYF4/J0HiSqlRU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CVNbL4ksp91+dUs+vz47oyZ7p/mbQA1Iby6izWutLBGFbm4+7KM3jeamMIbqGi5In 7OSkwBp3Dfny+nbscPdTYVHvP9MBH8lNGT9w58UB2ftCdRXhswFYYZJcd3hTOo2d/g U4DYV/bRr1GGnf0MMA9xoL/wR00BVb0fdVgVx1ws= Date: Sat, 9 May 2020 15:39:41 -0700 From: Jakub Kicinski To: Stephen Kitt Cc: "David S . Miller" , Joe Perches , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: Protect INET_ADDR_COOKIE on 32-bit architectures Message-ID: <20200509153941.03088923@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200509224928.26d44ac4@heffalump.sk2.org> References: <20200508120457.29422-1-steve@sk2.org> <20200508205025.3207a54e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200509101322.12651ba0@heffalump.sk2.org> <20200509105914.04fd19c8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200509210548.116c7385@heffalump.sk2.org> <20200509224928.26d44ac4@heffalump.sk2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 9 May 2020 22:49:28 +0200 Stephen Kitt wrote: > On Sat, 9 May 2020 21:05:48 +0200, Stephen Kitt wrote: > > On Sat, 9 May 2020 10:59:14 -0700, Jakub Kicinski wro= te: =20 > > > What if we went back to your original proposal of an empty struct but > > > added in an extern in front? That way we should get linker error on > > > pointer references. =20 > >=20 > > That silently fails to fail if any other link object provides a definit= ion > > for the symbol, even if the type doesn=E2=80=99t match... =20 >=20 > And it breaks the build if INET_ADDR_COOKIE is used twice in the same uni= t, > e.g. in inet_hashtables.c. Ah, so we'd have to use a valid type like, say, char.