Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp3030393ybj; Mon, 23 Sep 2019 13:32:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxR0buKZvgWA2kACbaryB5wZpEQ7GCjf1864J/DVz1Z4As/sgdUf19rJO4j/xDSuJVvF+im X-Received: by 2002:a50:9eac:: with SMTP id a41mr2100425edf.193.1569270737556; Mon, 23 Sep 2019 13:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569270737; cv=none; d=google.com; s=arc-20160816; b=SKzKhSW4cQBFIXdwic4r83cVqZVxRhdvD3tVwxxH1s1YqZcfnSK6r2B6cAkel0AThM Wzln4y1vm1Y0Ux255MXjDAT9VGb+KTLnZkKLUfTdB4snVt63mPyggGAEIriZkWpiQM2b MuACwTlxj0SmomTn7UmBoh+m6vl3Jhc7EPGy+q51ZTa7qacjjoZJJcW13C5pDznHI7xo UXPQ5tjuyFYHAPh0YeUqkDAVL4S3n3snAI1FI5pdXkXL09eIUg+O1XccSqPyggqa2EbG pazG2Kigt91XWi0C1EMjrnOMkk4ifm6Ofcah+Drqem87EGsXcPaBDeIVUmFNnZWQEkNB DQ3A== 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=Gf7uhtrxwA+TGvnG6ufNzGHfcIi4yCM6Z7wiGCDtED0=; b=oUvx+SftCeQskYTEB2Y27pWSaNvygowophJYtdaZZnZDXk+UktSl/41D4kDk/pK7+n h0rU6O309lzHsUYPMmf497LGxgYNLtHSrbhO/SWlffzQNwiHJG9RFMJyvIKLo6iTQmej 2GTWMicOhGyihmBneGZQp/+EI5QXF5jdCLHECAa4/gqIJ9MkY71EuJYIEowF61ddbE4q Dhf0h7D/2FAMQP3lWrlesmPr076SV6/6M4V49s5IQbEEQ35vbh+A8R7P3gc0NnUnVLtd D5+h3hBcXP4ZdztBEuqYCbjnm3KFEWdH6TGdrQn0DDaIUo5a4G4k/c4VmwlrMB7G9wiG AW3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=NI41CE4n; 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 oa24si5496710ejb.41.2019.09.23.13.31.52; Mon, 23 Sep 2019 13:32:17 -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=NI41CE4n; 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 S2387544AbfIVQAt (ORCPT + 99 others); Sun, 22 Sep 2019 12:00:49 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37818 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387489AbfIVQAs (ORCPT ); Sun, 22 Sep 2019 12:00:48 -0400 Received: by mail-pl1-f194.google.com with SMTP id u20so1098217plq.4 for ; Sun, 22 Sep 2019 09:00:46 -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=Gf7uhtrxwA+TGvnG6ufNzGHfcIi4yCM6Z7wiGCDtED0=; b=NI41CE4niZ8cchnf9WiePla4Ks7g/6RMmObisw2qvK6GmoZh9C53mlSMH4esLzm5Gy RBC76w3sGOzN3DrgC+8+1Uk/OjgQsfJ8yFO7qcuVqht9W9mhJrv3gKHUQxtupQJDnyqk JOMlTzwhKRUzpUzg2eZ89D+FZuJ1zqe2x7zojau/B1ETW5oTK0qrfjk29jdhY1p9f0CJ Zz6xzz6icrdoy/ICmMTYCTQkrMrLMeMM0sWVsOUFjPuub4jkJPHbb16sDEMFoX89a9v4 Fvrhie98gGNmBbi3rr3ZVdfGD/qMZXt4Bn+XDvCBMbx8V0U0FU8OTW1nwIGDztMclpRz lJuQ== 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=Gf7uhtrxwA+TGvnG6ufNzGHfcIi4yCM6Z7wiGCDtED0=; b=s9WqfdiNpZM1KQ4AymzYG01Qy6H3f+RlPr9G8zRF8WtdCxnqQXOkqQH3vzPtHi6zr9 wEFgY/ACFLDXzNaXCQsWwUwV/SZMCeKGsnBvlGKOiwQoz9DR/HcIzeWUFGzvbtdXpQC4 Xwaw/aXXYUt+tmLALpq+254zQYEXRAFpgnPrlH/ffoA17OAa3TwHPHg+x0NHKl2VBVGS 3bsvemHYYldtb4tP3WFcNOOD1FCt1tuAvUzvkvvRu67a5xlXbNfuUQBfMT9XR4hB9tX5 OKFj7sNojbhXGZ3yHotiVLxww/v/L0e0tFjUZQ+F5tFioQKAxCOa4jmEVLmPCYnPtoaN lCOw== X-Gm-Message-State: APjAAAVKAptUv/OTuBCy45KX3ZRq2CMee1sUEu9NHWman0SBZHf2PJyv dQwFUZ/DUyS5J7rWqh6Zo9nE9h3PmovR+g== X-Received: by 2002:a17:902:9349:: with SMTP id g9mr1779062plp.71.1569168045882; Sun, 22 Sep 2019 09:00:45 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.79]) by smtp.gmail.com with ESMTPSA id u17sm7862001pjn.7.2019.09.22.09.00.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Sep 2019 09:00:44 -0700 (PDT) Subject: Re: [sparc64] pktcdvd: setup of pktcdvd device failed To: Anatoly Pugachev Cc: linux-block@vger.kernel.org, Sparc kernel list , Linux Kernel list References: From: Jens Axboe Message-ID: <5aee70a7-3a2a-d6db-80c6-7d9b9cad8234@kernel.dk> Date: Sun, 22 Sep 2019 10:00:42 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.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 On 9/22/19 2:37 AM, Anatoly Pugachev wrote: > On Fri, Sep 20, 2019 at 4:01 PM Jens Axboe wrote: >> >> On 9/20/19 4:27 AM, Anatoly Pugachev wrote: >>> Hello! >>> >>> Getting the following call trace on boot on sparc64 ldom/machine with >>> current git kernel: >>> >>> ... >>> [ 13.352975] aes_sparc64: Using sparc64 aes opcodes optimized AES >>> implementation >>> [ 13.428002] ------------[ cut here ]------------ >>> [ 13.428081] WARNING: CPU: 21 PID: 586 at >>> drivers/block/pktcdvd.c:2597 pkt_setup_dev+0x2e4/0x5a0 [pktcdvd] >>> [ 13.428147] Attempt to register a non-SCSI queue >>> [ 13.428184] Modules linked in: pktcdvd libdes cdrom aes_sparc64 >>> n2_rng md5_sparc64 sha512_sparc64 rng_core sha256_sparc64 flash >>> sha1_sparc64 ip_tables x_tables ipv6 crc_ccitt nf_defrag_ipv6 autofs4 >>> ext4 crc16 mbcache jbd2 raid10 raid456 async_raid6_recov async_memcpy >>> async_pq async_xor xor async_tx raid6_pq raid1 raid0 multipath linear >>> md_mod crc32c_sparc64 >>> [ 13.428452] CPU: 21 PID: 586 Comm: pktsetup Not tainted >>> 5.3.0-10169-g574cc4539762 #1234 >>> [ 13.428507] Call Trace: >>> [ 13.428542] [00000000004635c0] __warn+0xc0/0x100 >>> [ 13.428582] [0000000000463634] warn_slowpath_fmt+0x34/0x60 >>> [ 13.428626] [000000001045b244] pkt_setup_dev+0x2e4/0x5a0 [pktcdvd] >>> [ 13.428674] [000000001045ccf4] pkt_ctl_ioctl+0x94/0x220 [pktcdvd] >>> [ 13.428724] [00000000006b95c8] do_vfs_ioctl+0x628/0x6e0 >>> [ 13.428764] [00000000006b96c8] ksys_ioctl+0x48/0x80 >>> [ 13.428803] [00000000006b9714] sys_ioctl+0x14/0x40 >>> [ 13.428847] [0000000000406294] linux_sparc_syscall+0x34/0x44 >>> [ 13.428890] irq event stamp: 4181 >>> [ 13.428924] hardirqs last enabled at (4189): [<00000000004e0a74>] >>> console_unlock+0x634/0x6c0 >>> [ 13.428984] hardirqs last disabled at (4196): [<00000000004e0540>] >>> console_unlock+0x100/0x6c0 >>> [ 13.429048] softirqs last enabled at (3978): [<0000000000b2e2d8>] >>> __do_softirq+0x498/0x520 >>> [ 13.429110] softirqs last disabled at (3967): [<000000000042cfb4>] >>> do_softirq_own_stack+0x34/0x60 >>> [ 13.429172] ---[ end trace 2220ca468f32967d ]--- >>> [ 13.430018] pktcdvd: setup of pktcdvd device failed >>> [ 13.455589] des_sparc64: Using sparc64 des opcodes optimized DES >>> implementation >>> [ 13.515334] camellia_sparc64: Using sparc64 camellia opcodes >>> optimized CAMELLIA implementation >>> [ 13.522856] pktcdvd: setup of pktcdvd device failed >>> [ 13.529327] pktcdvd: setup of pktcdvd device failed >>> [ 13.532932] pktcdvd: setup of pktcdvd device failed >>> [ 13.536165] pktcdvd: setup of pktcdvd device failed >>> [ 13.539372] pktcdvd: setup of pktcdvd device failed >>> [ 13.542834] pktcdvd: setup of pktcdvd device failed >>> [ 13.546536] pktcdvd: setup of pktcdvd device failed >>> [ 15.431071] XFS (dm-0): Mounting V5 Filesystem >> >> Someone is running pktsetup to set up a device, at boot time. The device >> being passed in doesn't support pass-through commands. >> >> I believe there are two questions here: >> >> 1) Why is pktsetup being called? I don't expect anyone to use pktcdvd >> anymore. >> >> 2) Given #1, what kind of device is being passed in? >> >> Do you have some ancient funky init scripts? > > Jens, > > this is debian unstable (sid) sparc64 LDOM (read sparc virtual > machine) installation, nothing funky is done, > except of install of udftools (contains /usr/sbin/pktsetup) and was > installed for udf_test/mkudffs test/check for grub.git). > > udftools package installs /lib/udev/rules.d/80-pktsetup.rules with a content: > > # cat /lib/udev/rules.d/80-pktsetup.rules > # Create and remove packet writing device for each optical block device > ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="1", > RUN+="/usr/sbin/pktsetup %E{MAJOR}:%E{MINOR}" > ACTION=="remove", SUBSYSTEM=="block", ENV{ID_CDROM}=="1", > RUN+="/usr/sbin/pktsetup -d %E{MAJOR}:%E{MINOR}" > > as well (unpacked) initrd has some udev hooks: > > unpacked_initrd# find . -type f | xargs egrep "pkt(setup|cdvd)" > ./usr/lib/udev/rules.d/50-udev-default.rules:KERNEL=="pktcdvd[0-9]*", > GROUP="cdrom" > ./usr/lib/udev/rules.d/50-udev-default.rules:KERNEL=="pktcdvd", GROUP="cdrom" > ./usr/lib/modules/5.3.0-10169-g574cc4539762/modules.order:kernel/drivers/block/pktcdvd.ko > > I believe (which counts as number of message "setup of pktcdvd device > failed" appears in dmesg) pktsetup tries to setup /dev/vdiskd* > devices, which is virtual cdrom attached with iso file: > > # lsblk -if -o NAME,FSTYPE,LABEL,RM > NAME FSTYPE LABEL RM > vdiska ext3 0 > |-vdiska1 ext3 0 > |-vdiska2 ext4 0 > |-vdiska3 0 > `-vdiska4 swap swapvol1 0 > vdiskb 0 > `-vdiskb1 xfs 0 > vdiskc LVM2_member 0 > `-ttipvg1-vol1 xfs 0 > vdiskd iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd1 iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd2 iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd3 iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd4 iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd5 iso9660 Debian 9.0 sparc64 n 1 > |-vdiskd6 iso9660 Debian 9.0 sparc64 n 1 > `-vdiskd7 iso9660 Debian 9.0 sparc64 n 1 > vdiske 0 > |-vdiske1 ext3 0 > |-vdiske2 0 > `-vdiske3 0 > > > PS: since it's debian unstable system, it has pretty fresh userspace > and my recently compiled git kernel (as well current debian unstable > kernel is 5.2.x already) If I were debian, I'd just got rid of that. Nobody wants packet devices setup by default, or maybe the one guy that still uses it would like to, but pointless to waste resources on that for everyone. Outside of that, we should just kill the warning. We handle the situation, and there's little reason to warn about it. diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 024060165afa..76457003f140 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -2594,7 +2594,6 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) if (ret) return ret; if (!blk_queue_scsi_passthrough(bdev_get_queue(bdev))) { - WARN_ONCE(true, "Attempt to register a non-SCSI queue\n"); blkdev_put(bdev, FMODE_READ | FMODE_NDELAY); return -EINVAL; } -- Jens Axboe