Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp763925pxb; Tue, 5 Apr 2022 22:18:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBws9iYSKaKBTHvTfjTtwfX78gZpSp2cr8CtG5Dz0bInrjCJNSivpbkTuTocrAf4h2oEMq X-Received: by 2002:a63:1f55:0:b0:382:65eb:3073 with SMTP id q21-20020a631f55000000b0038265eb3073mr5835431pgm.624.1649222307163; Tue, 05 Apr 2022 22:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649222307; cv=none; d=google.com; s=arc-20160816; b=HIv3is+LC1oKGYKZU5Nsf7l1Sb4NuaPo1Do4m22Os8+6dNC61i5EwQuk0aMUij7GFi RLbGZf87RSOY14iRB2QCFRGBw3Ul1ZI/l68PA8VFzVPC7Ep4U2miNTSQ2LS4OQ4FY5J4 cRFMjmEC1ZpTdVNxSQVhSt9UOclXt79ml6jGrqYhLJEAQBbFuKlQVa6+Ugdnt28C+nD3 zFZvcXOmMQl6hO7waJA+RDu0Yqyj8H6McLg/nkHsg915QIya69FMyCJR70goCOQKJuZs B+dPwB77zNTxGI7zumDmIs0AHNFYYk9lrchfwb4MLkPLBBK/Hpdhi5GYOzctB9lvCGgu 8mwg== 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:to:from:dkim-signature; bh=Hu6/55Y5RP0JeHRRHFzJWTLf8RYPBg7nbGCBlr4S73o=; b=ZhvsV8npotPz8g9cv4Fs9g5UQK+m/fV0o5GGquOTEQWy2oE4K57oo7nT2aEUhtqL9H aMuQRMFfZQHvq+3E1V0khzmP8giDUatHvt0pylv61dM9k+WFpliOgrLhG+dL/FH1awSa DUhOF0ExTEgaa6lAFGR5ZyloxnFLTkttySD/O/byHKA0OPt6G3D2Rd4TZ6rKMYumAsoT u/xD68gA+o0NL5sF+n/tpxxvIoUan9gww1F4qCkeOkF1GM5vhSOhITkhDpuEGqUxtwNg beOh6YZsne5s0q3BRbAiZ/CEGji1F3K7wOy6zzdE9LLg8APf0tWgpksCZJsi4RHu4ZER IUCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MnDYNBG2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p19-20020a056a000a1300b004fa3a8e004bsi15113707pfh.258.2022.04.05.22.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:18:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MnDYNBG2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6409D3441A0; Tue, 5 Apr 2022 20:45:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445765AbiDEUIo (ORCPT + 99 others); Tue, 5 Apr 2022 16:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1455441AbiDEQAC (ORCPT ); Tue, 5 Apr 2022 12:00:02 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1133E17077 for ; Tue, 5 Apr 2022 08:15:29 -0700 (PDT) Received: from zn.tnic (p2e55dff8.dip0.t-ipconnect.de [46.85.223.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F21321EC04AD; Tue, 5 Apr 2022 17:15:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1649171724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=Hu6/55Y5RP0JeHRRHFzJWTLf8RYPBg7nbGCBlr4S73o=; b=MnDYNBG22EWthkUZ/Ya63+V8MCVMmDtfcDxQItzPpBKA0JdMvsrm3P8FFsQ3YUnama26/p Ot7+9BAebypZI1hG1PVISCd2eCHJECNaDOg9OBvmKFaVjqSM/Oft4sjf9A2M/35kxznZIP inB4ZisU32YbZ5siQHNo3JdtyjO1oic= From: Borislav Petkov To: LKML Subject: [PATCH 00/11] treewide: Fix a bunch of shift overflows Date: Tue, 5 Apr 2022 17:15:06 +0200 Message-Id: <20220405151517.29753-1-bp@alien8.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Borislav Petkov Hi all, so this is the result of me trying to make allmodconfig actually build here. Due to some recent changes which added -fsanitize-shift to the build options of an allmodconfig, it started failing here with an old gcc because getting an overflow while shifting is undefined C99 behavior. gcc warns/errors out with -Werror about this only on newer versions where -pedantic is present while older ones do so even without it. The whole details here: https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic Fixing all those is trivial so please pick up at your convenience. In order to avoid spamming people unnecessarily, I'm not CCing everyone on each patch but only the relevant maintainers and lists. Thx. Borislav Petkov (11): scsi: aacraid: Fix undefined behavior due to shift overflowing the constant ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant bnx2x: Fix undefined behavior due to shift overflowing the constant drm/r128: Fix undefined behavior due to shift overflowing the constant i2c: ismt: Fix undefined behavior due to shift overflowing the constant brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant usb: typec: tcpm: Fix undefined behavior due to shift overflowing the constant mt76: Fix undefined behavior due to shift overflowing the constant perf/imx_ddr: Fix undefined behavior due to shift overflowing the constant IB/mlx5: Fix undefined behavior due to shift overflowing the constant drm/i915: Fix undefined behavior due to shift overflowing the constant .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 2 +- .../i915/gt/uc/abi/guc_communication_ctb_abi.h | 2 +- .../gpu/drm/i915/gt/uc/abi/guc_messages_abi.h | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 2 +- drivers/gpu/drm/i915/i915_reg.h | 18 +++++++++--------- drivers/gpu/drm/r128/r128_drv.h | 4 ++-- drivers/i2c/busses/i2c-ismt.c | 4 ++-- .../net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 2 +- .../broadcom/brcm80211/brcmfmac/sdio.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2/pci.c | 2 +- drivers/perf/fsl_imx8_ddr_perf.c | 2 +- drivers/scsi/aacraid/aacraid.h | 2 +- include/linux/mlx5/port.h | 2 +- include/linux/usb/pd_bdo.h | 2 +- sound/usb/usbaudio.h | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) -- 2.35.1