Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3474056imw; Mon, 18 Jul 2022 08:42:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uO1oWKpDP5Q6sSYqx5SfojP4fTjTnjisV7PsRDoXzXYUEkHO9pCje/AEcts4Jb5EZQMVgu X-Received: by 2002:a17:907:a426:b0:72e:faf6:2873 with SMTP id sg38-20020a170907a42600b0072efaf62873mr16217441ejc.74.1658158966499; Mon, 18 Jul 2022 08:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658158966; cv=none; d=google.com; s=arc-20160816; b=UwL2vPqFUs2E49p0PUzsOFc7CWbv+d0IJFlhaFmEXRnqhQbiM9963pkTSv7ClcNXYF m6VZ6BfHSCc0290idkwPL2Pg8dP5FZJbbwi0HGLFu2zN9D5kT6M2cAs7OrjLROkRKSgP UOx/26Pj3MFy/DsMWWYIr1uH6+UZrPrvgdFoPP2UZd6Kb24QocWdZabnqL+KfQAai3v7 5ApA4+5OqpzMofTa6jjnihdKGW+fXaGA5NZhHqjBNhslZ6YOVbZ4Dh4j3Wp8ROIqNrpL 4yUvfWP8MQA/ihqGBRLiJwOzZ74Dc5Avp8EAKTaakxZcshpgZMPKpqzmHXRk8ceyf7uV 8hug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=qNCpXXx/UVAScX22Wy0a2l/ouu+CQDoAik/pVsqQbrE=; b=g0WgdLMEFeothvk8/6/BSz8VtKxBIOCQiuqJJHShi69uVk4c78x+RqdkJu5AyLg2Xb nnfpOky3DlgEE2rdeDvMVTivbNO94G87uYCtvIU8X4d86NEYK4RqzdXpIoJFy1Lzhulg N7bBBn+WnAwKcZusJ5kObMyAdzpDWHQBmG1RnLX66aA4Oc4QkBba2waqs+xLpWZOeozo P07QwpWRSHSP4dilWFnUbfxrQLBmPjIZGVhowsLuJukTLrnSTl4N5G0/gdR6gDwIqAQ7 nqZ4BkuQq2/1VNwA0I9bISenxaESp96rAjj8SmH41qb3yu6RKupgFU10EJRO4fnSQeiz oshw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FJw2YfLb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a056402344a00b004372b5307cfsi15131722edc.247.2022.07.18.08.42.22; Mon, 18 Jul 2022 08:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FJw2YfLb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234501AbiGRPZT (ORCPT + 99 others); Mon, 18 Jul 2022 11:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiGRPZS (ORCPT ); Mon, 18 Jul 2022 11:25:18 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7B18286FF for ; Mon, 18 Jul 2022 08:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658157917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qNCpXXx/UVAScX22Wy0a2l/ouu+CQDoAik/pVsqQbrE=; b=FJw2YfLbbBZsRvjYxLcid1sb5oHSEvqRO6O7pp0Kzsowr0+cZh0qQgEyW91wmIGvjCe1MF ESP2bw7B5MwHyYjFWeO+CpLVDFglY8iiE4XLNfzBgDYBhEDM555eYyjpfQ3getzWX2rnvK GmGkp4M7IcQeA+7yHpLqvAixhb8Myko= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-425-4UwBTS2DMm6oJkJ9wLcRkQ-1; Mon, 18 Jul 2022 11:25:12 -0400 X-MC-Unique: 4UwBTS2DMm6oJkJ9wLcRkQ-1 Received: by mail-vs1-f69.google.com with SMTP id x128-20020a676386000000b003572c961a12so1029111vsb.0 for ; Mon, 18 Jul 2022 08:25:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qNCpXXx/UVAScX22Wy0a2l/ouu+CQDoAik/pVsqQbrE=; b=FlWaTLYP3ETeH79vBkJKEv01PdbUWo18g81aGg9D5cjPU88Nr6aSTt1LDuLTf5iqLH +RRa+M8D6Bm4u85glLgrT+g6o6RuTjWx1p3lrWUlhCqx1qLo5v1I/kEhweXJu3balwqg YToFOCS1BBKz0mzigQY6Y0EE7X3KrFQ77FZ9VWa45LuCnjrwTJiWZ+xiOVVuMFCjzqTx Gc3UiA68ccxDtJ4IweUQL7TyXaEfLgv+M/3K9C6GdRw3kjz2SW77lRQoYdLyzuGNLphE 1vSEuOHo8WAU3DI0E1MO2QkCz85rGeK6NCVcB7PpvbBe3L76i+QRqqCG1F+cIYqdeLNc arOg== X-Gm-Message-State: AJIora+vT8ucDBP/MxkjPeml1axyLPDI8VNezH6BbPD55NCPjTekaGK5 Ee+q69dI1rWV+oJ29jxBXeMsK/J+dMZ1iJFGd3vqgfO6HRSBxCygESLnbPLWP/Sn0uJtieOFcth 0TIveNWOplNjq2ngIIQu/xCnK3n/BvKNf7ck45xx9 X-Received: by 2002:ab0:2714:0:b0:383:63cc:70e7 with SMTP id s20-20020ab02714000000b0038363cc70e7mr10319475uao.97.1658157912169; Mon, 18 Jul 2022 08:25:12 -0700 (PDT) X-Received: by 2002:ab0:2714:0:b0:383:63cc:70e7 with SMTP id s20-20020ab02714000000b0038363cc70e7mr10319431uao.97.1658157911235; Mon, 18 Jul 2022 08:25:11 -0700 (PDT) MIME-Version: 1.0 References: <20220715125013.247085-1-mlombard@redhat.com> <5a469c5a.8b85.1821171d9de.Coremail.chen45464546@163.com> <22bf39a6.8f5e.18211c0898a.Coremail.chen45464546@163.com> In-Reply-To: <22bf39a6.8f5e.18211c0898a.Coremail.chen45464546@163.com> From: Maurizio Lombardi Date: Mon, 18 Jul 2022 17:25:00 +0200 Message-ID: Subject: Re: Re: [PATCH V3] mm: prevent page_frag_alloc() from corrupting the memory To: Chen Lin Cc: Alexander Duyck , Jakub Kicinski , Andrew Morton , linux-mm , LKML , Netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org po 18. 7. 2022 v 16:40 odes=C3=ADlatel Chen Lin naps= al: > > But the original intention of page frag interface is indeed to allocate m= emory > less than one page. It's not a good idea to complicate the definition of > "page fragment". I see your point, I just don't think it makes much sense to break drivers here and there when a practically identical 2-lines patch can fix the memory corruption bu= g without changing a single line of code in the drivers. By the way, I will wait for the maintainers to decide on the matter. Maurizio