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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 F25A0C6786E for ; Fri, 26 Oct 2018 10:17:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAAB92064C for ; Fri, 26 Oct 2018 10:17:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="FU6w9F2O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAAB92064C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-integrity-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbeJZSxm (ORCPT ); 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-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@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."