Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1957759rwb; Mon, 7 Nov 2022 07:37:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4qdS89OskdWA/SxzCzuLR+OKZiwMUEE/T99UZae57k3ZuIhqUiWN1+IF3EJyxcQWpqUbcB X-Received: by 2002:a17:902:e5cc:b0:188:712f:df78 with SMTP id u12-20020a170902e5cc00b00188712fdf78mr14616265plf.106.1667835443929; Mon, 07 Nov 2022 07:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667835443; cv=none; d=google.com; s=arc-20160816; b=jQbsWGtqbq7nkzr0ARLCPJecvUZM+JVC8Rn66A+IRql/Qt67e+6BnYFpNhY7JANkny jYCfGh/ggAVYcYicANdhJ+L22/8NiWbMCTH2MSt+5OmIkSgW9gb6aldQd/YQboAvubWP gKgBXPFiT0RASXThrWeXJb4E0lvuUHS5vRLWYRB4dXqrZ1eSr55HAQJ9APie8FDuVGJs Xo8IxV1FNHL2YzfIUUF/xjbTxSLl7zwHjrBZhTgJkTCA4/t/wc8Pum/P5R95J75rR1QE 9uSC6CQu4NmSEACI5lRnbY8sH8VkLQ3MaMI2ev/X7bvWwsuP76BYK7s4XQzs4P9qgL29 JdxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fk3tuS9LSYa7Gjf7y5mQ+pbRf3RBMe1Eavpj3BGpcOE=; b=MKuPwbtcm0N9W9B0K6Qg4nYCrQwvRB9TdDVyyRDfuxzWjtSgIPD7nOfWeS8Cb0p0+o Xa2L0QyrwdxVApAY+Ef5hx2RsCrGW2yM2ib7ZL2YsAz3QC29F4C59CiyI02Xb3Sz6TKA JaRzQIJpLoJSmErq04b3kUbReuESKZybO3zeKmmr6RVPMqy3eM35fj4VypqQh6ilcv9j 8dAywtVFpD1uIBaCV94OhVJvomxhUBQsgfuqF5QclLJI3cNekHNPZNv8pVJm9zG0FssG h4AhvyRIT0+LulS//gqwKGxgCMaOUlBVBqifAp32+TjMIacwbSMFpQtX5jZcJfl9n+3b q/Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XmS3J4Mt; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e33-20020a630f21000000b0046f6afe556bsi10684715pgl.651.2022.11.07.07.37.12; Mon, 07 Nov 2022 07:37:23 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=XmS3J4Mt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbiKGPMs (ORCPT + 93 others); Mon, 7 Nov 2022 10:12:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232630AbiKGPMo (ORCPT ); Mon, 7 Nov 2022 10:12:44 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D09731E3D7 for ; Mon, 7 Nov 2022 07:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fk3tuS9LSYa7Gjf7y5mQ+pbRf3RBMe1Eavpj3BGpcOE=; b=XmS3J4Mt/tjP1mIWns7bdJheVk 9Rii8MMX5cdPJJvngi2yhMoYd70xpaGH0rdrBWWvOrZj3mJMsbAQEl8t+bxs0d8Niv+04FF3/qs0W raT1ghSmrRsDTqmsXec1QvQgzXV6Q9e5DDtTUUDAnth1XjAWc1R50CauOrMsnfHjXeXMOWkXQuGpa BfIVEgXC/J37SrxCOdFGK9n70vpRj4xdwoFy2rCHHornn0mI+cJesuBKuUW+HZ9HFuiv1nnZYk8eX wVKmXxuGglRl/TvDgs5kddvAcIIYW/2v/R0jvTzePgsDDx/B1XHpv3KpavJE727CmjDhlJwcuJUoN D+/eh6hg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1os3nY-009S7H-FH; Mon, 07 Nov 2022 15:12:29 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9E3FD30026A; Mon, 7 Nov 2022 16:12:20 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 56DE420298A51; Mon, 7 Nov 2022 16:12:20 +0100 (CET) Date: Mon, 7 Nov 2022 16:12:20 +0100 From: Peter Zijlstra To: kernel test robot Cc: oe-lkp@lists.linux.dev, lkp@intel.com, Linus Torvalds , linux-kernel@vger.kernel.org, x86@kernel.org, Dave Hansen Subject: Re: [tip:x86/mm] [x86/mm] b389949485: WARNING:at_arch/x86/mm/pat/set_memory.c:#__change_page_attr Message-ID: References: <202211061748.eb591682-oliver.sang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202211061748.eb591682-oliver.sang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 Sun, Nov 06, 2022 at 08:38:27PM +0800, kernel test robot wrote: > > Greeting, > > FYI, we noticed WARNING:at_arch/x86/mm/pat/set_memory.c:#__change_page_attr due to commit (built with gcc-11): > > commit: b38994948567e6d6b62947401c57f4ab2efe070c ("x86/mm: Implement native set_memory_rox()") > https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git x86/mm > > [test failed on linux-next/master 0cdb3579f1ee4c1e55acf8dfb0697b660067b1f8] > > in testcase: boot > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G > > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): > > > If you fix the issue, kindly add following tag > | Reported-by: kernel test robot > | Link: https://lore.kernel.org/oe-lkp/202211061748.eb591682-oliver.sang@intel.com > > > [ 44.943065][ T11] ------------[ cut here ]------------ > [ 44.943725][ T11] CPA detected W^X violation: 0000000000000060 -> 0000000000000063 range: 0xffff8881beca5000 - 0xffff8881beca5fff PFN 1beca5 > [ 44.944929][ T11] WARNING: CPU: 0 PID: 11 at arch/x86/mm/pat/set_memory.c:609 __change_page_attr (arch/x86/mm/pat/set_memory.c:609 arch/x86/mm/pat/set_memory.c:1582) > [ 44.945824][ T11] Modules linked in: > [ 44.946229][ T11] CPU: 0 PID: 11 Comm: kworker/0:1 Tainted: G W 6.1.0-rc3-00010-gb38994948567 #1 f37474c2082f37dd433f70907b94c2b0df8d70b8 > [ 44.947518][ T11] Workqueue: events bpf_prog_free_deferred > [ 44.948074][ T11] RIP: 0010:__change_page_attr (arch/x86/mm/pat/set_memory.c:609 arch/x86/mm/pat/set_memory.c:1582) Urgh, as spotted by dhansen, the code in change_page_attr_set_clr(), specifically the checkalias thing, seems to rely on single bit flips for NX. Let me try to make sense of this stuff....