Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4214331pxb; Mon, 1 Feb 2021 16:03:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwm6J9+Kb/nFgdXZtVFWPS1BJQbGlGAT7xAETUAnrFVXmSs/zzEANu7FGKwmqi7EZBbLm04 X-Received: by 2002:a17:906:b28f:: with SMTP id q15mr8340467ejz.77.1612224194764; Mon, 01 Feb 2021 16:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612224194; cv=none; d=google.com; s=arc-20160816; b=wdK60/s6nyf7wm8efJzNlOO/ozJthAFJveTqCGCgAccp1l5gjGWTOm0YQ0p345TWu+ 1Au/TA2AcSY0O2FoVmQTJTlO7C9PK7yRKAtNwT8dclLESxP7xgCbhU/9LFYLFRZv33uh SMEbaQAqh0uUkWL/xemIdhpL4RZgUEmJ6/MWTDwuShUkABJk0VIV4Tfe/IlWZv2ODvFk uFfQ7wIoEKSuJken+hYw0j46zwv0M41AlZmdCpFu0KyTGj2SJGTdwu7a0PGgMzgZjn6r cdf91RZc9oo3a8sLp1pHgt2ogT07ewVNoj1GV3g8+iKG7H2yacSZ2brBIjAMJlvsFaZd yhuQ== 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=rTKu+xdzo+veIn6KkxdUI/A6PY5YQCPeNp5pTPUY3WQ=; b=ZkCjrYj2Zreu5Yqd015GWYd+MsBKj9IAzNUZ23/QvkMoT6rJ421A6UBKVqz0GhL5O3 ONo/r/F+ySvVtMpgavlnG2x7yOmruSCCXisDU30evWMQjmLM33MWzoipZ0mDMRPFV5yA y+dw7C6SgYPUVDX1HUD+FlIuh6xjmVb9FJNqaHzws/ADh83D+x/RvXo6TS+YbwVbIG+o 14f5lxocTuXqM5q1JxrXlPqrCyFk/HKC5KkGrMnqcIB+X50n7jTcEwLHIQ71ELvV9jl7 MrlAhrUgLkwpiQykKqFAYNLXJF7OKY3xYMBp0pU2dtHJ6VdWJAFOM2QcTzkDwCY+envs q4Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VAHjN9JG; 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 qu25si11349950ejb.424.2021.02.01.16.02.49; Mon, 01 Feb 2021 16:03:14 -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=VAHjN9JG; 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 S230164AbhBAX6x (ORCPT + 99 others); Mon, 1 Feb 2021 18:58:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbhBAX6w (ORCPT ); Mon, 1 Feb 2021 18:58:52 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 271BBC0613D6 for ; Mon, 1 Feb 2021 15:58:12 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id z21so13504447pgj.4 for ; Mon, 01 Feb 2021 15:58:12 -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=rTKu+xdzo+veIn6KkxdUI/A6PY5YQCPeNp5pTPUY3WQ=; b=VAHjN9JG4k8S/0sgPfPZHZIecEBvqimHWvOeTv0p4etlF/RojXQvnnCs/vX/pzsRi+ JPqNGtAokQTisR9hN5EWazgXLVQsteZk19JWjvOj6SdOYPYubYFzsHPhGH32anzd6Id4 GY1vNrTWQzIbLJhlWF8hr2bFzaiVj8n555uFHRRa5aB154AwlO1xOFiWwLuAdjmKZSry 9qaZvMsCEWpJgZ89LTxQ10Wk9kujeXp8KaWHer4ZPnyoQk+eCODtNru6s2rViglqrz+x HWT8qkCRQf7zzO3hyItdZBMempeoMn+HJdCUXRgLGnKMruuxjDXTBBYvdoCmfqX8GhfV Ts/w== 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=rTKu+xdzo+veIn6KkxdUI/A6PY5YQCPeNp5pTPUY3WQ=; b=nMZ3dHdqQEEuenjjeOsf3ZOrIocrVlmykBNOlsI6y8QbxkCoAgxhU2lLqC8ejwbTfF x5oyUgQ8pm3ql/b5V61CY4sFd+8jHtQ5ye0DRY16VgMP4XEXtkggM/4qLDxQeJJtH7yU SOANMehJczZAJiqqOoCyMtr0K72CmxBTeO/7vsROOTMH8pi3kbEyeDOLTbo3CK3UWuWh mfsoxYuDDYy5HuCkHeL9/ojLSYZjb7LuCK/0m8hfZ+BN1tH7trVzNb1s6svM4erRbEKQ 8mKdv+ZV7fzZKZ9bazOeOE0jbpWc8C4RsrWD7514njjBvfmDqN1DAdJqzUsXRRIXUkMI zCgQ== X-Gm-Message-State: AOAM5310x4Q8NGEoqYzGZ56vm4yHuA7LalMY0nHyBlmjKsL9n+xrE4sk 140CoOkp8JjQ5n0/gz168jLRmA== X-Received: by 2002:a65:47c7:: with SMTP id f7mr19057541pgs.305.1612223891284; Mon, 01 Feb 2021 15:58:11 -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 h15sm3044539pfr.62.2021.02.01.15.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 15:58:10 -0800 (PST) Date: Mon, 1 Feb 2021 15:58:09 -0800 (PST) From: David Rientjes To: Ben Widawsky cc: linux-cxl@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Chris Browy , Christoph Hellwig , Dan Williams , 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: <20210201231718.2hwaqgn2f7kc7usw@intel.com> Message-ID: References: <234711bf-c03f-9aca-e0b5-ca677add3ea@google.com> <20210201165352.wi7tzpnd4ymxlms4@intel.com> <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> 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, Ben Widawsky wrote: > > I haven't seen the update to 8.2.8.4.5 to know yet :) > > > > You make a good point of at least being able to interact with the driver. > > I think you could argue that if the driver binds, then the payload size is > > accepted, in which case it would be strange to get an EINVAL when using > > the ioctl with anything >1MB. > > > > Concern was that if we mask off the reserved bits from the command > > register that we could be masking part of the payload size that is being > > passed if the accepted max is >1MB. Idea was to avoid any possibility of > > this inconsistency. If this is being checked for ioctl, seems like it's > > checking reserved bits. > > > > But maybe I should just wait for the spec update. > > Well, I wouldn't hold your breath (it would be an errata in this case anyway). > My preference would be to just allow allow mailbox payload size to be 2^31 and > not deal with this. > > My question was how strongly do you feel it's an error that should prevent > binding. > 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?