Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18885382rwd; Wed, 28 Jun 2023 01:56:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4VLTGN5mtyz1LS+tS5vsSWqwHCB0RIH4nblEzOuLPRHBYBsrZrMRc90ml9kEkE+Hd8Rxd0 X-Received: by 2002:a17:907:6d86:b0:98d:4b97:acc8 with SMTP id sb6-20020a1709076d8600b0098d4b97acc8mr756062ejc.25.1687942607744; Wed, 28 Jun 2023 01:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687942607; cv=none; d=google.com; s=arc-20160816; b=I6V1PSVSsLzmHdua9klGM88QQV7HWPZGYgoA+AghLc/UMSX8B+zlHinG7yRtV4mk1K Cn5McGbvMUWkhXFiSWt/5Ieu8D9D3GenQZ1aUXibjpgoMBpB9PIzvQC8QuSQXlGPBi69 Sa84hpY9shHnv6KzpZ6X1ai3q5ErMKLJotWHiDqMe+5Q/tzbfKMEM38pKwl2z2xs7PPk pP2PdSEvlBW1LfXe2evERIt27IQFXMQetcZ4KzvFxGNyYDkw+P+Iejs93aSZYPqwpqkJ yePg8Gs7E8CYraBRNvFqeVFcc0O77ZnQyTtvXfGkTki6KlIHS5cYotD9OlNISTw6nBeB TKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G9KUxa1lYA//uH+Mg+tF3vqCvvGmho9V1AYLYvWZg7Y=; fh=9cHbzlgIUzK5Pc96MUVoFHYLyf6a9gZ0iJAB+mRU3qs=; b=0mPIU/SJ4K/GoUCyI2a0cQpcIXQl5URv3gwqjTchU+YOnlE/zy8tk0QBs/YQ13QMhe mtZndc7CQmhBUdlQCEjeUxxtD72qdcLCqfIYbzv0EqYYx1f6FlxPypALPxmyE4yh/sTu M9YtTmuAuLzVTZfQGjo6cKv/Ml0aGCQv9jnvj9s6IhANozw7pPEvaqmJsiG9w7QdjIOJ FtXfRMR+fZ03E0ODwFi0rRLvOM+LTlHkYiXAParp+nR84K4vhjAqS+gtY5prIluioykv ZRVaNiVxFb8woQ6wCa5FdqAf0yV8m1Nr2dMMbpvO4qu/fgMs1hdg4vbuuRrGmhasu0W0 YYCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eJofu9sV; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc6-20020a170906f90600b00987c05f5666si5422360ejb.1042.2023.06.28.01.56.20; Wed, 28 Jun 2023 01:56:47 -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=@linuxfoundation.org header.s=korg header.b=eJofu9sV; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231851AbjF1IGv (ORCPT + 99 others); Wed, 28 Jun 2023 04:06:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232278AbjF1IBv (ORCPT ); Wed, 28 Jun 2023 04:01:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A840030D5; Wed, 28 Jun 2023 00:59:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2160F6125F; Wed, 28 Jun 2023 05:30:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25476C433C0; Wed, 28 Jun 2023 05:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687930220; bh=ah8x13f4zofFMx5nsLEc6qs3jvoPHfNuOeEvmo9e0nY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eJofu9sV4aO9R5qfMoxcHszIoHkwd1dpN97CpkjTQHw47hcmonzjNcarLO5y/kgQN qKsR200mYoOHYjRD48YozrqWPywN1JBWKbQnZha58QeS8pk/Xti6yqfTBsm8ZfTEfF TaN8tzL9tOYeo1C0Dcicx6hQWQ5brcBEH/GIQ3Qc= Date: Wed, 28 Jun 2023 07:30:16 +0200 From: Greg KH To: Yuxiao Zhang Cc: Kees Cook , Tony Luck , "'Guilherme G . Piccoli'" , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, wak@google.com Subject: Re: [PATCH] pstore: ramoops: support pmsg size larger than kmalloc limitation Message-ID: <2023062832-barrier-strenuous-9499@gregkh> References: <20230627202540.881909-2-yuxiaozhang@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230627202540.881909-2-yuxiaozhang@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Tue, Jun 27, 2023 at 01:25:41PM -0700, Yuxiao Zhang wrote: > Current pmsg implementation is using kmalloc for pmsg record buffer, > which has max size limits based on page size. What is that max size? > Currently even we > allocate enough space with pmsg-size, pmsg will still fail if the > file size is larger than what kmalloc allowed. > > Since we don't need physical contiguous memory for pmsg buffer > , we can use kvmalloc to avoid such limitation. Odd placement of the ',' character :) Anyway, thanks for getting this sent out. But, what in-kernel user is hitting this in the pstore implementation? How big of a buffer is it trying to create? Is this a bug in older kernels with the in-kernel drivers as well? If so, should it go to stable releases and how far back? thanks, greg k-h