From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8208813B2A9 for ; Fri, 17 Jan 2025 23:23:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737156228; cv=none; b=VSJzlbYmela7HG5iT36ITuF2xl+HwFSqbG/0ZH5DteDOjgGIP8br7LJ5MFOzKm7lHI6WDln9Sjps4szVisBxf+c/XP4rgWQpjl1EZnAOipCZnFxZNWWEoh/PmFWDQ1Ya/p365x/bv0BRhQnHIxhwOvkU6wepib1Cn6FM05UCzag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737156228; c=relaxed/simple; bh=4qw9zasAdumJQreYlEGzii+1i5MWC9b3PWgW1KzfwtA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tixsijXYGU7Voopj6dRw2h+8LK5lEeo8G5BopMq8QnRUN3pIUh7YO3/cqRE8eDKsztshqq1S5O2ync7hbkr1A622QFwBV5rcWebeX/g19rtY7LWseK0iWHK8R2PFMb2PtshG9qJ+fEjMDWJfmAJzekMsvW/2E41FcvDHSYOF+i8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=eTO99ycu; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="eTO99ycu" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2eec9b3a1bbso3767122a91.3 for ; Fri, 17 Jan 2025 15:23:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1737156226; x=1737761026; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2g7uPS7l369Xp/WzwXqZsADqltx6Sgke2pqtS9ZK76I=; b=eTO99ycuktm+Oir0HvdNEg5HozF52SgFgS4AnLoiQva2dKbHonGRQYnmCcl1kQL89D SwXdc5RRjhJzxXL0/10Uum+cTpQb77WzOsY2leQ2B3b96kwt2xzTwsmhOzaTqqcZk5J5 PcgzefaLUvUomxDt9KtHS7pRB9c1xsg68MRvCZmcW23bmDiLXGhmj4qdQyq0kpom3NSn zNd8L+2vbLFBhPa1cDv9WXJbTZO89Ze33whvJI8t9ldNfsm/+d3DPEM7Wy7xSmaYtBbX 6DSxrY0h7udLCHCfH3T8fGMHxNMNCX4y6jOGbag+CtxFCVY/b3vWlJAyWyIo5rrnjgJm /d3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737156226; x=1737761026; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2g7uPS7l369Xp/WzwXqZsADqltx6Sgke2pqtS9ZK76I=; b=hcTYhSfRm6uO/iYsmBAS9Gjah0tUkZvwbju0qCsdpKvceGu+DsAIONuumBSqaDqyFb oImJXPv7d4ikDYxiIFPR07xMY2zn9Lwgmd4IbBlGRTf81DOiGlS/+zXC7FZ/piJcooch at73ZktjWcUbTa19hkFrZqQhOIbfBfUsWLTEesU6PgwvzhBf1MLOn+2iXtUyo83m9JKv WXRsHmHT3+fgGA4p2ED/4/0jnBsr7XsYWOEloW1KVdjp6QKGWU3nsWr6a5P5CqX09gD0 I37RVKps0is/qgTWgOQEMyLVROq8e+OWlGTdrt52+8bRU7IYQlRt0lrxb3DLpfPFIbLD BwPw== X-Forwarded-Encrypted: i=1; AJvYcCUpqY8PVAJ8FDtfafa7nN4yxZQKPtCTV3EUZEn9qSg71jA4aw9n5NCkbQLU/Pjal3+td0iA6ZlZX8eeO6M=@vger.kernel.org X-Gm-Message-State: AOJu0YyibyuS1Pjekt4UwPuQngOIkbpmm3n/ye1bCF0VJWOi1WVi6OC0 tpQ7kgSbF8vHtNsjzEFn9329Wm9EIw8EcP1lRR8XL0qqjPbIpGltNY44BUD5y7U= X-Gm-Gg: ASbGncvpPSQIPne6lQOTcAlvFmaFxe7L5sWMELeqGDZ7o7YbhmotCtswicLmGKtbmjb jZ8th//q8iz45ym8xRIgjkdex9UNJ3QTL5HaIacF2M2gpGtqkOFj6XxfADevzv+00c4uKX0mSKo Kz3xMmbGzUHMHLiRjqzHy7nfkFlsTbNWMXN6Sr2ifdcZYubzZB4HZK3MU1PPywvj1x01KStx/TZ YAPohmxlUUgGLZ4CCpzx4cE5eVlUwJls40Qo2QyZTZ974TV8ueIAdv9KGttIxHQow== X-Google-Smtp-Source: AGHT+IEOq8mrjqUuZCufSFpk3amjPIq0Jj582Q/6h/I0ya6KwF3n+BqcqOQSSTesaySgbMeJp5DhdQ== X-Received: by 2002:a17:90b:514c:b0:2ee:b666:d14a with SMTP id 98e67ed59e1d1-2f782cb50b1mr7460014a91.17.1737156225826; Fri, 17 Jan 2025 15:23:45 -0800 (PST) Received: from ghost ([2601:647:6700:64d0:d0ea:9b9e:5556:aa82]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f776151585sm2952121a91.14.2025.01.17.15.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 15:23:45 -0800 (PST) Date: Fri, 17 Jan 2025 15:23:43 -0800 From: Charlie Jenkins To: Cyril Bur Cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, paul.walmsley@sifive.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Jisheng Zhang Subject: Re: [PATCH v2 2/4] riscv: uaccess: use input constraints for ptr of __put_user Message-ID: References: <20241118230112.2872978-1-cyrilbur@tenstorrent.com> <20241118230112.2872978-3-cyrilbur@tenstorrent.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241118230112.2872978-3-cyrilbur@tenstorrent.com> On Mon, Nov 18, 2024 at 11:01:10PM +0000, Cyril Bur wrote: > From: Jisheng Zhang > > I believe the output constraints "=m" is not necessary, because > the instruction itself is "write", we don't need the compiler > to "write" for us. So tell compiler we read from memory instead > of writing. > > Signed-off-by: Jisheng Zhang > Signed-off-by: Cyril Bur Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins