Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2038785ybh; Fri, 17 Jul 2020 07:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxMciiN0kKmtXSfDpxrRwn5O84CEnyJiAHoXIOGzy1kQyUpbwAI/VjBa9Q2EyvLmpb6v6W X-Received: by 2002:a17:906:40cb:: with SMTP id a11mr8568606ejk.340.1594997643208; Fri, 17 Jul 2020 07:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594997643; cv=none; d=google.com; s=arc-20160816; b=Lq/T0rXvAOE2XVFvC1L8HtqrPiDxddiooTg+O8Xdh2Mpag4A5L0jNKvddRpJw/ZjYa MAJlUw5q1p7pWCfDtUcncBznoHMt9YVaMKyRdphAC9Kx5w2qY6PLZWCFhs6HyxHSLQws /83y41RQ1t1EXTigTu7tx1IDD2knJoAmMpTiDAu0H85en32BNZ1wiNtJD+T93PGUQSMH AlmaZntC7hsQJkHkUiGUtEydTccfEZnutIhMFjTXn1BbQpzWeAMEcPbRI8uzU/GAdgCo AHIJqt0BoN6w3vDSGrF28kLT3qzQhZa0PpXmEYHjTS5bmIfmJAtwT42/fUBpO3+fc+yh NCNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ON61GZpwnUmjGyTeiFhdNin1BYrmUnLLBoNU0/UauWQ=; b=h7pnQxYPLW+l9UkwsZS4aWiHHy5h9P1w39q5zXaw96Smqr1d+6zapt4KWHOXRjK7WN BGZ+xqqgomUNVF/LCeTMgtMaQ2jAWKvpIOiNCB7q2l5cg4S1EgljGrpA8TVtGGDAC2H2 YF0fcdAWfPxuSceGM20+xdrhVgdH8k9GjAEL0PjY1sgtFJgHUIfWz+rZADnJk+x53d03 LPcvyxr02Ofwpbck9PXIr0mHvE4jNSUVI6m+CQZtoY6112LksJZoDtALxCTzA2oughdK viW5wg9R2pbD23Dqb84GiCjUo3l4idThipvfSZvnK822gSQLt1O67PNDxha61BKq/F22 6HnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mev.co.uk header.s=20190130-41we5z8j header.b=TCDYB7zu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b25si5193077ejv.236.2020.07.17.07.53.40; Fri, 17 Jul 2020 07:54:03 -0700 (PDT) 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=@mev.co.uk header.s=20190130-41we5z8j header.b=TCDYB7zu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726401AbgGQOxT (ORCPT + 99 others); Fri, 17 Jul 2020 10:53:19 -0400 Received: from smtp103.iad3b.emailsrvr.com ([146.20.161.103]:35254 "EHLO smtp103.iad3b.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbgGQOxS (ORCPT ); Fri, 17 Jul 2020 10:53:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20190130-41we5z8j; t=1594997597; bh=YNazr2X64J47Zs71qG1bJD53gaInVX9LWD2T4M7xB1M=; h=From:To:Subject:Date:From; b=TCDYB7zuZleX793vyEb6uMbZLk/A4zlzw43A1DVaNVhLJAlZoQOtLXq1RoQeAk0vr CfYKSDC6UpXblSfDkj0KNcHx0/HBb7AE0ZHZNxMpEEdH8uQdUL9YVfkZK2IBsAGn/K gH7G/u1HpkLZ4xQC8mIwdXOL588oqpSg/rqhhv9s= X-Auth-ID: abbotti@mev.co.uk Received: by smtp5.relay.iad3b.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 32D27401E7; Fri, 17 Jul 2020 10:53:17 -0400 (EDT) From: Ian Abbott To: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman , Ian Abbott , H Hartley Sweeten , linux-kernel@vger.kernel.org Subject: [PATCH 0/4] staging: comedi: INSN_CONFIG_DIGITAL_TRIG fixes Date: Fri, 17 Jul 2020 15:52:53 +0100 Message-Id: <20200717145257.112660-1-abbotti@mev.co.uk> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Classification-ID: 3cd28aa4-5d40-4a0c-a681-8cbccbead0a1-1-1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches correct problems with INSN_CONFIG_DIGITAL_TRIG comedi configuration instructions in various comedi drivers, in particular the use of unconstrained bit shift amounts from userspace leading to undefined behaviour (although hopefully not the kernel crashy sort). The patches have been marked for inclusion in the stable tree. Note that patch 4 changes a similar area of code to Dan Carpenter's commit ef75e14a6c93 ("staging: comedi: verify array index is correct before using it"), so I have indicated it as a prerequisite. *Note to Greg KH*: I have based these patches on your "staging-linus" branch due to the prerequisite ef75e14a6c93 mentioned above being present in neither "staging-next" nor "staging-testing" at the time of posting. 1) staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support 2) staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift 3) staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift 4) staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift drivers/staging/comedi/drivers/addi_apci_1032.c | 20 ++++++++++++++------ drivers/staging/comedi/drivers/addi_apci_1500.c | 24 +++++++++++++++++++----- drivers/staging/comedi/drivers/addi_apci_1564.c | 20 ++++++++++++++------ drivers/staging/comedi/drivers/ni_6527.c | 2 +- 4 files changed, 48 insertions(+), 18 deletions(-)