Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4250894pxb; Mon, 1 Feb 2021 17:13:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6rrq9H/OQp5OTtwofC/yDoEs1ZuaqzmAIb4SZLoz9TD3Jn2hyDNIECwmTB87ccMy2R50B X-Received: by 2002:a17:906:a851:: with SMTP id dx17mr19428968ejb.537.1612228404757; Mon, 01 Feb 2021 17:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612228404; cv=none; d=google.com; s=arc-20160816; b=is8PID74yqnN0VxeX7CkEq10LC0Wa0UpF9U6yDTo8Gx0K8A7NikslO8H0UICL0uQm9 dAM1zH1j3Fr9+hMI0RjHHRvPt5/KPXrieQeI6RX6eh0U7m+09iV1ajtURcOuwROMWe+H 8RnN+0qOjPVkxbz8g08LYdAT9SDRKAm62vKPJ97X7V9xUN2mvThiXaGEGxYy42fMTmtK HXOCcgYRw7xKg4B6vIvH9UL6/S4gQ2bk8CQzQWKU/V14ZKsHgoKmhdPy10/yxo5mtFwc 6LyBhbGgxzIHh3w6daYK4mv5Ff2XZdi+y3Z1wZ35MmZXnVLKvIQJexK6vm+Z3aDALlh8 EwSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=pNCTQ+GJhIhHpTNwwogRL6Yi/0jouh3mFkQQjXxphC8=; b=NGpaQwovC/RrSm5SoaNdaNhvb+XoBOhQ6wrVGIzJpHFTN/TspcHtxJ1d5YxGoV2+d7 88QSIXiEf9vzOqi8HJVn4YsWw96SWyCW2E6wIafpyuGgtZziLK/Itz1OFt+R7IMWOnNS QgBMSSAXRv7yAMA/xrAqgXza24d7l+7AKQ6/KKkpc4DgHQW+d4A6akZrn9hg7a9fNo0J 847Dm/K4HmOjEDf+RA8zzV1qQPZzw6qYAcR/c3e4pMv3i3FjKQmq0RkLy1OxLIzW4jiT 6AIyld5I+7thyCu32KgoivEAjCP9Ezt/zXqPJWEyru2ocKH2wm8u9CklnTdBlAU6S51S J4jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KnvUvAZH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si11604696eds.422.2021.02.01.17.13.00; Mon, 01 Feb 2021 17:13:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KnvUvAZH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhBBBKC (ORCPT + 99 others); Mon, 1 Feb 2021 20:10:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbhBBBJ7 (ORCPT ); Mon, 1 Feb 2021 20:09:59 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF86CC06174A for ; Mon, 1 Feb 2021 17:09:19 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id gx20so1310267pjb.1 for ; Mon, 01 Feb 2021 17:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=pNCTQ+GJhIhHpTNwwogRL6Yi/0jouh3mFkQQjXxphC8=; b=KnvUvAZHPhu3r6Yh7bIMIXCYLeRudcUaDGZlu1gyzOjzIwWPZXs8tIgfnVHSZYL4R6 ZaY41xp4cjstE99q+drLELvzoA1XGHVs4Ci11M7UyrGpT8Nu2TajXHUBW3ajbAm05IVL Uc1sqaK0T8c9Vj7ws6Awhl9unwhQJaY1aj5/TAuTWPLRT5b+rqpXJ+3+H0h7kiXg3dpr 7/7EBCmXMa8/T30kzfk8G/z/nlCocltuHltX+HW4agnpVtcRw4MIeEW66iCxkgKOpnDM eXXiMSm/x+Kakf/k1msvZiFbMreUy3rP9qvrpiaqgnTcDX44PtQMQHTIynkX39EYorin sdog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=pNCTQ+GJhIhHpTNwwogRL6Yi/0jouh3mFkQQjXxphC8=; b=czpAHNCxleJ5ZsU8QKRHaEG2XH8K2X+Of0LE/YHg3FzaRpAjvddE1+4s++EfdlOWOL DU+wHkdps1hueZcttgdVcNYZ2C3DTkoBsueFeX/Fg0g7QGPlr/+jV2OSN7dkdwst4Cid 1mpoyN0r6IQz55Z9MxdW8iPuudWvj94Vkbf+kKlcW35IGRgzZc8+yT9F+fxIGYzXIzOx yJtS+eqFPDskDngZgwnNVp1JoSvBk45UoHm3bm+7Zh3zAtVg//Hjobq2y2SgdUO0vhbn Fvw7UHrYjECVGsoptJpZymjFQK+XyZrndb0bjFF5u559JmbzRDWkOZivGth4zXWyeXf/ APKA== X-Gm-Message-State: AOAM533737dJTPyef/oI5z6OdYRZoYXXXf6aFMVAyCnU+lP7lBNbmelw q5Z0sTo12sqYxcjAYOHE9dHzsw== X-Received: by 2002:a17:90a:7e94:: with SMTP id j20mr1621007pjl.218.1612228159179; Mon, 01 Feb 2021 17:09:19 -0800 (PST) Received: from [2620:15c:17:3:4a0f:cfff:fe51:6667] ([2620:15c:17:3:4a0f:cfff:fe51:6667]) by smtp.gmail.com with ESMTPSA id r21sm20536846pgg.34.2021.02.01.17.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 17:09:18 -0800 (PST) Date: Mon, 1 Feb 2021 17:09:17 -0800 (PST) From: David Rientjes To: Dan Williams cc: Ben Widawsky , linux-cxl@vger.kernel.org, Linux ACPI , Linux Kernel Mailing List , linux-nvdimm , Linux PCI , Bjorn Helgaas , Chris Browy , Christoph Hellwig , Ira Weiny , Jon Masters , Jonathan Cameron , Rafael Wysocki , Randy Dunlap , Vishal Verma , daniel.lll@alibaba-inc.com, "John Groves (jgroves)" , "Kelley, Sean V" Subject: Re: [PATCH 03/14] cxl/mem: Find device capabilities In-Reply-To: Message-ID: <26a3b4dc-8872-3547-33f7-20cbd6cd981d@google.com> References: <32f33dd-97a-8b1c-d488-e5198a3d7748@google.com> <20210201215857.ud5cpg7hbxj2j5bx@intel.com> <20210201222859.lzw3gvxuqebukvr6@intel.com> <20210201223314.qh24uxd7ajdppgfl@intel.com> <20210201225052.vrrvuxrsgmddjzbb@intel.com> <79b98f60-151b-6c80-65c3-91a37699d121@google.com> <20210201231718.2hwaqgn2f7kc7usw@intel.com> <20210202001120.vr6mos7ylnbqytxh@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Feb 2021, Dan Williams wrote: > > > I don't have an objection to binding, but doesn't this require that the > > > check in cxl_validate_cmd_from_user() guarantees send_cmd->size_in cannot > > > be greater than 1MB? > > > > You're correct. I'd need to add: > > cxlm->mbox.payload_size = > > min_t(size_t, 1 << CXL_GET_FIELD(cap, CXLDEV_MB_CAP_PAYLOAD_SIZE), 1<<20) > > nit, use the existing SZ_1M define. > Sounds good, thanks both! I'll assume you'll follow-up on this in the next revision for patch 7 ("cxl/mem: Add send command") and we can consider this resolved :)