Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5889638pxv; Wed, 7 Jul 2021 14:16:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvgcd7+N8rexoJXDjD2gKTBoJj/GZXu/tItIUMYAvIL700BimoWmYW2yqfV1o9OIQVrFNZ X-Received: by 2002:a05:6402:4393:: with SMTP id o19mr32579229edc.263.1625692614912; Wed, 07 Jul 2021 14:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625692614; cv=none; d=google.com; s=arc-20160816; b=auoxGiZy0bUdNNuntEvnRc4CsbxbxjdJEBrZI/joweDRn+prk3QzNv/wm6RQb4UcfH MzXrWCpAAgJ9pbsnTQgXAZTJP3Is57K4dYV/LAyb6ZJZXh7XkEt3+XeWlc89t9LDBk0W s5W+HDZ+SjbJN1U5KLVeYJ5cujfLaq3WooVtF2OGEr/EP93cfmkoitfEuBL8oluE41Yg 9gAXFs3rujDeAl/xB9e+5OchGIKgKiaNgst9ls3cgl1bbtknrpwFr+k4EfeaVhOGkDVU 0roDLkRm3Jtup5ln5HyH1sd841ixALAtn2+VLx+wPfXEzQWhlQQ1E6FJy8myQWcvKNVM 3cOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EXPbH/M4GYoZ6FhrrR5MYlyYSD6/NgfgonH38mq87Gc=; b=dRCCsHQuizHMX789BoTCpRO0DgTe5Q0Y243ljIKhpLrfSeiI664O0AJLN9zQHiL2Wq feMNVYXMPNChKlcdXbFENOCUzNuBRy3iFKmy1BXSx4WkXDakBjWa5Idlz+17gbIJ++xL 6UQPutWyuxBercebPvNgMKurf0fCUy7p/1YdgNjGvE3giM8SV6qr1vtE9Ez36c1/45dv QYvDMjJa2obeEjLtYTq6QlCHSmrCk1SpAx8sRm/pVOgdVvIMvtuzWcaf6j+J7rvUCnfc 35GnZAHiBxTFy/jdaARIZ9tvsw3Z1qbk/DepYLm+zswx64kdYa1GflwYOgeEkrGjsdQm W0Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KU426vk0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se21si185311ejb.114.2021.07.07.14.16.30; Wed, 07 Jul 2021 14:16:54 -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=@linux-foundation.org header.s=google header.b=KU426vk0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231142AbhGGTIf (ORCPT + 99 others); Wed, 7 Jul 2021 15:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbhGGTIe (ORCPT ); Wed, 7 Jul 2021 15:08:34 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02511C061574 for ; Wed, 7 Jul 2021 12:05:53 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id u18so6748939lff.9 for ; Wed, 07 Jul 2021 12:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EXPbH/M4GYoZ6FhrrR5MYlyYSD6/NgfgonH38mq87Gc=; b=KU426vk0FJciJbxXpjIi+w7PbOZYM3CgwOJXR+Ek7FnEKtgID/4F2U161uPJT3xVVT lZ1ZxdgXTYAQYkqWO1y6TlgNYgmsQnvcVY+UCj3RJhKHOyU1CKfl1VYJslwJjECWB1xW BLYFXnOx82VFpwgKnloCd733FB6T6jcMY3lJc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EXPbH/M4GYoZ6FhrrR5MYlyYSD6/NgfgonH38mq87Gc=; b=NpijqXN/4eyMU3MSjDaEAvHtYpSGt/1x0wA1mIBZasd9uk0z9CskCcY/wlO9U77K5d Tbjm+sa1Z2GOP2V8w2fa9rPoVC7s2bLCKTNJ8wLQMEqj7l55hPKyKCnskWalFGUbIKkQ dEBBkqUNW3ZGm5+DhYyuwhFsB8dYM8VJbHEF5q4WySeu9WljSG4selYKLS4AavFlORQL 7URoDvkJdaFtS4F+2hTOJM3icx10OEVnoNZEhbopjEfrftQ2FQmjeqp7dQbAdlWuQH+P uv3q9hOpVSWDBodQeqwo+P1zn2Y1BOsDaTxlh1AMvFmcEIEglBFRYH/hCJarRsSsceut E2HA== X-Gm-Message-State: AOAM530ZZNfCPCwSYYl8dwlUbYjvsIwT5kG6WhEwZ61OAZKZT0DQr1ux eIlORrhHd5U5WyEqdkRheqR/1aDkYGJFRXVdNVk= X-Received: by 2002:a05:6512:c13:: with SMTP id z19mr18686090lfu.616.1625684751173; Wed, 07 Jul 2021 12:05:51 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id o7sm1786111lfo.196.2021.07.07.12.05.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 12:05:50 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id a18so6706601lfs.10 for ; Wed, 07 Jul 2021 12:05:50 -0700 (PDT) X-Received: by 2002:a2e:9f11:: with SMTP id u17mr19734994ljk.48.1625684750030; Wed, 07 Jul 2021 12:05:50 -0700 (PDT) MIME-Version: 1.0 References: <20210704150025.GC21572@xsang-OptiPlex-9020> <20210705125756.GA25141@lst.de> <20210706143647.GA28289@lst.de> <20210707081220.GA31179@lst.de> <20210707083528.GA353@lst.de> In-Reply-To: <20210707083528.GA353@lst.de> From: Linus Torvalds Date: Wed, 7 Jul 2021 12:05:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [ide] b7fb14d3ac: EIP:ioread32_rep To: Christoph Hellwig Cc: kernel test robot , Jens Axboe , LKML , lkp@lists.01.org, kernel test robot , "H. Peter Anvin" , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 7, 2021 at 1:35 AM Christoph Hellwig wrote: > > Actually, not it doesn't. Sorry. So for a non-aligned large request > this won't work. So we'll need to actually loop here. > > This is probably better and fixes the issue as well (and ATAPI > probably needs the same treatment): Thanks, this looks sane and correct to me. But please do add a comment (or perhaps even better - an actual check) that the offset is at least 4-byte aligned. Because this splitting of the buffer at page boundaries can only work if you still have at least that 32-bit alignment. At least that's the case for ata_sff_data_xfer32() (which was what triggered that original oops). I did not really check the other data_xfer functions, although I did look at a couple of them. At least vlb32_data_xfer() has the exact same issue. A couple of others would be ok with just 16-byte aligned splits. But I *hope* nobody needs more than 32-bit alignment (and considering the legacy status of this model, I'd be surprised if they need more, but who knows..). Linus