Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3562023pxp; Tue, 15 Mar 2022 00:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzipzO3wNFOYJeXemF4pTSK4PY332+Y48vzsPkc8RcJGqB9ROoDr1youf65GkyzcanUsQDb X-Received: by 2002:a17:907:97c8:b0:6db:6c57:64ee with SMTP id js8-20020a17090797c800b006db6c5764eemr21033845ejc.320.1647330793335; Tue, 15 Mar 2022 00:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647330793; cv=none; d=google.com; s=arc-20160816; b=Wlx1Qrem7FawiXIHeKEspq8NntmUoYyfRdC7rzz57swJ5WvOvEnm58j7CdUy6qlbwi 5cCOXGeQTArXxFyRjq4VPMi7tIeDSfrmYtooTZSUvO8CBlxHueAoOY6YYrLkfzgLvtsc iCs/bblUE9lc9kckrx34qGT8kHcnb5GopxS6eagR0ux59fWXXF9B/FT1QLIk8m2GqWh8 EfeKQNINHdfycj2eLQZrXI7fKhhrKjwwJjIPsw2ntcjdz+VQajWTudZFARy8gbWjR6QD a2QgCFbLVrrt1px+vx4UI7dcB0hU+Wf/GuEdt0FoK3ts/5hxRVmHRyRqg/D3kHChL0Nl XZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iUfF+WCTjrbsCXHKV4lddJ1I8Kz2/BCoTPrTLSPUtRE=; b=nzm2cboeK9LR/KC30kMgPghIROavZ8jhleL3gpqcRh8PCsvcfyKwlzXEM+gPBKi1IP hv2eJ+l41HEzaneYvH9Cxa8PxZjJPOIFr6j7iRhCdnzSuB9Csm6CWs64q5IQ+Yvcl/Yz QJJnxrZs4XJqotCskp3uDsu4ExxJ9bHiwGQvsEZuhxSymlSu0I1nWhzWCC3+oijJPG/D GouHi0Xi1GAnvKU/mxZmTCbfqgBMkkUv9mFFKN1oKETIhjkPj7I1bIzdsny5sGgAk7of xh/keFuVQza+qb+Sfr5aaFXt1l+uzDbJrJukU/39jEU5UFihaVr0WTts4zpPyr5iutjg gyKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=W6w9vVrp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a170906410800b006d6426bab33si9610812ejk.62.2022.03.15.00.52.48; Tue, 15 Mar 2022 00:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=W6w9vVrp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344366AbiCOCCu (ORCPT + 99 others); Mon, 14 Mar 2022 22:02:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245677AbiCOCCu (ORCPT ); Mon, 14 Mar 2022 22:02:50 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D585213CC5 for ; Mon, 14 Mar 2022 19:01:38 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id 15-20020a17090a098f00b001bef0376d5cso1092732pjo.5 for ; Mon, 14 Mar 2022 19:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=iUfF+WCTjrbsCXHKV4lddJ1I8Kz2/BCoTPrTLSPUtRE=; b=W6w9vVrpMsMVWgQAqN/0jBMpWBeeJBo6DnfiJ0JUDQ1lPzXiu3u1xzHuAzdGmAgMiJ iVLyNEpnug2G4o04nIrkRREmr78O9X4p6b+7fDirOaE7EOkhY4fBBL7E8sxAmbRycO4t 3TPTa/F0XCcgsyXUMZjt2NYmLJt9fJsk2/aJuf+9ZAMB3Equxf+vhEy5ZdtsqwiT+dAX I+OT/fQvdE6pxndgzXuT+cnTkgBvOEEzwmqx7E2WxtKDN/pzrslAWd5nPxTBlZv+FZ/M yj7jjF4d9wq0g1Yvx8oUm2PEulp8X6iksKCKkdO1qjODFHnFjeG1mosEfivX3OOk76Zg Nhlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=iUfF+WCTjrbsCXHKV4lddJ1I8Kz2/BCoTPrTLSPUtRE=; b=oo3ouzMKyib3vb/PMNTfCR/K7fIhMSPfaqbiOKsqG6XKY+8CgOkl7E3pSOvTaOxDcE wE6S+mGgDlKEY7iF2cNaLLJJNjIyPdJZElgcNUWGq7z3jS5xaz+FModW8fyBrthC6FnF uNf2oGh64C9HszIb+PeNZ8S2Szc2cSiMj5prK/xlpocgj61dHEyX+0hbYIGcSnNOXvan Yi61e6KIutAjiQrTPPsAHsCH9UxrngwMWmyDLGTTqJI52iKMKdlg+/mqm+LRhhzApeEi Q0zauZgjnEGfaZQl5MW1QQrvy9FTsAbPrNkt9Zome+UICf89MWkqAUR+iWiWOUOWxKQL ZTCQ== X-Gm-Message-State: AOAM531mXXdFZ24G4Wc4mVYEY9wJAMkYknZPVMaUZ1skSWUJwy2YZhZc 9Roco5H9NpiSpGnS9QvrNNo2Rg== X-Received: by 2002:a17:902:dac1:b0:151:952a:8821 with SMTP id q1-20020a170902dac100b00151952a8821mr25214435plx.11.1647309697794; Mon, 14 Mar 2022 19:01:37 -0700 (PDT) Received: from ?IPV6:2600:1700:38d4:55df:e6f2:9562:60a7:682a? ([2600:1700:38d4:55df:e6f2:9562:60a7:682a]) by smtp.gmail.com with ESMTPSA id i11-20020a63bf4b000000b00380d3454c38sm14837963pgo.13.2022.03.14.19.01.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Mar 2022 19:01:37 -0700 (PDT) Message-ID: <9f2f1226-f398-f132-06f4-c21a2a2d1033@google.com> Date: Mon, 14 Mar 2022 19:01:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [RFC PATCH 04/47] mm: asi: ASI support in interrupts/exceptions Content-Language: en-US To: Thomas Gleixner , linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com, pjt@google.com, oweisse@google.com, alexandre.chartre@oracle.com, rppt@linux.ibm.com, dave.hansen@linux.intel.com, peterz@infradead.org, luto@kernel.org, linux-mm@kvack.org References: <20220223052223.1202152-1-junaids@google.com> <20220223052223.1202152-5-junaids@google.com> <87pmmofs83.ffs@tglx> From: Junaid Shahid In-Reply-To: <87pmmofs83.ffs@tglx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/14/22 08:50, Thomas Gleixner wrote: > On Tue, Feb 22 2022 at 21:21, Junaid Shahid wrote: >> #define DEFINE_IDTENTRY_RAW(func) \ >> -__visible noinstr void func(struct pt_regs *regs) >> +static __always_inline void __##func(struct pt_regs *regs); \ >> + \ >> +__visible noinstr void func(struct pt_regs *regs) \ >> +{ \ >> + asi_intr_enter(); \ > > This is wrong. You cannot invoke arbitrary code within a noinstr > section. > > Please enable CONFIG_VMLINUX_VALIDATION and watch the build result with > and without your patches. > > Thanks, > > tglx Thank you for the pointer. It seems that marking asi_intr_enter/exit and asi_enter/exit, and the few functions that they in turn call, as noinstr would fix this, correct? (Along with removing the VM_BUG_ONs from those functions and using notrace/nodebug variants of a couple of functions). Thanks, Junaid