From patchwork Thu Jun 27 05:04:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiunn Chang X-Patchwork-Id: 11018957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4275112C for ; Thu, 27 Jun 2019 07:11:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D411328A37 for ; Thu, 27 Jun 2019 07:11:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8F9828A39; Thu, 27 Jun 2019 07:11:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 820CF28A37 for ; Thu, 27 Jun 2019 07:11:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1D2C6E5D7; Thu, 27 Jun 2019 07:11:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id EB6C76E42D for ; Thu, 27 Jun 2019 05:04:28 +0000 (UTC) Received: by mail-ot1-x343.google.com with SMTP id s20so962839otp.4 for ; Wed, 26 Jun 2019 22:04:28 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=FWDmwpCTBQqLpDz0dRgn3YK1CHaVNxNkpin7tUBvoI8=; b=Spc5rVebhCIw4+MoFgXZoB295O9OhXxnXQLKEShtpByFgekDL6nVsvU8ytieNNM+bB iHRlcqSHcw7rOu8bR8pt730yReSjqGTQSgUZoERV4kuBAqJw3nYg5/hx0QPeiit2fUA0 0xZvKQLdneNOXPZtSVyQrn7TanbxPPcPWaYWWQxTeNPbVbwneZstHQbMmk2xkaQICpyq hKCzrgT9BVa5tChF8DsBy4LKKPiaDuIsNPa3bAPuhOK1UsIoHvfMe/EP4sAX3foNWRI1 GfaPv7TdmrYLg3xa8q/v1p/Pt6p8pxEi832G9LD/IqIcmeogmqRXod3hUYegTUC5YKW4 Y4qA== X-Gm-Message-State: APjAAAXAH5gUT/V54PbCpjQOShKPpA7DjzHOELeqVb/Dt8RgL2jomGre 4nny+QP2RKj4g2MyLQv1tV0= X-Google-Smtp-Source: APXvYqxrLE7yZDnXYq8JzwdSU6DtCWyCSdlSmxNA0lehODTbPsdrtJtZT2zNCR23dGuXBCCxzQHcIw== X-Received: by 2002:a9d:774a:: with SMTP id t10mr1613384otl.228.1561611868344; Wed, 26 Jun 2019 22:04:28 -0700 (PDT) Received: from rYz3n.attlocal.net ([2600:1700:210:3790::48]) by smtp.googlemail.com with ESMTPSA id v18sm613318otn.17.2019.06.26.22.04.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 22:04:27 -0700 (PDT) From: Jiunn Chang To: skhan@linuxfoundation.org Subject: [Linux-kernel-mentees][PATCH v3] drm/amdkfd: Fix undefined behavior in bit shift Date: Thu, 27 Jun 2019 00:04:25 -0500 Message-Id: <20190627050426.17925-2-c0d1n61at3@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190627032532.18374-3-c0d1n61at3@gmail.com> References: <20190627032532.18374-3-c0d1n61at3@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Jun 2019 07:11:26 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FWDmwpCTBQqLpDz0dRgn3YK1CHaVNxNkpin7tUBvoI8=; b=X7rsIl/Lss2UF+YgRBSZj01GMxecdMu3tEiMfl78ztSoQvqZHvCjEzk7tQc9zNb/IU dESlmnXn3eUZ9wzUSyVZis5KvkU9oyK3IlpkbQyXR45Oo8eWchGmS9pVGSSn5wvXvpaF NDB6eaeZy3GcUVDWhherRLmFoQS63A/rjfSh0E6QnFdQOSjsmpfFBQHqjzCu2CJ1skT1 QnszDP864mFYD+lYyRntgWflyUB72yb34+rOcjJailHP2qYD7TiLaRS7X7xutNCA2FZy 5xt7TKICFtWbVSCFq7QWILZJCkak+C2W1szmI616AYLR+ZQy46en3VpLr23eMQ4inwsG Gd3Q== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Shifting signed 32-bit value by 31 bits is undefined. Changing most significant bit to unsigned. Signed-off-by: Jiunn Chang --- Changes included in v3: - remove change log from patch description Changes included in v2: - use subsystem specific subject lines - CC required mailing lists include/uapi/linux/kfd_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index dc067ed0b72d..ae5669272303 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h @@ -339,7 +339,7 @@ struct kfd_ioctl_acquire_vm_args { #define KFD_IOC_ALLOC_MEM_FLAGS_USERPTR (1 << 2) #define KFD_IOC_ALLOC_MEM_FLAGS_DOORBELL (1 << 3) /* Allocation flags: attributes/access options */ -#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1 << 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31) #define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE (1 << 30) #define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC (1 << 29) #define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28)