From patchwork Thu Jun 27 03:25:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiunn Chang X-Patchwork-Id: 11018983 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 72D32112C for ; Thu, 27 Jun 2019 07:12:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 624C728A07 for ; Thu, 27 Jun 2019 07:12:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 572B328A3C; Thu, 27 Jun 2019 07:12:40 +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 2038028A07 for ; Thu, 27 Jun 2019 07:12:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA0C06E7EA; Thu, 27 Jun 2019 07:11:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 751586E591 for ; Thu, 27 Jun 2019 03:25:36 +0000 (UTC) Received: by mail-oi1-x241.google.com with SMTP id s184so473454oie.9 for ; Wed, 26 Jun 2019 20:25:36 -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=DspknQs36A/5uQZX53aWrrdTwDH7n/43l0dEQF/NX0g=; b=rZZgXcfQ0O+uPgnIn15E6BFKUHAa52oOXXXXgmCg0098dm1TLc2tF3nLlE/iXA0LJe vPYPy4O2uOspZdM8ty4t3FIJHYTNRNdgSYq6UEYCuNLtoMl9c/4b0rEQPHcPf2F4h8t0 MtHQW8xT2EpG0MG6yLVzUJk2aEMXJIlTLuOew1iCY7uKKZvm2A1KrCe505I9gw9igi/O ERoET++XXJtCddP18Xjy0cCa58jhgC9596LaBSeblTqYU3YCGREoJxSgH3AbfhleeIAL FLACJZqDIXX4gKc2KWKkUCXDMnr2hVCiDBu9BE9D3VQXTpMpoafVKcuf56Tfd38gUhWC XPuw== X-Gm-Message-State: APjAAAVlAAud1Vnx6ollwNXFgkUU6xxbFApPxatLdo8GdBTUwqsA8Tyu O+N4xB5A9kE6pjQhyiy6dxo= X-Google-Smtp-Source: APXvYqy3hg34R0jgTYAW4T1SMDgeAtq+nnmQVEoxqu2nLKH+jbuWe+E3KiBTJky9/6oXvYkKTVdf0Q== X-Received: by 2002:a54:4f95:: with SMTP id g21mr303543oiy.23.1561605935712; Wed, 26 Jun 2019 20:25:35 -0700 (PDT) Received: from rYz3n.attlocal.net ([2600:1700:210:3790::48]) by smtp.googlemail.com with ESMTPSA id y184sm417647oie.33.2019.06.26.20.25.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 26 Jun 2019 20:25:35 -0700 (PDT) From: Jiunn Chang To: skhan@linuxfoundation.org Subject: [Linux-kernel-mentees][PATCH v2] drm/amdkfd: Fix undefined behavior in bit shift Date: Wed, 26 Jun 2019 22:25:31 -0500 Message-Id: <20190627032532.18374-3-c0d1n61at3@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190627010137.5612-3-c0d1n61at3@gmail.com> References: <20190627010137.5612-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=DspknQs36A/5uQZX53aWrrdTwDH7n/43l0dEQF/NX0g=; b=FnmR6S3UdvxSAXrt4YakXY+vA/wkVhU4l9+b1MXMa7h47IiKVdslEShfoIOjhVAu+A CHE+plwYBAfdLkY7mCGM2sBx+LHdtyh3KQNMcT1egYV6b3/82KUnTlGJIm9IcfZlGrvE aYCkPHKdxlFQGh5+5WTbawbIFIJHDRsskbAp6a3oQn1XcLXFfDDAdcZXF3kIA9xExHUD uW4jwOgqNAC5JiKaqpKFNetlim8XkuaYVoStRsdp9W9uFkc76yRwEJ+5UrYEF9VB67jy YpT8T+29gg6/tS9FTzjwY9s/5T8VjnjN6HxxkfONF+7Hvs5DNjJdgS0MRRlk0Z3uH1Qc IG9A== 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. Changes included in v2: - use subsystem specific subject lines - CC required mailing lists Signed-off-by: Jiunn Chang --- 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)