Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp295748yba; Wed, 3 Apr 2019 08:54:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWwaULdGU8x7MsvnrDdfB0j3wLYXX82iXSMotu8MvngSt2BExvwYynLb+5+5sTLIhkrMs4 X-Received: by 2002:a17:902:547:: with SMTP id 65mr698693plf.242.1554306847413; Wed, 03 Apr 2019 08:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554306847; cv=none; d=google.com; s=arc-20160816; b=D6J5/PPlRX9hqffig8WQklMN9SgxDUfMXvXe/C88nKZ7FZoncNHjf215GfTRuJUE8G NzEOYy+iwbMkCLvT6sdRIsTOnQAY67PyaYeUt1IJvsSN575De1oDBY+45ICXvtLyZMUR umc5Dl24eQ+R9atRduskHeSTfmDL40cHJQ3mTDLO9fzMPcrAF56iroZcNwOJvpbJGv0q 2YtQd8atyq4IDpZg1fGOj2No4SYdCsez8YmA4v9TQidIoXkrOtqodqTWj2v9wm1r1WqU RTtyiYMu61BQ+MbLrW7XciOBWyzVNO+Mi2BZKXk9XOT+v9aWvgv8eHbylGNQRFbiiR5+ Rdiw== 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:dkim-signature; bh=uonhx/LPDDVDGNQW+H/tK8KtlZ2R4bxwlGmgw2LiaWg=; b=rdqSFY7VUKFlMNsXOxdKFvStTT0Qbaqm795UDwJfa1L/Wc0Bg6LWxj6f1UvrlmImEm HFXNUy20fhAmlQpCFJSMq9365Z83BUHtQeKMie38qtz0Vxhk/DmCrhINeQNUSgB8S12p AHJr33uPbzo66vVtnHiQfB9zDAiTipjpFk1uxku3p3xOC2cr2nMeFNdRySXoEQlLtU51 9hPAphHEnqIPh5+MY9mwyIctOqgsuEkB579UExvxe3MH9aw5if3znCmq2mwph5SWTJjp UminENE7JczeX+3Qpva50RR8vI3FswiEEEKvkE0NEoffsK+B9GIqueWQNlwimx7+4ArA sJTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=TQfs1wGf; 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 g33si10003235pgb.192.2019.04.03.08.53.51; Wed, 03 Apr 2019 08:54:07 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=TQfs1wGf; 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 S1728748AbfDCPv3 (ORCPT + 99 others); Wed, 3 Apr 2019 11:51:29 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42537 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726931AbfDCPv0 (ORCPT ); Wed, 3 Apr 2019 11:51:26 -0400 Received: by mail-pl1-f194.google.com with SMTP id cv12so8243582plb.9 for ; Wed, 03 Apr 2019 08:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uonhx/LPDDVDGNQW+H/tK8KtlZ2R4bxwlGmgw2LiaWg=; b=TQfs1wGfOLPtcaYtQZ/qhCsI6Zh64+pHvQk5JOLLhic495QORkGTgP0oF3wsqR3qCt iXyGlUmA2MrC6SxN7941HkzwuNTmkq/5qoLckc7EYjBEJyQqyN8dCgrpbZS6552xn/Qk pU4P+BbbKsFuzgT4TNxN8AmGh7Z7WIZrtHlD2lrGNCpKKMsd+i7LfRKPYC7hVkz73R1k EKsTy2Fs9H1tsOZZh+pdwMzJbCX4EaWOgL8zmIDn+WJg3LPItRPgPbjjjSXPrnFRyWP3 Ak3GqA1C3Bh1VAboyveae9mijiF7n3RMZvkfkhdUI3RlSiKkQOfJME1OxCf+OPPzbIs6 fs3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uonhx/LPDDVDGNQW+H/tK8KtlZ2R4bxwlGmgw2LiaWg=; b=ZSezOS+3VTje9zi/2gjUdmO8MrfNIzyZKavKF/8Wf+8BXWDu/IwQkhp5J8InaPbUat cPhqfOEgG8VzpsGc8Xk51/MwWwuHX9uR7UDkWs/5WlPUd4D250X2dLVn+99xXSH1tX5M r7WGfWX7z2br0JQj3vIb26M7qadKPaSRBICwTCMy5OMc7bJ9Mw4Te+4apMoH5Ya+iwIJ JjS3MJCEFP4UNyGIu4M3ipQbkQbStXemjdmQOzasMtlipof2HOnUBTXewgCZXEIgUjYt MRxi2RFAxfaJquE70/L2a4qHP2heqMOX4uiesyzjCixWgmvHd2HKd4CMksvI1tzY2Yw9 G4Gg== X-Gm-Message-State: APjAAAVVNbEYr35huvMBBGY7uD3NrtTB3c0i/Hy6/Uf/1L5u5kcX1Nm8 /j3/Az3NdKhw98KON4XBelC4xA== X-Received: by 2002:a17:902:681:: with SMTP id 1mr680253plh.31.1554306685930; Wed, 03 Apr 2019 08:51:25 -0700 (PDT) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id e4sm19098769pgd.32.2019.04.03.08.51.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 08:51:25 -0700 (PDT) Subject: Re: [PATCH 2/2] arch: add pidfd and io_uring syscalls everywhere To: Will Deacon Cc: Michael Ellerman , Arnd Bergmann , Andrew Morton , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Tony Luck , Fenghua Yu , Geert Uytterhoeven , Michal Simek , Ralf Baechle , Paul Burton , James Hogan , "James E . J . Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , Rich Felker , "David S . Miller" , Max Filippov , Firoz Khan , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org References: <20190325143521.34928-1-arnd@arndb.de> <20190325144737.703921-1-arnd@arndb.de> <87tvff24a1.fsf@concordia.ellerman.id.au> <20190403111134.GA7159@fuggles.cambridge.arm.com> <9d673dfd-0051-3676-653e-6376430d73dd@kernel.dk> <20190403151932.GA16866@fuggles.cambridge.arm.com> <032faa2f-6317-75b6-8514-076ef1a244e8@kernel.dk> <20190403154902.GB16866@fuggles.cambridge.arm.com> From: Jens Axboe Message-ID: <086cdf60-8973-02e6-191b-b818e6f12468@kernel.dk> Date: Wed, 3 Apr 2019 09:51:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190403154902.GB16866@fuggles.cambridge.arm.com> 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 On 4/3/19 9:49 AM, Will Deacon wrote: > On Wed, Apr 03, 2019 at 09:39:52AM -0600, Jens Axboe wrote: >> On 4/3/19 9:19 AM, Will Deacon wrote: >>> On Wed, Apr 03, 2019 at 07:49:26AM -0600, Jens Axboe wrote: >>>> On 4/3/19 5:11 AM, Will Deacon wrote: >>>>> will@autoplooker:~/liburing/test$ ./io_uring_register >>>>> RELIMIT_MEMLOCK: 67108864 (67108864) >>>>> [ 35.477875] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000070 >>>>> [ 35.478969] Mem abort info: >>>>> [ 35.479296] ESR = 0x96000004 >>>>> [ 35.479785] Exception class = DABT (current EL), IL = 32 bits >>>>> [ 35.480528] SET = 0, FnV = 0 >>>>> [ 35.480980] EA = 0, S1PTW = 0 >>>>> [ 35.481345] Data abort info: >>>>> [ 35.481680] ISV = 0, ISS = 0x00000004 >>>>> [ 35.482267] CM = 0, WnR = 0 >>>>> [ 35.482618] user pgtable: 4k pages, 48-bit VAs, pgdp = (____ptrval____) >>>>> [ 35.483486] [0000000000000070] pgd=0000000000000000 >>>>> [ 35.484041] Internal error: Oops: 96000004 [#1] PREEMPT SMP >>>>> [ 35.484788] Modules linked in: >>>>> [ 35.485311] CPU: 113 PID: 3973 Comm: io_uring_regist Not tainted 5.1.0-rc3-00012-g40b114779944 #1 >>>>> [ 35.486712] Hardware name: linux,dummy-virt (DT) >>>>> [ 35.487450] pstate: 20400005 (nzCv daif +PAN -UAO) >>>>> [ 35.488228] pc : link_pwq+0x10/0x60 >>>>> [ 35.488794] lr : apply_wqattrs_commit+0xe0/0x118 >>>>> [ 35.489550] sp : ffff000017e2bbc0 >>>> >>>> Huh, this looks odd, it's crashing inside the wq setup. >>> >>> Enabling KASAN seems to indicate a double-free, which may well be related. >> >> Does this help? > > Yes, thanks for the quick patch. Feel free to add: > > Reported-by: Will Deacon > Tested-by: Will Deacon > > if you spin a proper patch. Great, thanks for reporting/testing. -- Jens Axboe