From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by sourceware.org (Postfix) with ESMTPS id 1098E3858CDB for ; Mon, 28 Nov 2022 07:13:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1098E3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb32.google.com with SMTP id y83so12165823yby.12 for ; Sun, 27 Nov 2022 23:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PnDGaYcDtiwIpWiA2yMrwTHMo6+eM4FDcTywLcEREHk=; b=E7RBcHmoSGEUGy1OTqLOlpi8AugBcOA7RUvrY8skcETDiwC2NUwY5Y8WForYbdCFlK D/CZtiOFNlgge3bLVfA9xIr4YUZBU4UrLgm00vwzdaHXRAucT1QTxZgxQksNhDS0k/Jz M7/gA8Ipu9Ncmlwg06faDPAP9vaQrWNZRXIfSg4TyxjiURMWIZtnMd/uzwDMggMpPiEW 7cF/bUMVlRSpYE3JaPIgXVMmKwz0zFcg250IaWf89S0kXKoJ9/RP23OmLt07T6ExFCs1 G7RlsrgXBJJn1msHbwfr+Ubrnx7cXM57D/RJt11WefqlNIRgAgpuDJ53TesXKNC1o5dc g3KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PnDGaYcDtiwIpWiA2yMrwTHMo6+eM4FDcTywLcEREHk=; b=FDdgK9bZXYDfXyVdjcMovEqiSvGxMzmfATTtkCSxflN1RjF4kBZHwb/GppD+xME2wZ OjeUHYIo0q595ExknAJvqYr7fwO6SCMDzCEuT2v1BLKsrm3VMmDIcYu5faeJ4ZdMcT+E ft7eq82SMT6/Oxx6wgubztJajFR1AAQNfySBr1IR+DU/pj0lFV20Fenki/QXbSsdQo+i r6zsEVmYFARiExmdGDXcSPIpJzTcC0fd2mQBxadCGS2Gm6MTBZtwwGRrQWXlF3wfCHa6 wDpRdaaeDOlpJ7I/9QMXDjKZ8D95rcn2w4Q3eMsYExIUDBTX9SNI5yEwXAMRdn1MQzkC ja/w== X-Gm-Message-State: ANoB5pnK+yzf7ncPySHCI4QcxoA8oCxzYheNC4LfKE0KvAg2nTHlaHfO PkiWe30gM379+qM/5ooSq8uFQEJmIi/47Zo7nuQ= X-Google-Smtp-Source: AA0mqf7sru2URZAzWnnOn4YKouN6dd7/G9ovZvTbE93ckb/BEvyNsQ+WZwDvCJjn9JZntQ9sn7+QQkENeWY+1WhFzIU= X-Received: by 2002:a25:b1a5:0:b0:6f4:c7dd:1e0a with SMTP id h37-20020a25b1a5000000b006f4c7dd1e0amr8017013ybj.223.1669619586372; Sun, 27 Nov 2022 23:13:06 -0800 (PST) MIME-Version: 1.0 References: <20221111012631.76776-1-hongtao.liu@intel.com> In-Reply-To: From: Uros Bizjak Date: Mon, 28 Nov 2022 08:12:56 +0100 Message-ID: Subject: Re: [PATCH 0/2] Support HWASAN with Intel LAM To: Hongtao Liu Cc: liuhongt , gcc-patches@gcc.gnu.org, hjl.tools@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 28, 2022 at 4:35 AM Hongtao Liu wrote: > > On Fri, Nov 11, 2022 at 9:26 AM liuhongt wrote: > > > > 2 years ago, ARM folks support HWASAN[1] in GCC[2], and introduced several > > target hooks(Many thanks to their work) so other backends can do similar > > things if they have similar feature. > > Intel LAM(linear Address Masking)[3 Charpter 14] supports similar feature with > > the upper bits of pointers can be used as metadata, LAM support two modes: > > LAM_U48:bits 48-62 can be used as metadata > > LAM_U57:bits 57-62 can be used as metedata. > > > > These 2 patches mainly support those target hooks, but HWASAN is not really > > enabled until the final decision for the LAM kernel interface which may take > > quite a long time. We have verified our patches with a "fake" interface locally[4], and > > decided to push the backend patches to the GCC13 to make other HWASAN developper's work > > easy. > > > > [1] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html > > [2] https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557857.html > > [3] https://www.intel.com/content/dam/develop/external/us/en/documents/architecture-instruction-set-extensions-programming-reference.pdf > > [4] https://gitlab.com/x86-gcc/gcc/-/tree/users/intel/lam/master > > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ok for trunk? > I'll install 2 patches if there's no objections in next 7 days. FYI, I have no objection. Uros.