Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5011896ybv; Wed, 26 Feb 2020 06:58:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzGsnjTOXPhuKXQSj1KaJPrZDeA2FqqmiEe/Ndecmzbqm6H9sUJvDk2IU5KgzNYLsiGamFR X-Received: by 2002:a54:448b:: with SMTP id v11mr3348139oiv.74.1582729082635; Wed, 26 Feb 2020 06:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582729082; cv=none; d=google.com; s=arc-20160816; b=VRK3Bv2cD5fxMxdUzFbetWfEyM37xMp3ucxnt1Sxs9ike4dE5R5TUlWMRVE7nfNI9F p3xFoI96E01FhPvl7M92gwWufUZ9+kbYyDCwuncZWJgIlhit8aHICQ8Qi0a7+5xyFo7T jbYgnAMP5lcbD0idWTK/uILf2C0H44pCKe+fwQPIOHoXNqy7C9m2uXKtfwEUZB5PhUwQ SdE9PjyWi1MTqGbptOZ7Mp41tGnf5odJGpVEgQNkHX+LkNkO+kH3PWNhDLpS4HfDFh13 pg2o83xjUuJ+eKB/M4S2o/EXPu7/0iSs4UXewBexsiIdfg62mP+XiWgr6cNl26WBjy1N /Gxg== 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:reply-to; bh=y5oMwPaakQ4byqYR1EE4YZx03bbdPGVSudGIZV+dLHM=; b=RNT2wDaWFX7F+saAmz0plAxIvpCSYlYgyk+7aDgQv/OPwL7mWoszVSRQKNjodkreCk WRRpO04EhD2MpgTUAdwWJ21WaHWlQIIqNCplXvQg9x09v5bo+e3rxzlzRCjJIDqqDzRh 6NdVACtol1dtQoho9o1ENvOX1nvEBKyxIEA5oI14A7nThq2zn+RnSZLdrCuo7k6Xfw6g eBBccXheu1l1Uei3FvHjnZpLmaoqLfTE1F6fbCq1fa2oJDfv79zE+qQiwt2QyjCPkOWU q0/lGv2g7qI0NJ+xbRW+fiE7wnSkTSPUMCKTdIdaLKhcNREvqefxOVJb4JQkRsQmqdV7 in7Q== 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 13si1385227oiy.28.2020.02.26.06.57.49; Wed, 26 Feb 2020 06:58:02 -0800 (PST) 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 S1727031AbgBZO5X (ORCPT + 99 others); Wed, 26 Feb 2020 09:57:23 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51038 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbgBZO5X (ORCPT ); Wed, 26 Feb 2020 09:57:23 -0500 Received: by mail-wm1-f67.google.com with SMTP id a5so3431877wmb.0; Wed, 26 Feb 2020 06:57:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=y5oMwPaakQ4byqYR1EE4YZx03bbdPGVSudGIZV+dLHM=; b=AXdSfiie2R/zADL+0qvNISUUG3duokeIBD9ti/vnrXJ9irbc/MJPCYXHElNdrZJu5H fPqznG6AmufCRREtVGDR97KQSE8v9srVAkc6m9KXPGJZvdl0DeHRMlkR02Io/f0pkNUh YXKRfvzRCwg2f/XvuwOy9kyRPmc9G5tIrK5ifC0cy1AfiHjp2MdRbsowSnl3LIjVCEG9 yC8iWTfnTKTnH3zhnxzmfHoEVqGZQsXy6u6NJiFuFx+UCEZxol8sOuXddpv757cuHJt5 J20A9E0PbDrOJYIwz+Zts0vCdZ+ewAWMCCNdKcGm3fglKDQIm7JeiERlxOf279r0sUMj tCXg== X-Gm-Message-State: APjAAAXb9WAZkM9rUjqUaJTCVBvBLan5aPOe5V9ZXYvi1AjeV8xprtw0 h1W5YuoZJvKeJ7RZk9Pv1h8J0ZFk X-Received: by 2002:a1c:720a:: with SMTP id n10mr5984028wmc.103.1582729041485; Wed, 26 Feb 2020 06:57:21 -0800 (PST) Received: from [10.10.2.174] (winnie.ispras.ru. [83.149.199.91]) by smtp.gmail.com with ESMTPSA id w1sm3240417wmc.11.2020.02.26.06.57.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Feb 2020 06:57:20 -0800 (PST) Reply-To: efremov@linux.com Subject: Re: [PATCH 00/10] floppy driver cleanups (deobfuscation) To: Willy Tarreau Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Linus Torvalds References: <20200224212352.8640-1-w@1wt.eu> From: Denis Efremov Message-ID: <0f5effb1-b228-dd00-05bc-de5801ce4626@linux.com> Date: Wed, 26 Feb 2020 17:57:18 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200224212352.8640-1-w@1wt.eu> 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 2/25/20 12:23 AM, Willy Tarreau wrote: > As indicated in commit 2e90ca6 ("floppy: check FDC index for errors > before assigning it") there are some surprising effects in the floppy > driver due to some macros referencing global or local variables while > at first glance being inoffensive. > > This patchset aims at removing these macros and replacing all of their > occurrences by the equivalent code. Most of the work was done under > Coccinelle's assistance, and it was verified that the resulting binary > code is exactly the same as the original one. > > The aim is not to make the driver prettier, as Linus mentioned it's > already not pretty. It only aims at making potential bugs more visible, > given almost all latest changes to this driver were fixes for out-of- > bounds and similar bugs. > > As a side effect, some lines got longer, causing checkpatch to complain > a bit, but I preferred to let it complain as I didn't want to break them > apart as I'm already seeing the trap of going too far here. > > The patches are broken by macro (or sets of macros when relevant) so > that each of them remains reviewable. > > I can possibly go a bit further in the cleanup but I haven't used > floppies for a few years now and am not interested in doing too much > on this driver by lack of use cases. For patches 1-10. [x] eye checked the changes [x] bloat-o-meter and .s diff show no real changes [x] tested that kernel builds after every patch [x] floppy targeted fuzzing with kasan+ubsan reveals no *new* issues (required mainly to test the previous patch) If Linus has no objections (regarding his review) I would prefer to accept 1-10 patches rather to resend them again. They seems complete to me as the first step. I've placed the patches here: https://github.com/evdenis/linux-floppy/commits/floppy-next Thanks, Denis