Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2624958pxb; Tue, 21 Sep 2021 04:14:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx9BTqJfgZcpQMab35Sc8jaCLn81Ti7NMV1DvQ6p0LXYfgwYbABx7687H4GGMiEXNvw39k X-Received: by 2002:a17:906:40c3:: with SMTP id a3mr25465509ejk.38.1632222866654; Tue, 21 Sep 2021 04:14:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632222866; cv=none; d=google.com; s=arc-20160816; b=ojyELiyKXYusndmojK5OKulIuKaINiCSHbrdiGLxPlHWVKD9nAJmGLEZZDC9UQA2VK WQGhbDINKxOgtXrYp+ryacSAhk7BfXIyzNARTipt4PRgFdgdKxZpSqu0kwwFEdQwCYh8 YtAELI/VugVyuP/1tpOfICtqM3xi9C11u87evBHMxPIBuqTCMrkS+iLY6W+PGsNWEK+A Xqr58wgXwMfHi3FF9p9B8KG5lPJrNwBz+rWHzi9jr6xZaVq3jribeljU2iL6Ac8oYSWG rjSk6P3tvM9RpDMJqJL3lTONNzEqPp6RuZqvAHZFk4foC2owfVfMSxY770olxoQ0DTN2 UG8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qKQEOuLkz9rupJ8tm470ugxnMVFuW3h1Tk7tw22voKM=; b=kJiCRGBSt9VFRzKdwjod2+jfiZdc22D9jV4YCJj0kXRrWaN4dOhPyVvnPRS+P01C8q HOp6mstb5U2YOzJKUGKQwsJR2ASNS0BD0ZxEt0nUUbInVuT40znGyhAB7aW75sD0D1D1 Zpe2gsXzhdrQQr7EUbSrIT1bH4sB6HsYSA5Ri9DMUKgWWLBm+z6Is+QkdJPjCL0bwaXK VPhELZhS2owESaZ+6wyPZDrA/LyjaorGR1K7tOBdaNuTUiaNzMtUulIEf/ZZ4gFbOn8F W3k0vNvyFozybxrUfS6Cg1DPCo8Cyuns48Hu4Da1I3oAUmKxp4cq5EQlauFIGLkV8rex oDRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=NViApuCr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si20451177ejl.45.2021.09.21.04.14.01; Tue, 21 Sep 2021 04:14:26 -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=@me.com header.s=1a1hai header.b=NViApuCr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=me.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232308AbhIULNq (ORCPT + 99 others); Tue, 21 Sep 2021 07:13:46 -0400 Received: from pv50p00im-ztdg10011301.me.com ([17.58.6.40]:41095 "EHLO pv50p00im-ztdg10011301.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbhIULNp (ORCPT ); Tue, 21 Sep 2021 07:13:45 -0400 X-Greylist: delayed 485 seconds by postgrey-1.27 at vger.kernel.org; Tue, 21 Sep 2021 07:13:45 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1632222252; bh=qKQEOuLkz9rupJ8tm470ugxnMVFuW3h1Tk7tw22voKM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=NViApuCru0vMSJB5RPBpcMC2Of1EMzEt7tUr73/fopKQysEDa1rGjH+qDwo0Mr3xM 1Y2J1HUWF1ASGWnUiWElYzMS8mNYiqaywWCUdNSKvlYGibc/8vqdhoynixtETOa0Em 88AORBjmVXyihSXh741XG/yLZZ/LQcEXNfL8rSWo8A+9mOeKwt55qK60jOxG5+ZCPn BbxW7bEBWoLm7NZ1FgqBjuUeRwP2bTMzNc0yPzeqMkIzBhW02Bjy/fMtqGjFcsnjCs 1XgVTq9JmYGb3iw2veLo4G8yQUkY2XMVFuSJQfhkAUSor+YgZ4hpmagt4eD3DjchEE LqkwxhGFyzr8Q== Received: from xiongwei.. (unknown [120.245.3.37]) by pv50p00im-ztdg10011301.me.com (Postfix) with ESMTPSA id B2FD276035E; Tue, 21 Sep 2021 11:03:55 +0000 (UTC) From: sxwjean@me.com To: x86@kernel.org, linux-mm@kvack.org Cc: sxwjean@me.com, Xiongwei Song , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Gabriel Krisman Bertazi , "Chang S. Bae" , Al Viro , Arvind Sankar , Alexey Dobriyan , Oleg Nesterov , Balbir Singh , Jens Axboe , Lai Jiangshan , Dave Hansen , Peter Zijlstra , Andrew Morton , Arnd Bergmann , "David S. Miller" , Kees Cook , Kim Phillips , Yazen Ghannam , Davidlohr Bueso , Stefan Metzmacher , Marco Elver , "Eric W. Biederman" , Christophe Leroy , linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Use generic code for virtual address of randomization of x86 Date: Tue, 21 Sep 2021 19:02:50 +0800 Message-Id: <20210921110252.2593542-1-sxwjean@me.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-09-21_01:2021-09-20,2021-09-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2109210070 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiongwei Song Hello, The two patches are to use generic code for randomization of virtual address of x86. Since the basic code logic of x86 is same as generic code, so no need to implement these functions on x86, please see the details in comments of patch 2. Please review it. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Gabriel Krisman Bertazi Cc: "Chang S. Bae" Cc: Al Viro Cc: Arvind Sankar Cc: Alexey Dobriyan Cc: Oleg Nesterov Cc: Balbir Singh Cc: Jens Axboe Cc: Lai Jiangshan Cc: Dave Hansen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Kees Cook Cc: Kim Phillips Cc: Yazen Ghannam Cc: Davidlohr Bueso Cc: Stefan Metzmacher Cc: Marco Elver Cc: "Eric W. Biederman" Cc: Christophe Leroy Cc: linux-kernel@vger.kernel.org Xiongwei Song (2): x86: Rename TIF_ADDR32 to TIF_32BIT x86/mm: Randomize va with generic arch_pick_mmap_layout() arch/x86/Kconfig | 2 +- arch/x86/include/asm/compat.h | 7 +- arch/x86/include/asm/elf.h | 2 +- arch/x86/include/asm/page_64_types.h | 6 +- arch/x86/include/asm/processor.h | 4 +- arch/x86/include/asm/thread_info.h | 4 +- arch/x86/kernel/process.c | 5 -- arch/x86/kernel/process_64.c | 4 +- arch/x86/mm/mmap.c | 112 --------------------------- include/linux/compat.h | 4 + mm/util.c | 18 ++++- 11 files changed, 37 insertions(+), 131 deletions(-) -- 2.30.2