Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1782682imm; Thu, 14 Jun 2018 03:56:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLq7pDn5tLgpKqEW9Bt4XZUV15Kw+iYafeL+dNkeewPhKsUqSzlRv2U/tgxdkuwVi4qIjwA X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr2466761pld.280.1528973773071; Thu, 14 Jun 2018 03:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528973773; cv=none; d=google.com; s=arc-20160816; b=VBkuliuKANLwwbxAGz2i+7UCnqX7zD9d/iXH+yPuLbvNdENE08VQPzgBnhAkZdKHFN r6b+ZXdDtDfxQexR57Bsav6346XJqCbnLK7xVkaGDu9OX4yJBbMiD21mEfq/yq5Y8Ajo vKx9xlhQb9r7Heys54lTq2SWKMm72nRJLRb4e59FZPZiZsOuViykxmbtVKp8cgJVR9Ck 0Vq1AAZiXFFqS3bkQlv7vrhKlx6KeZBPfHHx4hhAjMenz4DyZNMCD0ZigBoa1xWPB9or PgrI/NBeDUJyxLgxEkf5q2a4hdpJk5nkTbRaS6/xBKakXxhuuQxXHJW2V6wOSf+R0zUq ezhQ== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=DSxk86fXVKdT0c3aFVQjNfj6qQg+GlPNkzKCXgAck8s=; b=obH2/+9IYa3kGjZUdvgocSTedK178oNy0Y99xe4IgXLkhdbD1QUHE18eH1d4SJEd0D 70A4MOWLmpqHyig3u/fC5gVzNNurAsykRh8fyxb8uDIkDQwxQYpfqxJ3WR1ny2zisjGe moD0lYZfNjr+R1AKYxFEOeUIYDBAsRnqVm1/mpbVbuEIgLWHBxFLkayTOgbDw6WTYWx+ xK2f5wf6A1pWKUHXqviMPQ1clwbDX9RTQwo6VFQWQdlm6hBJCm1PBl/y2+6vA1NETePr c1fJK61nrNLimTu0ft1isUHU5mSOIDmBQnGzxb83wSHAwniE9QndtipWt3pqQXk+4wnx tL2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LwX5xEHh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68-v6si4945324pfq.172.2018.06.14.03.55.58; Thu, 14 Jun 2018 03:56:13 -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=@linaro.org header.s=google header.b=LwX5xEHh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754982AbeFNKza (ORCPT + 99 others); Thu, 14 Jun 2018 06:55:30 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50183 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754900AbeFNKz1 (ORCPT ); Thu, 14 Jun 2018 06:55:27 -0400 Received: by mail-wm0-f65.google.com with SMTP id e16-v6so9789785wmd.0 for ; Thu, 14 Jun 2018 03:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DSxk86fXVKdT0c3aFVQjNfj6qQg+GlPNkzKCXgAck8s=; b=LwX5xEHhDHDGR3avKXEvWKNzbXQ5VoQg/bR/Q9ScD78b+5EYjj7z6VfAuo+QDA9rHx qESeFYQnw9E/WqabYwaLX3mASHh5kayuykAirlCrnblFaXwLTYK5rmx+rl2lkgDB+iqT ydot4T0yeO5RYbvpKfO1/lpNZeQgQsN5qF31I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DSxk86fXVKdT0c3aFVQjNfj6qQg+GlPNkzKCXgAck8s=; b=G+gW4b5ucAQskep58ybRka0+iXusOb0MQuzzAhKlOR0Xya/oPk2wyn4H2A0QtBHb/V SiRfirH3GxodJRznOigCTmphIAKV7F5EJ3op0AOGVzwRVznh2wYpz+QmddW4EfcT+Yx+ ZX8TnrSMxx58qrOsmDadb3bsJ5h8ZtGcQbRj9nQLlG+R6KmeUUXht2tJjaA9UoOTyPdj v7eVU8ybz34h2cPMkzUbHRk2iHzAWi2QzzlKdbAUyJIgoXfAeh8luFJ6hKyaInr9arsk FC1kTNuDb84G3DCLqMuMnU6Lr14T6+nAMZkm/rUrFKvqRCri+HkWuWMg8Gw3FJz41RrZ kQKg== X-Gm-Message-State: APt69E31cLmIaOioj+6ccv5PA6tQKIXCFlyKdPFBWmKjKOWqUAHPQiWq xElAsSRpWGK9rg+bK2WV2kMwPzoXkO5L3hERqxLfp/RUVZM= X-Received: by 2002:a1c:3504:: with SMTP id c4-v6mr1353889wma.59.1528973726545; Thu, 14 Jun 2018 03:55:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:c389:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 03:54:45 -0700 (PDT) In-Reply-To: <602443463.26544751.1528972563608.JavaMail.zimbra@redhat.com> References: <20180612164816.587001852@linuxfoundation.org> <20180614063448.GB6021@kroah.com> <20180614090151.GA24997@kroah.com> <2072095076.26539556.1528969792388.JavaMail.zimbra@redhat.com> <20180614102119.GA19094@kroah.com> <602443463.26544751.1528972563608.JavaMail.zimbra@redhat.com> From: Rafael Tinoco Date: Thu, 14 Jun 2018 07:54:45 -0300 Message-ID: Subject: Re: [LTP] [PATCH 4.4 00/24] 4.4.137-stable review To: Jan Stancek Cc: Greg Kroah-Hartman , Naresh Kamboju , Ben Hutchings , Linus Torvalds , ltp@lists.linux.it, open list , lkft-triage@lists.linaro.org, patches@kernelci.org, linux- stable , Andrew Morton , Shuah Khan , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jan, Naresh, Patch has been queued to 4.4 (for the next review round, yet to be merged to stable-rc branch): https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tre= e/queue-4.4 as "clarify-and-fix-max_lfs_filesize-macros.patch" Thank you! On 14 June 2018 at 07:36, Jan Stancek wrote: > > ----- Original Message ----- >> On Thu, Jun 14, 2018 at 05:49:52AM -0400, Jan Stancek wrote: >> > >> > ----- Original Message ----- >> > > On Thu, Jun 14, 2018 at 02:24:25PM +0530, Naresh Kamboju wrote: >> > > > On 14 June 2018 at 12:04, Greg Kroah-Hartman >> > > > >> > > > wrote: >> > > > > On Wed, Jun 13, 2018 at 10:48:50PM -0300, Rafael Tinoco wrote: >> > > > >> On 13 June 2018 at 18:08, Rafael David Tinoco >> > > > >> wrote: >> > > > >> > On Wed, Jun 13, 2018 at 6:00 PM, Greg Kroah-Hartman >> > > > >> > wrote: >> > > > >> >> On Wed, Jun 13, 2018 at 05:47:49PM -0300, Rafael Tinoco wrot= e: >> > > > >> >>> Results from Linaro=E2=80=99s test farm. >> > > > >> >>> Regressions detected. >> > > > >> >>> >> > > > >> >>> NOTE: >> > > > >> >>> >> > > > >> >>> 1) LTP vma03 test (cve-2011-2496) broken on v4.4-137-rc1 be= cause >> > > > >> >>> of: >> > > > >> >>> >> > > > >> >>> 6ea1dc96a03a mmap: relax file size limit for regular f= iles >> > > > >> >>> bd2f9ce5bacb mmap: introduce sane default mmap limits >> > > > >> >>> >> > > > >> >>> discussion: >> > > > >> >>> >> > > > >> >>> https://github.com/linux-test-project/ltp/issues/341 >> > > > >> >>> >> > > > >> >>> mainline commit (v4.13-rc7): >> > > > >> >>> >> > > > >> >>> 0cc3b0ec23ce Clarify (and fix) MAX_LFS_FILESIZE macros >> > > > >> >>> >> > > > >> >>> should be backported to 4.4.138-rc2 and fixes the issue. >> > > > >> >> >> > > > >> >> Really? That commit says it fixes c2a9737f45e2 ("vfs,mm: fi= x a >> > > > >> >> dead >> > > > >> >> loop in truncate_inode_pages_range()") which is not in 4.4.y= at >> > > > >> >> all. >> > > > >> >> >> > > > >> >> Did you test this out? >> > > > >> > >> > > > >> > Yes, the LTP contains the tests (last comment is the final te= st >> > > > >> > for >> > > > >> > arm32, right before Jan tests i686). >> > > > >> > >> > > > >> > Fixing MAX_LFS_FILESIZE fixes the new limit for mmap() brough= t by >> > > > >> > those 2 commits (file_mmap_size_max()). >> > > > >> > offset tested by the LTP test is 0xfffffffe000. >> > > > >> > file_mmap_size_max gives: 0xFFFFFFFF000 as max value, but onl= y >> > > > >> > after >> > > > >> > the mentioned patch. >> > > > >> > >> > > > >> > Original intent for this fix was other though. >> > > > >> >> > > > >> To clarify this a bit further. >> > > > >> >> > > > >> The LTP CVE test is breaking in the first call to mmap(), even >> > > > >> before >> > > > >> trying to remap and test the security issue. That start happeni= ng in >> > > > >> this round because of those mmap() changes and the offset used = in >> > > > >> the >> > > > >> LTP test. Linus changed limit checks and made them to be relate= d to >> > > > >> MAX_LFS_FILESIZE. Unfortunately, in 4.4 stable, we were missing= the >> > > > >> fix for MAX_LFS_FILESIZE (which before commit 0cc3b0ec23ce was = less >> > > > >> than the REAL 32 bit limit). >> > > > >> >> > > > >> Commit 0cc3b0ec23ce was made because an user noticed the FS lim= it >> > > > >> not >> > > > >> being what it should be. In our case, the 4.4 stable kernel, we= are >> > > > >> facing this 32 bit lower limit (than the real 32 bit real limit= ), >> > > > >> because of the LTP CVE test, so we need this fix to have the re= al 32 >> > > > >> bit limit set for that macro (mmap limits did not use that macr= o >> > > > >> before). >> > > > >> >> > > > >> I have tested in arm32 and Jan Stancek, who first responded to = LTP >> > > > >> issue, has tested this in i686 and both worked after that patch= was >> > > > >> included to v4.4-137-rc1 (my last test was even with 4.4.138-rc= 1). >> > > > >> >> > > > >> Hope that helps a bit. >> > > > > >> > > > > Ok, thanks, it didn't apply cleanly but I've fixed it up now. >> > > > >> > > > On the latest 4.4.138-rc1, >> > > > LTP "cve-2011-2496" test still fails on arm32 beagleboard x15 and >> > > > qemu_arm. >> > > > >> > > > Summary >> > > > ------------------------------------------------------------------= ------ >> > > > kernel: 4.4.138-rc1 >> > > > git repo: >> > > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stabl= e-rc.git >> > > > git branch: linux-4.4.y >> > > > git commit: 7d690c56754ef7be647fbcf7bcdceebd59926b3f >> > > > git describe: v4.4.137-15-g7d690c56754e >> > > > Test details: >> > > > https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4= .4.137-15-g7d690c56754e >> > > >> > > Ok, but what does this mean? Is there a commit somewhere that I nee= d to >> > > pick up for 4.4.y that is already in newer kernels? >> > >> > Hi Greg, >> > >> > I think the expectations was that: >> > 0cc3b0ec23ce Clarify (and fix) MAX_LFS_FILESIZE macros >> > has been included to linux-4.4.y HEAD, so they re-ran the tests. >> > >> > Report from Naresh above looks like original report: LTP vma03 is >> > cve-2011-2496 test. >> >> And the test fails now? >> >> Still confused. > > I don't see the patch (0cc3b0ec23ce) applied to linux-stable-rc.git, > branch linux-4.4.y: > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.= git/log/?h=3Dlinux-4.4.y > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.= git/tree/include/linux/fs.h?h=3Dlinux-4.4.y&id=3D7d690c56754ef7be647fbcf7bc= dceebd59926b3f#n929 > > That is what has been tested above - is that the correct place > to get your backport of 0cc3b0ec23ce? > > Regards, > Jan