From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0B74C282DA for ; Thu, 18 Apr 2019 02:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 736032183E for ; Thu, 18 Apr 2019 02:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555556220; bh=RnG4MYC7TGuYnMYxGxbz8W4kOro1aZePOJJsg6fsHT8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=AzpzsDlsFsdNDuNhcRkw52b8dnuy2FvEBUxZ9aw4CJStvFDIsAZrHFu7NA8r5LlL+ axe+bIfLyEMNoZSSHREqxyiWQWqB9xcw2QgBkL7Kdo2xk8sYHV8ol6ufw3l85v+OFt ENr4FvwhpB6DfT8WUzk9rnYU51a0ZXG9MSXCKV5E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732325AbfDRC47 (ORCPT ); Wed, 17 Apr 2019 22:56:59 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45533 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731985AbfDRC47 (ORCPT ); Wed, 17 Apr 2019 22:56:59 -0400 Received: by mail-pg1-f195.google.com with SMTP id y3so455969pgk.12; Wed, 17 Apr 2019 19:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=9fAozFU9Vo5PkRir8aMsOJrSpowddF53hO7XBzCH2pU=; b=jRoJd5uMetn4phoeLnvWdUJL8g/4BpqrZ1fHHeDMaERzCuo4eh+XwnPA8OxdlKGF3d 8NHldX+sHtdpCfPHc2C/G4QLwT8XhCEVfSfCLnpEH2ZTYUa8gh87IBmUZdGJEAkdwzI6 W8pKkHdKWDbY1gym3kDd6CihNTAg+Obf8cL3eYxnRWJNI4571+7shTZf5a8P765n6RtZ VY/CNvf5dqvh4D4JDqzMxIPxUCUX8vyH1/Ud3lbYjCTCj8DAkzHbm2XxMJvrh88omFal OaO9GwYEHV7lkfU32FJhfVqBrPIRtQ/Yv9soqOWPD/xz0BVMczwkvTdus6mKBEKO+/D8 M5QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=9fAozFU9Vo5PkRir8aMsOJrSpowddF53hO7XBzCH2pU=; b=C4mBRS9uoPleVSa8BEu78OIUR98UKsi5os6Abs57f/JD0iJCWf/9sHdSod8frc4cDQ AcTQKUYOSONLARMMqcPOR1et7ismThMjfzj4aJ+UuItDG79856j9oliN7n/Qm34RUamV sJ7a3IomuhtxzgSntARhDtCqFGTLkuR7v1P15fv/fJxZJD/JWK8NDtbLqvLYsFtOAbGi f+nvCxkkliiWUzf9r8OCrlQMAIgJZRMrxc5D5jh4lbksXTMB+mXKl0PWEJfXJT52va0E ytpNLAWYoURxR8nWKdHN9VGYNpluritb2hOsO73/GeAVRaxGWCwGvQXiGREns/znMnM/ rMOQ== X-Gm-Message-State: APjAAAW36630D4Iv38Mdmg0FnY/+jtV7RUX+Tg8ED6WBlYKA1qmIND4e dF8YM6z2JP/kCDT0ELoDBAQ= X-Google-Smtp-Source: APXvYqxcUqa/O3+LGqX16rFpZOjKbZUnxuAMw1T8clh1FGVtgUp2s4rdncZLWeIkAKL3zihWW4vX9A== X-Received: by 2002:a63:4e64:: with SMTP id o36mr87859562pgl.213.1555556218698; Wed, 17 Apr 2019 19:56:58 -0700 (PDT) Received: from google.com ([2401:fa00:d:0:98f1:8b3d:1f37:3e8]) by smtp.gmail.com with ESMTPSA id m16sm823763pfi.29.2019.04.17.19.56.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 19:56:57 -0700 (PDT) Date: Thu, 18 Apr 2019 11:56:53 +0900 From: Minchan Kim To: akpm@linux-foundation.org Cc: mm-commits@vger.kernel.org, stable@vger.kernel.org, sergey.senozhatsky.work@gmail.com, ngupta@vflare.org, jglisse@redhat.com Subject: Re: + zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch added to -mm tree Message-ID: <20190418025653.GA39673@google.com> References: <20190416235350.NIVru%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190416235350.NIVru%akpm@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, Apr 16, 2019 at 04:53:50PM -0700, akpm@linux-foundation.org wrote: > > The patch titled > Subject: zram: pass down the bvec we need to read into in the work struct > has been added to the -mm tree. Its filename is > zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch > > This patch should soon appear at > http://ozlabs.org/~akpm/mmots/broken-out/zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch > and later at > http://ozlabs.org/~akpm/mmotm/broken-out/zram-pass-down-the-bvec-we-need-to-read-into-in-the-work-struct.patch > > Before you just go and hit "reply", please: > a) Consider who else should be cc'ed > b) Prefer to cc a suitable mailing list as well > c) Ideally: find the original patch on the mailing list and do a > reply-to-all to that, adding suitable additional cc's > > *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** > > The -mm tree is included into linux-next and is updated > there every 3-4 working days > > ------------------------------------------------------ > From: Jérôme Glisse > Subject: zram: pass down the bvec we need to read into in the work struct > > When scheduling work item to read page we need to pass down the proper > bvec struct which points to the page to read into. Before this patch it > uses a randomly initialized bvec (only if PAGE_SIZE != 4096) which is > wrong. > > Note that without this patch on arch/kernel where PAGE_SIZE != 4096 > userspace could read random memory through a zram block device (thought > userspace probably would have no control on the address being read). > > Link: http://lkml.kernel.org/r/20190408183219.26377-1-jglisse@redhat.com > Signed-off-by: Jérôme Glisse > Reviewed-by: Andrew Morton > Cc: Minchan Kim > Cc: Nitin Gupta > Cc: Sergey Senozhatsky > Cc: > Signed-off-by: Andrew Morton Thanks for the nice catch, Jerome! That sync/async read code in zram is really mess. :( Acked-by: Minchan Kim