Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp359747pxu; Wed, 7 Oct 2020 05:12:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydvkXi4zM5smRMYJqGJc2I+/7PqHZK1Y6Qqc2HRwA3uQvYWDQvdS8sKORX62OeLlOpzAyy X-Received: by 2002:a17:906:4cc7:: with SMTP id q7mr3050984ejt.437.1602072748074; Wed, 07 Oct 2020 05:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602072748; cv=none; d=google.com; s=arc-20160816; b=zN4ljoEbIKvA+5LUvDlz5DPUi3nxjlwAlTfDJJYmOkCMjN5Ncmr70fjH5iFU0ZX0mG 3UAZehzx/U1vk5jW37ctxCUp/2wE76X+0GmX5UN3JaYsH0g01aos51o8LTHtWOLqaOBa fUVT1FY1pxOBRurgG9CJ9W5eiTxz7IH2ljaa771eHH7OP6rIm64oSc+WLMV8Ac+y/fx+ rJH9mAor7SQwQCYbhzO+qvG8//EIWz8BG2pg0N0OfSRMoA3fAjICcRPo1L4cXbFwX36m vjKh4VvbDalWoM9+RjkVoFevsxC28+wBAegVA0cZJfbM8zNSOlrsoeK/n1htiHF5bcGQ RJJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=+3SnTg0+Tz+IauzN1r7hHhljC5k2snRN3dEYbYQmFEc=; b=M+lcpqqeyS4Hg1pscHom92m7l5GZgYfatUkZ22GHUBaKvFCitNOk8gnIn6/4IAJOrQ 8j1zTGheXl/95XFdOYUjcHtOGe0M0WHgoR8Yxp/fTS+A3nqbITf5KnaIhnHaS+8EJUHT Y+lEiO50KARjisdvlDYy3SEQsWoyVwb6EHgP75QGw97zGRz62tqrBjT1NX6+eCmadlED 7kMmnxNk50IKT3g5SlBNc8bZS9ovhYQc5JIuSBPfq0XjGzeB+s+xiOwBvWZmiY1/4Yd6 qDon6ehch4fKSOepEEO6h7sgaqvC3AWmMAc1BFhIoljXYxBBlK78ocoEN4wv58mstO2e owgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=APDtPc9i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s6si1249087edy.491.2020.10.07.05.12.04; Wed, 07 Oct 2020 05:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=APDtPc9i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbgJGMJa (ORCPT + 99 others); Wed, 7 Oct 2020 08:09:30 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:5658 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728008AbgJGMJ3 (ORCPT ); Wed, 7 Oct 2020 08:09:29 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 097C1KWl189060; Wed, 7 Oct 2020 08:09:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=+3SnTg0+Tz+IauzN1r7hHhljC5k2snRN3dEYbYQmFEc=; b=APDtPc9iDqpvdMqQsbASDgmx+nYnPFh8tqQFmAJ7uG6LFqMkG2m1lLQLBJwYwJhAbtQl m2A+LpfDUh6GXKb2KRB2bW3RcgcqibcECixqM0/RVO/eoF5OsKHFkCIeQxuLExLmj7IK b/GMA4BjJf9rglZ2o0vaAPkqznbPLzrBTtMxRI8eDlxjdpqc6MADG2Qt/AXDGHNa23Hd jXVeSYAzkvRifG50+k+MXj9W0iXemh85Gy1yQlq41RIPXeh7toFZCP1SVgPczbUHQiXd 12KgSqmDX7Yj6mU8uaHD6IcqF2B6qBzu2xqJ6HSeKfV5ttbDVqdkMBiu9i9JpCowStks ew== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 341d1c0xaw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Oct 2020 08:09:24 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 097C7M2G029732; Wed, 7 Oct 2020 12:09:22 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 33xgx848g1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Oct 2020 12:09:22 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 097C9JdH28705254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Oct 2020 12:09:19 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AD2B452050; Wed, 7 Oct 2020 12:09:19 +0000 (GMT) Received: from oc7455500831.ibm.com (unknown [9.145.175.219]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 40C9C5204E; Wed, 7 Oct 2020 12:09:19 +0000 (GMT) Subject: Re: [PATCH v4 2/2] s390/dasd: remove ioctl_by_bdev calls To: Christoph Hellwig Cc: Stefan Haberland , axboe@kernel.dk, hoeppner@linux.ibm.com, linux-s390@vger.kernel.org, heiko.carstens@de.ibm.com, gor@linux.ibm.com, linux-kernel@vger.kernel.org References: <20200519142259.102279-1-sth@linux.ibm.com> <20200519142259.102279-3-sth@linux.ibm.com> <5c815b8a-7d77-5c69-9191-d09cc433f5ff@de.ibm.com> <20201007103936.GA24327@lst.de> <20201007120005.GA29788@lst.de> From: Christian Borntraeger Autocrypt: addr=borntraeger@de.ibm.com; prefer-encrypt=mutual; keydata= xsFNBE6cPPgBEAC2VpALY0UJjGmgAmavkL/iAdqul2/F9ONz42K6NrwmT+SI9CylKHIX+fdf J34pLNJDmDVEdeb+brtpwC9JEZOLVE0nb+SR83CsAINJYKG3V1b3Kfs0hydseYKsBYqJTN2j CmUXDYq9J7uOyQQ7TNVoQejmpp5ifR4EzwIFfmYDekxRVZDJygD0wL/EzUr8Je3/j548NLyL 4Uhv6CIPf3TY3/aLVKXdxz/ntbLgMcfZsDoHgDk3lY3r1iwbWwEM2+eYRdSZaR4VD+JRD7p8 0FBadNwWnBce1fmQp3EklodGi5y7TNZ/CKdJ+jRPAAnw7SINhSd7PhJMruDAJaUlbYaIm23A +82g+IGe4z9tRGQ9TAflezVMhT5J3ccu6cpIjjvwDlbxucSmtVi5VtPAMTLmfjYp7VY2Tgr+ T92v7+V96jAfE3Zy2nq52e8RDdUo/F6faxcumdl+aLhhKLXgrozpoe2nL0Nyc2uqFjkjwXXI OBQiaqGeWtxeKJP+O8MIpjyGuHUGzvjNx5S/592TQO3phpT5IFWfMgb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4TPBDNx7YhahSUlexfoftltJA8swRshNA/M90/ i9zDo9ySSZHwsGxG06ZOH5/MzG6HpLja7g8NTgA0TD5YaFm/oOnsQVsf2DeAGPS2xNirmknD jaqYefx7yQ7FJXXETd2uVURiDeNEFhVZWb5CiBJM5c6qQMhmkS4VyT7/+raaEGgkEKEgHOWf ZDP8BHfXtszHqI3Fo1F4IKFo/AP8GOFFxMRgbvlAs8z/+rEEaQYjxYJqj08raw6P4LFBqozr nS4h0HDFPrrp1C2EMVYIQrMokWvlFZbCpsdYbBI= Message-ID: Date: Wed, 7 Oct 2020 14:09:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201007120005.GA29788@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-07_08:2020-10-06,2020-10-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010070079 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07.10.20 14:00, Christoph Hellwig wrote: > On Wed, Oct 07, 2020 at 12:44:55PM +0200, Christian Borntraeger wrote: >> >> >> On 07.10.20 12:39, Christoph Hellwig wrote: >>> On Wed, Oct 07, 2020 at 11:34:17AM +0200, Christian Borntraeger wrote: >>>> >>>> On 19.05.20 16:22, Stefan Haberland wrote: >>>>> The IBM partition parser requires device type specific information only >>>>> available to the DASD driver to correctly register partitions. The >>>>> current approach of using ioctl_by_bdev with a fake user space pointer >>>>> is discouraged. >>>>> >>>>> Fix this by replacing IOCTL calls with direct in-kernel function calls. >>>>> >>>>> Suggested-by: Christoph Hellwig >>>>> Signed-off-by: Stefan Haberland >>>>> Reviewed-by: Jan Hoeppner >>>>> Reviewed-by: Peter Oberparleiter >>>> >>>> FWIW, this broken the ibm-partition code for virtio-blk, when CONFIG_DASD=m. >>> >>> What are the symptoms? >> >> During boot I normally have > >> [ 0.930231] virtio_blk virtio1: [vda] 5409180 4096-byte logical blocks (22.2 GB/20.6 GiB) >> [ 0.930233] vda: detected capacity change from 0 to 22156001280 >> [ 0.932806] vda:VOL1/ 0X3333: vda1 vda2 vda3 >> >> With this change, the last line is no longer there (if CONFIG_DASD=m) and this also >> reflects itself in /proc/partitions. The partitions are no longer detected. > > Can you try this patch? > > diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c > index d6e18df9c53c6d..d91cee558ce67a 100644 > --- a/block/partitions/ibm.c > +++ b/block/partitions/ibm.c > @@ -305,8 +305,6 @@ int ibm_partition(struct parsed_partitions *state) > if (!disk->fops->getgeo) > goto out_exit; > fn = symbol_get(dasd_biodasdinfo); > - if (!fn) > - goto out_exit; > blocksize = bdev_logical_block_size(bdev); > if (blocksize <= 0) > goto out_symbol; > @@ -326,7 +324,7 @@ int ibm_partition(struct parsed_partitions *state) > geo->start = get_start_sect(bdev); > if (disk->fops->getgeo(bdev, geo)) > goto out_freeall; > - if (fn(disk, info)) { > + if (!fn || fn(disk, info)) { > kfree(info); > info = NULL; > } > Unfortunately not. On insmodding virtio_blk I do get: [ 3.331256] vda: detected capacity change from 0 to 22156001280 [ 3.332381] ------------[ cut here ]------------ [ 3.332382] kernel BUG at kernel/module.c:1081! [ 3.332420] monitor event: 0040 ilc:2 [#1] SMP [ 3.332422] Modules linked in: virtio_blk(+) kvm [ 3.332425] CPU: 0 PID: 136 Comm: insmod Not tainted 5.8.13+ #54 [ 3.332425] Hardware name: IBM 3906 M04 704 (KVM/Linux) [ 3.332426] Krnl PSW : 0704c00180000000 0000000016cf4fc6 (__symbol_put+0x56/0x58) [ 3.332434] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 [ 3.332435] Krnl GPRS: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 3.332436] 0000000000000000 0000000000000018 0000000000000000 0000000000000098 [ 3.332437] 0000000000000000 0000000000000001 0000000000000000 0000000004fd9180 [ 3.332438] 000000001f70c000 0000000004fd9360 0000000016cf4fa2 000003e0000f7648 [ 3.332445] Krnl Code: 0000000016cf4fb8: f0a8000407fe srp 4(11,%r0),2046,8 [ 3.332445] 0000000016cf4fbe: 47000700 bc 0,1792 [ 3.332445] #0000000016cf4fc2: af000000 mc 0,0 [ 3.332445] >0000000016cf4fc6: 0707 bcr 0,%r7 [ 3.332445] 0000000016cf4fc8: c00400000000 brcl 0,0000000016cf4fc8 [ 3.332445] 0000000016cf4fce: eb6ff0480024 stmg %r6,%r15,72(%r15) [ 3.332445] 0000000016cf4fd4: b90400ef lgr %r14,%r15 [ 3.332445] 0000000016cf4fd8: b90400b4 lgr %r11,%r4 [ 3.332454] Call Trace: [ 3.332456] [<0000000016cf4fc6>] __symbol_put+0x56/0x58 [ 3.332458] ([<0000000016cf4fa2>] __symbol_put+0x32/0x58) [ 3.332462] [<00000000171be268>] ibm_partition+0xa0/0xa28 [ 3.332464] [<00000000171b952c>] blk_add_partitions+0x184/0x5b8 [ 3.332467] [<0000000016f07e94>] bdev_disk_changed+0x8c/0x120 [ 3.332468] [<0000000016f09872>] __blkdev_get+0x3fa/0x598 [ 3.332469] [<0000000016f09a42>] blkdev_get+0x32/0x1c8 [ 3.332471] [<00000000171b5ee4>] __device_add_disk+0x32c/0x510 [ 3.332473] [<000003ff80068de0>] virtblk_probe+0x5f0/0xc30 [virtio_blk] [ 3.332477] [<00000000172cc110>] virtio_dev_probe+0x178/0x2a0 [ 3.332480] [<000000001731cecc>] really_probe+0xf4/0x498 [ 3.332481] [<000000001731da1a>] device_driver_attach+0xd2/0xd8 [ 3.332482] [<000000001731dad8>] __driver_attach+0xb8/0x180 [ 3.332483] [<000000001731a1e2>] bus_for_each_dev+0x82/0xb8 [ 3.332484] [<000000001731bf66>] bus_add_driver+0x1fe/0x248 [ 3.332486] [<000000001731e340>] driver_register+0xa0/0x168 [ 3.332487] [<000003ff8006e068>] init+0x68/0x1000 [virtio_blk] [ 3.332489] [<0000000016bfc884>] do_one_initcall+0x3c/0x1f8 [ 3.332490] [<0000000016cf6c98>] do_init_module+0x68/0x290 [ 3.332491] [<0000000016cf9eec>] __do_sys_finit_module+0xa4/0xe8 [ 3.332494] [<000000001766c760>] system_call+0xdc/0x2b0 [ 3.332495] Last Breaking-Event-Address: [ 3.332496] [<0000000016cf4fa6>] __symbol_put+0x36/0x58 [ 3.332498] ---[ end trace 4a4a7a5643aab422 ]---