Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2784875pxb; Tue, 21 Sep 2021 07:37:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkwAPGSspy256g+z+AWfMuoNFKqWT0f6MpkUQA3/3hDWh6H1oHGVbddlO79MydzlYUBXNo X-Received: by 2002:aa7:dd8c:: with SMTP id g12mr35783354edv.280.1632235037158; Tue, 21 Sep 2021 07:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632235037; cv=none; d=google.com; s=arc-20160816; b=tZvkBvQLg44gD3fR0Y+mNS4C6V5nAJGlyxKzOvt+2Q1QoDCctkhTnkmzP83SLKDmOq 6jRNhHiNmzkL9dnRIeMa3H5v2mE8pvnJTDcVC0huQ148HLhkMxCwTExG+qW3VgajYUad Q4ZpiD0NQFuV7cHheL36TGfhkHJvcLnqFsC8Tn1xXb9SRWWC+84PHNrY33LLBvFx6ycC QG4RP0TCX+lsU3zjLMuGYxe/LbpXc4ukpm/0TFfFkFcqO5YxMMv/w8QPkjGbrIrY6/Rc nKWuLp0qfVVt1dcNZtnd/gAnMi3r3yXKbHYqH1OPy51c/7rG66D18repYxM07dLyYonz XWRw== 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=mt5z+MTvIXfkfJHGwkXCnjTCaO1yXPjuyx+vnuzqbpY=; b=qEapyeuda2y/Ma9x7yfNimWfrMPI4m2CRNFe1OKFBMOw3pw0yoXMQ8JwzU+7p8QcyP lJcYeyyemHLu5O9tNDHDRV3ONaI6YfLbiNXXcVnmHqtiUVafYpMF13WlFMf2rfSEKshH 6GIjMJzJNgQ8mYDdOBIst6BtkYUp1KB6iw2Uv/lpxC4mB4XUQ1C/GUhaO/lY2Bl3Q7hu eQP9uj45aACcYl5Xb0FWgSceRGsSYaUeY7+a/z2nCR1yKFkQR+lgN931xkCFj0rzl0LY Blx8OMsiKwsjq3MKXwEZKhEIKA7YR7cFPO3mxY+cu4K848LlgqtQ/KxJ9SZHYmCvDTJU KrcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@me.com header.s=1a1hai header.b=dZtu7zQj; 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 w2si18014913ejk.273.2021.09.21.07.36.31; Tue, 21 Sep 2021 07:37:17 -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=dZtu7zQj; 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 S233627AbhIUOgX (ORCPT + 99 others); Tue, 21 Sep 2021 10:36:23 -0400 Received: from pv50p00im-ztdg10021801.me.com ([17.58.6.56]:36877 "EHLO pv50p00im-ztdg10021801.me.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbhIUOgW (ORCPT ); Tue, 21 Sep 2021 10:36:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1632234894; bh=mt5z+MTvIXfkfJHGwkXCnjTCaO1yXPjuyx+vnuzqbpY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=dZtu7zQjb8UDJQ6/fAx52qpNf0Eo/pPzoKYPxNYvhwF7NuySopjA2HmpyGd/dvAyB XgkhwVQGM4mFHBHtscAG8NvC1vG1SrVB8467IVQqdvuvqaaF/B6cbtOxknKoxXAP/h VpJ7uNCE8RRSgHWRSib02SqXuc0xw7gkEgOcmdFTJtrpvePq6dgBlvJLZvluYZLMCk X1NgGiXW6D9Y+K3K2MEhLzFAYjVb0sV9dpjEg1nZMFeDh+BaHMhf4fzc6pdS7Yu00I AswAK9LVmadh8zxDkIdMhwgoOVlZK80xh2R66uKUBoMQLoNIzecQcaNNLWicuOVII6 W6i6GKFEPF/pw== Received: from xiongwei.. (unknown [120.245.3.37]) by pv50p00im-ztdg10021801.me.com (Postfix) with ESMTPSA id 3D93C360390; Tue, 21 Sep 2021 14:34:36 +0000 (UTC) From: sxwjean@me.com To: x86@kernel.org, linux-mm@kvack.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, luto@kernel.org, krisman@collabora.com, chang.seok.bae@intel.com, viro@zeniv.linux.org.uk, nivedita@alum.mit.edu, adobriyan@gmail.com, oleg@redhat.com, sblbir@amazon.com, axboe@kernel.dk, laijs@linux.alibaba.com, dave.hansen@linux.intel.com, peterz@infradead.org, akpm@linux-foundation.org, arnd@arndb.de, davem@davemloft.net, keescook@chromium.org, kim.phillips@amd.com, yazen.ghannam@amd.com, dave@stgolabs.net, metze@samba.org, elver@google.com, ebiederm@xmission.com, christophe.leroy@csgroup.eu, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH RESEND 0/2] Use generic code for randomization of virtual address of x86 Date: Tue, 21 Sep 2021 22:34:12 +0800 Message-Id: <20210921143414.70723-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_04: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=1015 mlxscore=0 mlxlogscore=233 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2009150000 definitions=main-2109210090 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. Why resend? Because I missed email addresses for patch 1 and 2, so resend the patches. Sorry for the inconvenience. 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