Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp580384ima; Fri, 26 Oct 2018 03:17:50 -0700 (PDT) X-Google-Smtp-Source: AJdET5c8X1jNrF6F2OG6kMVk9dSHvd5ouli4hSjs78tVE31jBimN0e+EEeb7qWOwuEczZEqX9xeY X-Received: by 2002:a63:c20f:: with SMTP id b15-v6mr2900043pgd.13.1540549070592; Fri, 26 Oct 2018 03:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540549070; cv=none; d=google.com; s=arc-20160816; b=iZ47zXTeTBkbChAnxah7fzB5Ep9dssBK3vK2SRMAmByn8dX3glRfLFsK1A4v7Mxfok dHBbuU1ib5p3rDUWfg14JA8n/4LDu7JpqKJ23xBFforxrSh1WS0/Vtb6WvXgJ6Xlkq5u 7RlPDB38zWuYLL6MfL2g888yIY0JtDNAqolyvORwhUSISHmoskdcGOmQzFEidBtyNwRf 9jF9yBnIjSsrGbkzanC8wQ5vmSDDURAX9F1vB2+/GsiskXdfWS2YtpiGNK0NnFkx3fPb gC8VNBuwjpm91b3QfbqXdZXm+o/hpbvh+8IWHilF2F/W5wAhWZDuDzK3+6+9Ej6X72QM 2HAw== 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:dkim-signature; bh=S/Ja/7U1Cp8VVRdj3AzqkcY5MzhLozKpOCXbigym99E=; b=Dxu/wHFtflNUhzUgLdstsDmG2X4EdV3c6bKs7aKz7HHzUeHE/7IWY+T1VNYV14xvu+ abJFkIUm6vwumNG/wz2+YCFHi1spk5Iaq5t89epama52iL+yOMXOO56Osqw5A/6g2tPT 41/9Kwh/ZF4dFOeEap2jWnadXyK0JHvCKxfhPruIdeJmSdmr3L0d/t3cJeFgK177Ecgd KXqPdkIhVvHd1dAzYawI9xtTTCvCmAK/fxHyjLr18jfnBOoE3tK1biVYgLH+HC27b1xh WHwbw5ojvY0UgT7h/KNjYo1Lx5Zfdyrsj4JOPO4geEaCDdBXcU6BLbkdQHQADLHaF2Q0 aPKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FU6w9F2O; 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 s13-v6si11421027pfc.149.2018.10.26.03.17.34; Fri, 26 Oct 2018 03:17:50 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=FU6w9F2O; 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 S1727244AbeJZSxm (ORCPT + 99 others); Fri, 26 Oct 2018 14:53:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58886 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbeJZSxm (ORCPT ); Fri, 26 Oct 2018 14:53:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=S/Ja/7U1Cp8VVRdj3AzqkcY5MzhLozKpOCXbigym99E=; b=FU6w9F2OJttLt4ke24tDhFVWt 5yd//uPWcoIBa2e2erPHAr1s1SSCe4lcJidBNCirnBeqlkcGMSDX2ENoBkjcvFlPXwjCQdJ6cU5ZP pdyDIfQastjdGzlI6ohqCBmsLxtTyZEbNArtGc+/YpAF/AFOyAp41Y51ot6OBzkQJsPh2+sknDG+o 9N6mnxrV335ae7MJmT3qmGoeN/t4j3B9ydiAbHhmZFYf/luHkYApp77gJy+CO4N0GZm9YF19gmq3+ ZirYKAhIQiroz5DMdak9sH3JuhTnK6SVXN7XgnDkq23d0hO9Ua29pZ01CeEXkBdnINQKsVFGNGxcd T7aVdZv7w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFzAx-0003NL-RA; Fri, 26 Oct 2018 10:17:07 +0000 Date: Fri, 26 Oct 2018 03:17:07 -0700 From: Matthew Wilcox To: Peter Zijlstra Cc: Igor Stoppa , Mimi Zohar , Kees Cook , Dave Chinner , James Morris , Michal Hocko , kernel-hardening@lists.openwall.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, igor.stoppa@huawei.com, Dave Hansen , Jonathan Corbet , Laura Abbott , Greg Kroah-Hartman , Andrew Morton , Masahiro Yamada , Alexey Dobriyan , Pekka Enberg , "Paul E. McKenney" , Lihao Liang , linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/17] prmem: linked list: disable layout randomization Message-ID: <20181026101707.GO25444@bombadil.infradead.org> References: <20181023213504.28905-1-igor.stoppa@huawei.com> <20181023213504.28905-14-igor.stoppa@huawei.com> <20181026093205.GD3159@worktop.c.hoisthospitality.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181026093205.GD3159@worktop.c.hoisthospitality.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 26, 2018 at 11:32:05AM +0200, Peter Zijlstra wrote: > On Wed, Oct 24, 2018 at 12:35:00AM +0300, Igor Stoppa wrote: > > Some of the data structures used in list management are composed by two > > pointers. Since the kernel is now configured by default to randomize the > > layout of data structures soleley composed by pointers, this might > > prevent correct type punning between these structures and their write > > rare counterpart. > > 'might' doesn't really work for me. Either it does or it does not. He means "Depending on the random number generator, the two pointers might be AB or BA. If they're of opposite polarity (50% of the time), it _will_ break, and 50% of the time it _won't_ break."