Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp779076imm; Tue, 5 Jun 2018 04:28:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKrCsrdM6J8YMMJ6QMCS2+F9U79fUplRj+OBmfDRs7VQAWaLoU5m6OI0P2ogvIaYk6W0IaH X-Received: by 2002:a62:701:: with SMTP id b1-v6mr14418644pfd.252.1528198099149; Tue, 05 Jun 2018 04:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528198099; cv=none; d=google.com; s=arc-20160816; b=GPHBjiAMwnHuYMXw5fF84lvjMIOfrjw3O1Fip6bU7tyT3QVmUfR/+JvSus46c0GXO4 GZM4A53jM1ZSDX15Rcb6duVvrdbJRTrVHLbaKnhNhZ7+PH0EKc0SKPSSv6YCMOhpnkxZ q9KUpkahF5g5bpnc7QUAlBvYNe+gQEcZWbuT59k+SP7AY7Elk2FBXqU2uuvTm2D7jY1W rhP8d9iE4UiTO7xaJIjD9WnQBwZcoEzbPBpIxSz3mnHLroUVFUUqsz+oQD4rzkw8bjpL N1Crs4EObWlRC8Z/YtZfFqcSsgwI5CbxgLLF3oxaYYlvQPwJ3sSJVXf1M0wprQv1KJOY dJtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:date:message-id :subject:cc:from:to:arc-authentication-results; bh=YxTI3Wr4m8hOlKUwpEtjVNsHyO+Rffl6dSTvFEb7KbM=; b=nqnXFqV0CgQeB+BDrBWHIGCZ05YlfoA0SPnfsiKRfTvXt2JYesaRt8Tt2TJMXjBJYY 2CYzceZm6S8ee9fa0OExaCJkjfii2ZDqKYCKArjOg/9qyB4rAuywxEP6DPMfTuoj7Ky3 gUqHqi/Ij0s00OGHeV4iX6hXyLSTesQnr7NwAgOiQ3YokxejEuXLvPsvGMC7jZpXdxJX VIQPDuz3/NHlh3oTyzM/SHQR6RkJ+JS6fkI8nVMEBGcCKrjbIt8knXb3AaRaWHcFeA2C K1B5fPUhExFpofllOIHOapSzUmCm8ivQ3cky/2GuDapvRaoUCWR2TNHfO9kzzMQFFusv dR1Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16-v6si10306226pli.201.2018.06.05.04.28.04; Tue, 05 Jun 2018 04:28:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbeFEL1L (ORCPT + 99 others); Tue, 5 Jun 2018 07:27:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57484 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751748AbeFEL1K (ORCPT ); Tue, 5 Jun 2018 07:27:10 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C35704670D862; Tue, 5 Jun 2018 19:27:05 +0800 (CST) Received: from [127.0.0.1] (10.177.23.164) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.382.0; Tue, 5 Jun 2018 19:26:58 +0800 To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86l , Dominik Brodowski , Andy Lutomirski , linux-kernel From: "Leizhen (ThunderTown)" CC: Subject: [Question] Can we use SIGRTMIN when vdso disabled on X86? Message-ID: <5B1672FE.4050705@huawei.com> Date: Tue, 5 Jun 2018 19:24:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060806090701040900040200" X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --------------060806090701040900040200 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit After I executed "echo 0 > /proc/sys/abi/vsyscall32" to disable vdso, the rt_sigaction01 test case from ltp_2015 failed. The test case source code please refer to the attachment, and the output as blow: ----------------- ./rt_sigaction01 rt_sigaction01 0 TINFO : signal: 34 rt_sigaction01 1 TPASS : rt_sigaction call succeeded: result = 0 rt_sigaction01 0 TINFO : sa.sa_flags = SA_RESETHAND|SA_SIGINFO rt_sigaction01 0 TINFO : Signal Handler Called with signal number 34 Segmentation fault ------------------ Is this the desired result? In function ia32_setup_rt_frame, I found below code: if (ksig->ka.sa.sa_flags & SA_RESTORER) restorer = ksig->ka.sa.sa_restorer; else restorer = current->mm->context.vdso + vdso_image_32.sym___kernel_rt_sigreturn; put_user_ex(ptr_to_compat(restorer), &frame->pretcode); Because the vdso is disabled, so current->mm->context.vdso is NULL, which cause the result of frame->pretcode invalid. I'm not sure whether this is a kernel bug or just an error of test case itself. Can anyone help me? -- Thanks! BestRegards --------------060806090701040900040200 Content-Type: text/plain; charset="UTF-8"; name="rt_sigaction01.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="rt_sigaction01.c" LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKi8KLyogQ29weXJpZ2h0IChjKSBDcmFja2VyamFj ayBQcm9qZWN0LiwgMjAwNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8K LyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKi8KLyogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29m dHdhcmU7ICB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAgICAgKi8K LyogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5z ZSBhcyBwdWJsaXNoZWQgYnkgICAgICAgKi8KLyogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRh dGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgICAgICAgICAgKi8K LyogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKi8KLyogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8K LyogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2ls bCBiZSB1c2VmdWwsICAgICAgICAgICAgKi8KLyogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZ OyAgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAgICAgKi8K LyogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NF LiAgU2VlICAgICAgICAgICAgICAgICAgKi8KLyogdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBM aWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8K LyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKi8KLyogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVk IGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAgICAgICAgKi8K LyogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07ICBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVl IFNvZnR3YXJlIEZvdW5kYXRpb24sICAgKi8KLyogSW5jLiwgNTEgRnJhbmtsaW4gU3RyZWV0 LCBGaWZ0aCBGbG9vciwgQm9zdG9uLCBNQSAwMjExMC0xMzAxIFVTQSAgICAgICAgICAgKi8K LyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKi8KLyogSGlzdG9yeTogICAgIFBvcnRpbmcgZnJv bSBDcmFja2VyamFjayB0byBMVFAgaXMgZG9uZSBieSAgICAgICAgICAgICAgICAgICAgKi8K LyogICAgICAgICAgICAgIE1hbmFzIEt1bWFyIE5heWFrIG1ha25heWFrQGluLmlibS5jb20+ ICAgICAgICAgICAgICAgICAgICAgICAgKi8KLyoqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8K Ci8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKiovCi8qIERlc2NyaXB0aW9uOiBUaGlzIHRlc3Rz IHRoZSBydF9zaWdhY3Rpb24oKSBzeXNjYWxsICAgICAgICAgICAgICAgICAgICAgICAgICov Ci8qCQlydF9zaWdhY3Rpb24gYWx0ZXJzIGFuIGFjdGlvbiB0YWtlbiBieSBhIHByb2Nlc3Mg b24gcmVjZWlwdCAgICovCi8qIAkJb2YgYSBwYXJ0aWN1bGFyIHNpZ25hbC4gVGhlIGFjdGlv biBpcyBzcGVjaWZpZWQgYnkgdGhlICAgICAgICAqLwovKgkJc2lnYWN0aW9uIHN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