Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1628514ybd; Wed, 26 Jun 2019 22:06:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0jJYlpWauy0Lo5fO3CphBwhrNVBFIG4wrr1WjgCzmzK++LueOkoACN+h9oemj6wdmbRBR X-Received: by 2002:a17:90a:338b:: with SMTP id n11mr3575938pjb.21.1561611963521; Wed, 26 Jun 2019 22:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561611963; cv=none; d=google.com; s=arc-20160816; b=DDgNCPL24N9R7cJcwrDCLfwZFJHA6wqzzx10JHiof1CCr49xkUlJYc05x2hCsuR3/F N1NNGMKUBc7IW/a155UJNYsNRKsbW/9L6LpnlNY4gDVMjD2XGSJvw56uiTRm4zWkqXST 2ttHbyYy6fPBrOmYbzdp6Zw04KL+vR2OQlFH0GrnIHdSGoTU9n1sVBKDOk8X+ppZvLGP WLth2b6yWRIvhDzNXl+1rmJlNn8HN2yY/OlYmvHKdUGZjaKMYTAUIGOvAjWojzKmgHk4 8GJchWRDsaw6S73rw1TX1QKM2ZbCkJo+09GHSlJ6Hk2X9PKq6Uw6AApTV78ZAQpqg0Si qLGw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FWDmwpCTBQqLpDz0dRgn3YK1CHaVNxNkpin7tUBvoI8=; b=rcTCXpDl4phBW1xkQCPZd77ievfIJyOu8ehLbsFid95feKzHfWKASNIFvHSZwkwBwP OYJGSbSKrOZM3v2lV/pfeeEpKoyjY5Wfj7ZuZ5KWjJ7qc7Xl3OdyJWapQKBk58LI3ZTV HIWQwn/P6VicZ0y/mpJa4YNzX1WH84BHubw1PHOCWAQJCLCaUMahnJYbIse5maI3Niyl ZKMT7x90iK1+4Xh4KQ7Ih6EmW9wlYDbYwvCDZIykkLUw5KTrvfU/LbHA1wsROcnRhiGt WpMXtQhYYcOCZhb7/E3K82em1sSkjloPPULV0Oj/nNGRycACmJ0HFbNqumQSYyJI2yKU 1CWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="X7rsIl/L"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si1677177pff.30.2019.06.26.22.05.17; Wed, 26 Jun 2019 22:06:03 -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=@gmail.com header.s=20161025 header.b="X7rsIl/L"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727243AbfF0FE3 (ORCPT + 99 others); Thu, 27 Jun 2019 01:04:29 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:46769 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727138AbfF0FE3 (ORCPT ); Thu, 27 Jun 2019 01:04:29 -0400 Received: by mail-ot1-f67.google.com with SMTP id z23so916049ote.13 for ; Wed, 26 Jun 2019 22:04:28 -0700 (PDT) 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-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=oklS6wgznk9/Ap+hn7BeLduLhdy0hBH0q1V6k0gCjqffzCGRGBKf+ax6zA96I0sOet ltURF3l4HZN5rBIJpcdKmnXTQMY7qBYl9lBJ5KltvTHtx+JNp8G5pqWY9cwCDB8K+uU8 a9PP68H5BVJ3SHseXkkWwnYandeq2BfCsWcmJEusOl6QBxOx1yBnoxNjh2Aj3XrVbqEF lEIe8A7rsiIGGFQBrn0JZnVAx2JOzGV1MUGM7HR68/RodLGV+iqf4phy1P/LdFaZg9qO 4zhIsRgfsxIKcQRgRPi1CEs01Q8GPjOd0+Bp4oNbQLPri+HfA2mZ+EdnllbE0JYlUf7i WlyA== X-Gm-Message-State: APjAAAWJJJDBBcbaI1VJKn3jfBK5/8wpfKr7rWly7heE2DWFvF0DE5/v ed/e28cW1On+02VlQAU6hT8= 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 Cc: linux-kernel-mentees@lists.linuxfoundation.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, oded.gabbay@gmail.com 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.22.0