Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3486594pxa; Wed, 26 Aug 2020 01:25:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY/epT2MnqFaFxnQFP+u4aIrcElOKChO/JumzF2BwB8RUifzIbzIenaqH15KMjZv5B0vNT X-Received: by 2002:a17:906:780f:: with SMTP id u15mr526025ejm.259.1598430332212; Wed, 26 Aug 2020 01:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598430332; cv=none; d=google.com; s=arc-20160816; b=sCKqhc6nnkRrAUUH607EQCvlqXgLnNcnWEHmlu0XL9nJPOSHfiz6uBpdCUWa+bn1ck 8PR2xE2khrrlMZ9SBI9d8LYTy9I1Sp5hnpGtwpRlO8TZQI38zK02c46bIOlq6ET8k4q8 VhMWWY/T+OEbHTPr9oDu6jjMow1xwmtoSKQfr8LKkYt6HyRqmve6AxTw5ZpIfXAYDZnF lK1GiBSNmtOq8OTbrefdPcY0DALMSSBeXxMbgMVmmEOvz7GSevSGVo8jtE3DyFZnA185 yu+uJ2HwbeTYDKlACM/qkSTEAmQudk9Dune4CjKqF00fTJmu6o9na2IbQ6cPU1zwL2hL 4fqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vin7zqppx1VtK5bZ6TRDsPuuD6wWoQN2ATHRmp7QeoU=; b=dwJgA+Dv+49BaVGR1QD8K5AfbXcE/hInN1XOnJhStmMHuNwAhPwJyWFbKQc/zA6fqC MqC8+Jur1tNetntznk7w/P+VmQ840LsVBr3hEIZJEB9g0FKb31uAvGs9aeFbMrzmLMlE wQFVY0ihaRSXzpHwNHiYql0Z2mh97kRxqw7HhprkqUwCf1lTbW158pLwTAep8IkS+XFo tboEDDmcOItRFhUQkMdl0Rid0OSfrxsFi6J1Jon8T0jqVjjTCl7UXq9qxbWDbCX+/oPm 29TouSV2znK81co+ZlyKgy+rXopjH/lIcapchJ99vSH3L1JapC/TtcC0M20Tl6qKPj0S lmbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si974432eds.582.2020.08.26.01.25.09; Wed, 26 Aug 2020 01:25:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726884AbgHZIYZ (ORCPT + 99 others); Wed, 26 Aug 2020 04:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbgHZIYX (ORCPT ); Wed, 26 Aug 2020 04:24:23 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050::465:202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2DB7C061574; Wed, 26 Aug 2020 01:24:19 -0700 (PDT) Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4BbzRN02wmzQlKH; Wed, 26 Aug 2020 10:24:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id V2qe8rw4qZV0; Wed, 26 Aug 2020 10:24:12 +0200 (CEST) Date: Wed, 26 Aug 2020 18:24:01 +1000 From: Aleksa Sarai To: Shaokun Zhang Cc: Will Deacon , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Peter Zijlstra , Alexander Viro , Boqun Feng , Yuqi Jin Subject: Re: [PATCH RESEND] fs: Move @f_count to different cacheline with @f_mode Message-ID: <20200826082401.c6j5fwrbhl7vgmhj@yavin.dot.cyphar.com> References: <1592987548-8653-1-git-send-email-zhangshaokun@hisilicon.com> <20200821160252.GC21517@willie-the-truck> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kbfyuz6nl7vvspl3" Content-Disposition: inline In-Reply-To: X-MBO-SPAM-Probability: X-Rspamd-Score: -4.72 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8C01A5FE X-Rspamd-UID: 64bef2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kbfyuz6nl7vvspl3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-08-26, Shaokun Zhang wrote: > =E5=9C=A8 2020/8/22 0:02, Will Deacon =E5=86=99=E9=81=93: > > - This thing is tagged with __randomize_layout, so it doesn't help an= ybody > > using that crazy plugin >=20 > This patch isolated the @f_count with @f_mode absolutely and we don't car= e the > base address of the structure, or I may miss something what you said. __randomize_layout randomises the order of fields in a structure on each kernel rebuild (to make attacks against sensitive kernel structures theoretically harder because the offset of a field is per-build). It is separate to ASLR or other base-related randomisation. However it depends on having CONFIG_GCC_PLUGIN_RANDSTRUCT=3Dy and I believe (at least for distribution kernels) this isn't a widely-used configuration. --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --kbfyuz6nl7vvspl3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCX0YcHgAKCRCdlLljIbnQ EtTmAP0f9PQv9kGhoVe77BZM2Ob0AmjDyWJYpBkweQblDV8lWQD/VaLp9ZsNI3MB n+B7BruquMTrgoeUTCv70+QkPxpZAAM= =glhN -----END PGP SIGNATURE----- --kbfyuz6nl7vvspl3--