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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 B2A5FC433E1 for ; Wed, 26 Aug 2020 08:24:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 824B2206FA for ; Wed, 26 Aug 2020 08:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbgHZIYZ (ORCPT ); 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--