Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3047199imw; Mon, 18 Jul 2022 00:35:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4bw52ZB+2x+0SRQN1s9KGmv6pBkl9JkBOfMALq75MgfQeU6wQFar9lKxA8E1wfdU/jiuC X-Received: by 2002:a05:6402:1502:b0:439:e4a5:4ba9 with SMTP id f2-20020a056402150200b00439e4a54ba9mr35394284edw.19.1658129731001; Mon, 18 Jul 2022 00:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658129730; cv=none; d=google.com; s=arc-20160816; b=FXDYE4lNqrzjgUrv5PitqAOgAMiwYUTavTU9VHtckxfM5xA8ee+JfbX8VUNdjEhw+M 2hB0nQfA0+JzOPcWKQhWc7ejWFQApXT/exkLW+Bn9M7XNVPFM8DpozTqXJMt9m4tCtJ0 Ek79mAV2JEG16qkEua07vXPeMM/Ytqg04pe9zb6V79c2HjRdbDTGX+PkMAwVmdKuLD62 Ugs3dZhj3nD1dfEiUD+c5T3XVeffQNZCLTgSFPK3c3azP6UEscWIp/ZLitRauwue9Agw 4uRdJLoiOB33unWxS08jqOLqx3cLZB04ppF+VVEvf2ApeR9Hz0vj8C/KsVij2Z0WhByg Ut3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2AXYS7uCk/tVowuSjgrZBEKhXee01EBJjWQb+hibTD4=; b=WIjrXLGyvpsSDWxCGcI/WGBInjp3510oFAUcZ/S/SVwwI/51M3A4+peTBd99PlPB3k hH7gIMWy+hWXn8UfFWGpWCu1uwKbkDDzrzXNz5BWIz7VnMqHYqKZwKC7ctx/X2hTsaaI uj6ze1sVlyErIesQ/Sm2D2tNFkLxenfkpAnnHzUqaTVb4JtP7CMq3Mx3RTarkElF2VL/ nS7djQwXHeiDBoFJQy4GzND6cbXgLPzclh02xPPCPFhuPP+0Kce4/nzAU4fPyWMJYSK1 85Iw6gPWRDa2aJlcUJsklJaA2JyV+Jt2Xh0x/mbgDevAx+AQ8XE1aUoWzn0uMFAnRHdo 8iJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iYGUd4O1; 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 j21-20020aa7c0d5000000b004355e62629fsi13495902edp.157.2022.07.18.00.35.05; Mon, 18 Jul 2022 00:35:30 -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=iYGUd4O1; 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 S233726AbiGRHGD (ORCPT + 99 others); Mon, 18 Jul 2022 03:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233721AbiGRHGC (ORCPT ); Mon, 18 Jul 2022 03:06:02 -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 7EDD2101EF for ; Mon, 18 Jul 2022 00:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658127960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2AXYS7uCk/tVowuSjgrZBEKhXee01EBJjWQb+hibTD4=; b=iYGUd4O1C60XqQF3eTz7YnNBpUzY0MRjn+BRjxaO3+hEXg/PUrRa6MSV8VseBaCqCnqZsP 9Mb8l2ryOaJE+MI6XJFAPgJbvEfclsm0yh+1Z1JCbl2gqGP5C3a2DqiasXNE9kC2lahc2d 3KQWwcCFSOr0FRwOym80eiucGhYVIzA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-529-eIbNc7lmMPml5dtWSslBaQ-1; Mon, 18 Jul 2022 03:05:55 -0400 X-MC-Unique: eIbNc7lmMPml5dtWSslBaQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB28C1019C8E; Mon, 18 Jul 2022 07:05:54 +0000 (UTC) Received: from dreadlord.bne.redhat.com (fdacunha.bne.redhat.com [10.64.0.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 204F42026D64; Mon, 18 Jul 2022 07:05:51 +0000 (UTC) From: Dave Airlie To: torvalds@linux-foundation.org, Jonathan Corbet , linux-doc@vger.kernel.org, gregkh@linuxfoundation.org, Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.sf.net, Dave Airlie Subject: [PATCH] docs: driver-api: firmware: add driver firmware guidelines. Date: Mon, 18 Jul 2022 17:05:48 +1000 Message-Id: <20220718070548.2699395-1-airlied@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-3.4 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=unavailable 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 A recent snafu where Intel ignored upstream feedback on a firmware change, led to a late rc6 fix being required. In order to avoid this in the future we should document some expectations around linux-firmware. I was originally going to write this for drm, but it seems quite generic advice. Signed-off-by: Dave Airlie --- Documentation/driver-api/firmware/core.rst | 1 + .../firmware/firmware-usage-guidelines.rst | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Documentation/driver-api/firmware/firmware-usage-guidelines.rst diff --git a/Documentation/driver-api/firmware/core.rst b/Documentation/driver-api/firmware/core.rst index 1d1688cbc078..803cd574bbd7 100644 --- a/Documentation/driver-api/firmware/core.rst +++ b/Documentation/driver-api/firmware/core.rst @@ -13,4 +13,5 @@ documents these features. direct-fs-lookup fallback-mechanisms lookup-order + firmware-usage-guidelines diff --git a/Documentation/driver-api/firmware/firmware-usage-guidelines.rst b/Documentation/driver-api/firmware/firmware-usage-guidelines.rst new file mode 100644 index 000000000000..34d2412e78c6 --- /dev/null +++ b/Documentation/driver-api/firmware/firmware-usage-guidelines.rst @@ -0,0 +1,34 @@ +=================== +Firmware Guidelines +=================== + +Drivers that use firmware from linux-firmware should attempt to follow +the rules in this guide. + +* Firmware should be versioned with at least a major/minor version. It + is suggested that the firmware files in linux-firmware be named with + some device specific name, and just the major version. The + major/minor/patch versions should be stored in a header in the + firmware file for the driver to detect any non-ABI fixes/issues. The + firmware files in linux-firmware should be overwritten with the newest + compatible major version. Newer major version firmware should remain + compatible with all kernels that load that major number. + +* Users should *not* have to install newer firmware to use existing + hardware when they install a newer kernel. If the hardware isn't + enabled by default or under development, this can be ignored, until + the first kernel release that enables that hardware. This means no + major version bumps without the kernel retaining backwards + compatibility for the older major versions. Minor version bumps + should not introduce new features that newer kernels depend on + non-optionally. + +* If a security fix needs lockstep firmware and kernel fixes in order to + be successful, then all supported major versions in the linux-firmware + repo should be updated with the security fix, and the kernel patches + should detect if the firmware is new enough to declare if the security + issue is fixed. All communications around security fixes should point + at both the firmware and kernel fixes. If a security fix requires + deprecating old major versions, then this should only be done as a + last option, and be stated clearly in all communications. + -- 2.36.1