Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751560AbdI3UvV (ORCPT ); Sat, 30 Sep 2017 16:51:21 -0400 Received: from mail-vk0-f48.google.com ([209.85.213.48]:45290 "EHLO mail-vk0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbdI3UvT (ORCPT ); Sat, 30 Sep 2017 16:51:19 -0400 X-Google-Smtp-Source: AOwi7QA2DpS9XNASXZs08EC07d6mkuLH0AbjZgaq33oJgcZ3q7gHde8I0zjEnTZgXJgDjvEXpfoECVkBOCFjOwwhE8I= MIME-Version: 1.0 In-Reply-To: <502375193.icN6k8xHrH@tjmaciei-mobl1> References: <20170829182032.61961-1-ppenkov@google.com> <502375193.icN6k8xHrH@tjmaciei-mobl1> From: Eric Dumazet Date: Sat, 30 Sep 2017 13:51:17 -0700 Message-ID: Subject: Re: [v1] iov_iter: fix page_copy_sane for compound pages To: Thiago Macieira Cc: LKML , Al Viro , Petar Penkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 31 On Sat, Sep 30, 2017 at 12:24 PM, Thiago Macieira wrote: > On Tuesday, 29 August 2017 11:20:32 PDT Petar Penkov wrote: >> Issue is that if the data crosses a page boundary inside a compound >> page, this check will incorrectly trigger a WARN_ON. >> >> To fix this, compute the order using the head of the compound page and >> adjust the offset to be relative to that head. >> >> Fixes: 72e809ed81ed ("iov_iter: sanity checks for copy to/from page >> primitives") > > Hello > > Is this patch slated to end up in one of the 4.13.x updates? It landed on > v4.14-rc2 already but seems to have missed the 4.13.3 and 4.13.4 tagging. > > Without this patch, I can't connect any USB Ethernet or the kernel will start > producing that WARN_ON message and returning -EFAULT for quite a few programs. > Hmm... problem Petar had originally has been solved. His commit ( 90e33d45940793def6f773b2d528e9f3c84ffdc7 in Dave Miller net-next) no longer hits the problem, while his prior version triggered the issue. Relevant and updated part is : + page = virt_to_head_page(data); + offset = data - page_address(page); + skb_fill_page_desc(skb, i - 1, page, offset, fragsz);