Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp275074ybl; Thu, 15 Aug 2019 17:12:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3/g00Y6bYkuG5bduWiiNILaQe2rGyOnqlS8fGV7C72is2wxVn+0PbltlWp5DGiLsv56tu X-Received: by 2002:a17:90a:5884:: with SMTP id j4mr4762164pji.142.1565914320867; Thu, 15 Aug 2019 17:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565914320; cv=none; d=google.com; s=arc-20160816; b=oWtsjQMjUvwUCRbFg8tkpvaDutIfWiIk6DWKigtWIClJpXpPXb15zcXkPLz/fNlmS6 QfvH/SWROG9hp7WSGAF8obXOW84dKCamaFEitsPBCgx8nwzn9ReFiMoRR/SvMIT9iBDM EWAEuPmC+d4pidafrIAKWNhNn3MOZy7q3l/3acrCtsyZq2OOKTuEcXSD0tUNZxliEZe1 7MkC3qanLOeZUvut4kuljEdTXHOjobhnA9o/PpovPpguyYV187JEhUCgiiTliXb/V5EA kNOUM7iSRBD8QtxJbkk/rStZ2yvhLoNIamM6aozLEIuSMJ/TJFzGSzbx5KYSJL7jYJvH ewYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Bmhf8PVD5dJtgK9AddO0xa1upUkZ6UmEqObX9gGUygw=; b=jPh6ZJXbaJz5dHrW5jFlf29rsXfl5u7u4rZrE2BXPiY+H/cZDtwePpecLeX2mDfEad TSrD9gOzh2XdfM4Jmmpd+DclJJU0lfBhTOSVoMm0zH2v25szMNIrlJ+cctC0YkThHtDz P7X0NZ3zTpxSUL4IZ9Qm4dtQjNEOILajkuYEAaC9O1/Z2Fh5+PDOrYHMFGCtWXFhooT1 ij3nyKKgwcBDk7KoJ8RxKJduhOCA8m7mku9AI+OcbqJXNIalmOmRrflb/AjsidvcZ0vO 2CwkXb5CqpfvG9hwC7EkBh6i0oe9cw5TzvnMD3WkMk2ufDeuP5va8HMh4+1zTnCJMbN/ HQSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="g/cwtFRU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si992377pls.102.2019.08.15.17.11.44; Thu, 15 Aug 2019 17:12:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="g/cwtFRU"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbfHPAJy (ORCPT + 99 others); Thu, 15 Aug 2019 20:09:54 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39635 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725983AbfHPAJy (ORCPT ); Thu, 15 Aug 2019 20:09:54 -0400 Received: by mail-pl1-f193.google.com with SMTP id z3so1697207pln.6 for ; Thu, 15 Aug 2019 17:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=Bmhf8PVD5dJtgK9AddO0xa1upUkZ6UmEqObX9gGUygw=; b=g/cwtFRUJnie4vfNE+kfKj1lR1TiRyNEuVwdAY1iDM2oMDkvNQRPopBFt2AACv1B8z 983Gy7jmtLNUtCEhVXCX0aUFR0m7mYkc9iO4WydqOtvtn8OwfPTSoRaPcIBcLsbbjpTY nzPx9Gqd7qjNWuN/dFaJhHqps9pmNKWOvWrxA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Bmhf8PVD5dJtgK9AddO0xa1upUkZ6UmEqObX9gGUygw=; b=FZqhwX+hG56BrUl3XZVVlfS7aCg1jtramjn/dfYvr9NFZX0zzpFOtpD6jTjqf3HDbl fdmzIBJhXzR20dp7uWisE5N+r8gNorjJwS/4INb3MMq3d43l5FPLxHM28UxGZPcS6dzf KdQ3RxAsG8jonIzn7YnXRvZdk8ec+57M8CDnsAOPSlrxb0I5a6YEQzIuXYGGvffSVJmP xeWmzIh6sO+4GnGsEgjM3AWVIy8Hf6kJxxnSFDsdw1yX/dbxzUzVY3jWlnPwrzQU2w01 gQTBpBzKoYx4AclFf9oSVlilCJSGF3kl3BC/W+lW5pL9e9Qg5GmHMYC2NpMfQmD7CgY1 nJDw== X-Gm-Message-State: APjAAAW59h75ABQCc3Y5xqT0EOJzKEiZ2vgTXrjyJtcn7GOs14sdy++0 w7DL1efud+YwNscBAgt+sQhAJQ== X-Received: by 2002:a17:902:1101:: with SMTP id d1mr6747611pla.212.1565914193322; Thu, 15 Aug 2019 17:09:53 -0700 (PDT) Received: from lbrmn-lnxub113.broadcom.net ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id g2sm4056916pfi.26.2019.08.15.17.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2019 17:09:52 -0700 (PDT) From: Scott Branden To: Luis Chamberlain , Greg Kroah-Hartman , Andy Gross , David Brown , Alexander Viro , Shuah Khan , bjorn.andersson@linaro.org Cc: "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-fsdevel@vger.kernel.org, BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , linux-kselftest@vger.kernel.org, Scott Branden Subject: [PATCH 0/3] firmware: selftest for request_firmware_into_buf Date: Thu, 15 Aug 2019 17:09:42 -0700 Message-Id: <20190816000945.29810-1-scott.branden@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds kernel selftest of request_firmware_into_buf. The API was added to the kernel previously untested. Also included in this patch series is a fix for a race condition discovered while testing request_firmware_into_buf. Mutex may not be correct final solution but demonstrates a fix to a race condition new test exposes. Scott Branden (3): test_firmware: add support for request_firmware_into_buf selftest: firmware: Add request_firmware_into_buf tests firmware: add mutex fw_lock_fallback for race condition drivers/base/firmware_loader/main.c | 15 +++++ lib/test_firmware.c | 50 +++++++++++++++- .../selftests/firmware/fw_filesystem.sh | 57 ++++++++++++++++++- tools/testing/selftests/firmware/fw_lib.sh | 11 ++++ 4 files changed, 129 insertions(+), 4 deletions(-) -- 2.17.1