Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2202214ybi; Sun, 9 Jun 2019 06:12:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtxnYltZl+9YgzlJhzTbBlsOvLI5wY7u0SwqTcOgs37CXdS+6ODTQf79bvd/7vJIxmVZmE X-Received: by 2002:a62:3085:: with SMTP id w127mr66709891pfw.170.1560085970450; Sun, 09 Jun 2019 06:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560085970; cv=none; d=google.com; s=arc-20160816; b=VZ3XnkchS11NiKJlnhHKSidfVw9EYUlA6HdxgQBaMTL571ACdo7XooidzS/7kba98b x0aSOfxSsHRJ9lBycCvttU07iUS43i7xFskw5LNmowSCO5APUkNkOcqXFDa2SGJ6TSSY G1in1HxGkTSM1XXrv7NSsDpKp2Lye2bUtpNRQ83GJEpzHgQT9hjO0qa+tg2Fr2830PU4 msiGp/pkxTXVsLqYSsI3rnK5s+OioVWTA1xAHul4MP6H90HjJrMk7dU0UbFS7gR65LRb GvzelM6LyWcP2IJCE1xE5V3uZsRZHoNEQSKLmn3yBPDuDon5rFHKLYvBsi7jYiXbmqIG xCdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=D2KZcH+CIojzcVOyJ49CmzTL9qKNLonYM/CDjsbkuYM=; b=lRAxih8/kec4WKu1X4DEc0yboZYgaXx+yy5E3VgNG4A/UKJqEJSnLfJWWoPgLvl8fz T4y786IypLyLIdhYtJQDPG/X7D+XYOKu9iFXUHUfQuLmX06i5T7oxC5DCvc5Sq+r40YR mhXOESQRUA0LBT2oV7O5bGFglYaDV1qF9oZabAdr74xyB/GXCgCRnLs7Xq3PsOpmisV9 g6DBuMveYPWLNpndlnnNnmVH0mdyc/NGKvne2XmGX7DmORszztAz2maAsoC5zP9qedbv JxI1P+rYl44ej3an2aLEtMTOsoE0GnOyC0EtJaeB6PwskQI0KpRWH4G17F+P1emLa30B hDVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si6965816pls.303.2019.06.09.06.12.33; Sun, 09 Jun 2019 06:12:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728659AbfFINKu (ORCPT + 99 others); Sun, 9 Jun 2019 09:10:50 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:46032 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728516AbfFINKu (ORCPT ); Sun, 9 Jun 2019 09:10:50 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R601e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0TTm7q0i_1560085846; Received: from JosephdeMacBook-Pro.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0TTm7q0i_1560085846) by smtp.aliyun-inc.com(127.0.0.1); Sun, 09 Jun 2019 21:10:46 +0800 Subject: Re: [bug report][stable] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) To: Nadav Amit Cc: "linux-kernel@vger.kernel.org" , the arch/x86 maintainers , "Peter Zijlstra (Intel)" , Ingo Molnar , Greg KH , Caspar Zhang , jiufei Xue , Sasha Levin References: <5817eaac-29cc-6331-af3b-b9d85a7c1cd7@linux.alibaba.com> From: Joseph Qi Message-ID: Date: Sun, 9 Jun 2019 21:10:45 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nadav, Thanks for the comments. I'll test the 3 patches in the mentioned thread. Thanks, Joseph On 19/6/8 00:38, Nadav Amit wrote: >> On Jun 7, 2019, at 3:24 AM, Joseph Qi wrote: >> >> Hi all, >> Any idea on this regression? > > Sorry for the late response (I assumed, for some reason, that you also follow > the second thread about this issue). > > Anyhow, it should be fixed by backporting some patches which were mistakenly > missed. > > See https://lore.kernel.org/stable/20190606131558.GJ29739@sasha-vm/ > > Regards, > Nadav > > >> Thanks, >> Joseph >> >> On 19/6/5 18:23, Joseph Qi wrote: >>> Hi, >>> >>> I have encountered a kernel BUG when running ltp ftrace-stress-test >>> on 4.19.48. >>> >>> [ 209.704855] LTP: starting ftrace-stress-test (ftrace_stress_test.sh 90) >>> [ 209.739412] Scheduler tracepoints stat_sleep, stat_iowait, stat_blocked and stat_runtime require the kernel parameter schedstats=enable or kernel.sched_schedstats=1 >>> [ 212.054506] kernel tried to execute NX-protected page - exploit attempt? (uid: 0) >>> [ 212.055595] BUG: unable to handle kernel paging request at ffffffffc0349000 >>> [ 212.056589] PGD d00c067 P4D d00c067 PUD d00e067 PMD 23673e067 PTE 800000023457f061 >>> [ 212.057759] Oops: 0011 [#1] SMP PTI >>> [ 212.058303] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 4.19.48 #112 >>> >>> After some investigation I have found that it is introduced by commit >>> 8715ce033eb3 ("x86/modules: Avoid breaking W^X while loading modules"), >>> and then revert this commit the issue is gone. >>> >>> I have also tested the same case on 5.2-rc3 as well as right at >>> upstream commit f2c65fb3221a ("x86/modules: Avoid breaking W^X while >>> loading modules"), which has been merged in 5.2-rc1, it doesn't >>> happen. >>> >>> So I don't know why only stable has this issue while upstream doesn't. >>> >>> Thanks, >>> Joseph >