Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1559094ybd; Wed, 26 Jun 2019 20:35:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/8TQ7awJH12U8qNqL3ulQ8KTXim1NoUA6UNInGTmYbqHb9S9f2hI5ZjI1iG5FO0mZHokS X-Received: by 2002:a63:4103:: with SMTP id o3mr1470205pga.385.1561606513895; Wed, 26 Jun 2019 20:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561606513; cv=none; d=google.com; s=arc-20160816; b=YDRLth5moQoSskPNIdVPajvLlWmrEdfmPPImxVaJOBByzbccG98IQWVrWfCv7hPs59 hxUw0exlcAlD+F4ubDljOPLvajX6fjzRb0DZ5XE6HPDy+GBT22dVz66rUc4CT6AG/X8D gYaGvcHR5hHFapZnPx6F41o0Gjt5LaQ1n4BIck3H6oUlIRwK4ZuA2z/E8jHQcTQ1XEtC DR3AeIXU7GSoH0DOE7gjxEPJyPt/yJOFKMfTmGqFnepXEa6E0nBHtOcA0MYgTlVpGena ryr46MOHshNDHe10ae/RjKP58Of69RNc/FHW/sU9GJpQokh4qqtG1YXwXzJqLzEi0hH9 yvKQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=XF+G4LWc6yTM0hyPsvbwF5/LSakqPeCeR1RaSYQ/rMM=; b=S73PvaJZFZd05X3qlybSwb/N9Uw2yvo+K/PN36sz3wzQy89kHIpmx0S12nl6vaEqSJ aqP/YpLfqpDGQH1/lEi7X0LeE9wrYJaT8L4GKc70TF9EDez+lx+mM0VfHCHU8NN5rFap gFxwb2SrLnSQ26l4RBnm8z6IagmURTzm37FeBNZnSQpDEryaLMJhkvvgdw0pEnaZlrkR BJ4FXwXlkzJdwrGY3tzFuADjlU1xFzqer1tpAZTp4SCPbnWhznYY4K9Qexy9xRz+yhc2 Dzl+8nHAz1qSfZFI/1KWuNnWC7RD5zjzs/6oNlr5IZ9GsuMdQL+kjTLfZJBpSplC1EGs 4ZZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="Gtk/s27N"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si1213797pfr.52.2019.06.26.20.34.41; Wed, 26 Jun 2019 20:35:13 -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=@linuxfoundation.org header.s=google header.b="Gtk/s27N"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727016AbfF0Ddq (ORCPT + 99 others); Wed, 26 Jun 2019 23:33:46 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:39777 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbfF0Ddp (ORCPT ); Wed, 26 Jun 2019 23:33:45 -0400 Received: by mail-io1-f65.google.com with SMTP id r185so1560272iod.6 for ; Wed, 26 Jun 2019 20:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XF+G4LWc6yTM0hyPsvbwF5/LSakqPeCeR1RaSYQ/rMM=; b=Gtk/s27Nxe/bxqfxezqklb5PLo4t4BYzFBlEZXxwx5hLrBG8QMBJwhXV2kuiXyBl4G EPCP12KLE805t0XFmIbOyGfB8KAL0T0thPeyBaseCHIaQA4XpZ4EgVrkMrlHhDRMBihx SZeFnEfbuAlYUB1+NtR91+lfPpWqbXcxxeX/4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XF+G4LWc6yTM0hyPsvbwF5/LSakqPeCeR1RaSYQ/rMM=; b=VJ8BPctbrybkSBB/Ksi2FN4jnhu15LIqpgMGLRm1Qumez3rSMBFU9aBM2oiGIQ/Toh WYvJMFZdwnfkuAQPOGjuVRnGNzz+u/U+O8FQVvvyLtnzus8Hi8q+sdXlFlV5kqvQG7Jc X4u/0grk2iBOhQ1X0eQqgmkmBKXc4ZUXw5l8ueQ7zKpqY38oRgjj8h3FhQuVndFGB//G 1fsFcrCkbEyRCWCoFeLN6/2r8cH7b1VcCb3WJ1EY5sn4//rp4HH6SF6i47yUKg8FUpcE 9Hjo9Dx9/Jb6+vgpclqC+WeNGb6DTORuMg6bsCu/PEHLNP5vbWhWcdsLlzNEpE8hVCgN Suag== X-Gm-Message-State: APjAAAWWyyD5V/hQJFgUx2gJ54aa4gB4hDA6T8YIh/wbxzHCihWAbmKv Kq6fTn7d5KJZTwmDOKGVHI3hig== X-Received: by 2002:a5d:968b:: with SMTP id m11mr2069612ion.16.1561606424694; Wed, 26 Jun 2019 20:33:44 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id c17sm778788ioo.82.2019.06.26.20.33.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2019 20:33:44 -0700 (PDT) Subject: Re: [Linux-kernel-mentees][PATCH v2] drm/amdkfd: Fix undefined behavior in bit shift To: Jiunn Chang Cc: linux-kernel-mentees@lists.linuxfoundation.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, oded.gabbay@gmail.com, "skh >> Shuah Khan" References: <20190627010137.5612-3-c0d1n61at3@gmail.com> <20190627032532.18374-3-c0d1n61at3@gmail.com> From: Shuah Khan Message-ID: <59d3169d-4c74-4e75-7a48-93c0e99ae1f2@linuxfoundation.org> Date: Wed, 26 Jun 2019 21:33:43 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190627032532.18374-3-c0d1n61at3@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/26/19 9:25 PM, Jiunn Chang wrote: > 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 > --- Move version change lines here. > 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) > thanks, -- Shuah