Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5748876imm; Tue, 12 Jun 2018 12:40:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLXBAUHrapOluIXF7kWm4d4ixvyNXdadVfoXeqTEqwfvR7upMND/CPls0AO3Xnn6zPHQvI7 X-Received: by 2002:a17:902:4424:: with SMTP id k33-v6mr1862628pld.242.1528832409959; Tue, 12 Jun 2018 12:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528832409; cv=none; d=google.com; s=arc-20160816; b=aSl4ZhkpTkylpyipa6WxXkRJSmDhhBKSKMrQw0XiHIpvJXMuPDMGnOuuZ9hIFcYOWV jCFsyNC5as6/YLFiBdNOc7L9ZQINnfuaUrZHnPtCxAkDbmAk4+1IkVySB4ulr5/8Ztwl SFZwIMitLBD0cw3AOVUGgtKWQGJQCzQcymORCOKxbVqhLacs9hZFGQyqVP5YFAWQb3a9 YkYTbCOiiGmzJrtBj21gsj7tWen1SSRGyvqJYHMrSQ+890ow2vnCFaEFsL5wNiYLvpSY CN4OT1UdjZTvMIrYGLLBlviBBgEC1Vfy+MPEEVTJa31waWrZjjQkBQu3FdVzTZ63KW5M W4og== 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 :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=Tg30631c7VsW83EyQ4zCQyWRcvmxf/UhwcvkSz+5aHw=; b=vNPmSbpJ6AjgYmjmuWXmtnCr6DhvsHBMzsFvec5/1cNMVvMOW6AzFIaojbh6RpI8Cb eQOfZ6Lghjhj0Gs7wDRU2kOVayOpyZ3ws44+vGk9Yh+SEmQUQVdIdaL/6ZFNPnV9JDG8 QZnNSq5xJfG8d+bWwYxb/XDdkC+8FgakVp8wWER33WBI3Sjp3lXJQksE7NE3nbl3aeLy Mm8sbjzL7f9aUeJTdrARtIeyIkiEt+ktBqCSmBiJHsdygi0XjUfZa4z4K6tN6TD14buC JX1fYpOBxtpuPZ8HR2qaSc+99VIXxnbCctuAl3JDANn+QBCVYlt+NvZF0bCN4d1Hxxxb CCxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=HXY3FJRw; 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 65-v6si794287pfo.229.2018.06.12.12.39.54; Tue, 12 Jun 2018 12:40:09 -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=@sifive.com header.s=google header.b=HXY3FJRw; 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 S1754312AbeFLTiN (ORCPT + 99 others); Tue, 12 Jun 2018 15:38:13 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34753 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754181AbeFLTiM (ORCPT ); Tue, 12 Jun 2018 15:38:12 -0400 Received: by mail-pf0-f193.google.com with SMTP id a63-v6so69223pfl.1 for ; Tue, 12 Jun 2018 12:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=Tg30631c7VsW83EyQ4zCQyWRcvmxf/UhwcvkSz+5aHw=; b=HXY3FJRw0mLWgEwY+STnQSmPBtb9POdAYK9Vgz5BH5Fzx1aukt/TuwLw8HWcRWjc84 G4lxcDPx6yt9EYex0V3vqxGr2BkxpXflX8a5h+qJ4zLvwy7Mk+KvVQzFb9UgtKdstIwr QgTKIPPTdkeBmXda9/1JcMxOvD5kZiDDzLMmI5kII25LGSmjJMWZuqdD8CuH0o8ZgnDN tbByA85oPj08G41kZVNahl0f0e3VlEQqq2iDXmv/eTcRfZUq9yWK/C80vnF2OxW9U92j uQQqRXrVV1tPlYzsR3Glv7WzgEPmnGmxFZoC2lAY0dXt/KjR7jMnXdA84jeLrrnwOtpG DgIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=Tg30631c7VsW83EyQ4zCQyWRcvmxf/UhwcvkSz+5aHw=; b=ZJ8aUvwU9iHiLGp2n6r6vbNAMqd/trohH8za26lGX9ceqgw1phsYM92ALpNOf8Dazw eViJWEIPKD19VrSe4Nz4mfMFbxw8K4ocKBnsPa/ya137dnlDxHJZEwi1T0f0TJvOWXQY J2X9D8LLib2PllW0vnIVhrH6kC+4Kjc0PAiXWp9z93Yk8IjdJBiGzxKXXDKOqpGqj6Nf bmTSwrY3W0lDVTYLPJ5a1rTtyYPZAqGAjgTgFpJ8Mo6TGDVyYESGzdM3NldpW7u3tAQc idW3+zdN/lQGVy2mqcsL9csgBB6CY7RvSO5/w9Y+fTQGyYFXi/rWqtVT8H1WNubYCyPx JZ6w== X-Gm-Message-State: APt69E0wj8bXKuzN+KZ0LPEem7n6fuwRO4f4BTNVZnRVlftvA8d4ZAMa R1o6Cx5GGG7zUp99r61hszwnsg== X-Received: by 2002:a62:234a:: with SMTP id j71-v6mr1707174pfj.221.1528832292205; Tue, 12 Jun 2018 12:38:12 -0700 (PDT) Received: from localhost ([73.93.152.169]) by smtp.gmail.com with ESMTPSA id k129-v6sm890796pga.94.2018.06.12.12.38.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 12:38:11 -0700 (PDT) Date: Tue, 12 Jun 2018 12:38:11 -0700 (PDT) X-Google-Original-Date: Tue, 12 Jun 2018 12:36:54 PDT (-0700) Subject: Re: [PATCH 3/3] riscv: fix __user annotation for __copy_user() In-Reply-To: CC: atish.patra@wdc.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, albert@sifive.com From: Palmer Dabbelt To: luc.vanoostenryck@gmail.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Jun 2018 11:19:57 PDT (-0700), luc.vanoostenryck@gmail.com wrote: > On Tue, Jun 12, 2018 at 7:12 PM, Palmer Dabbelt wrote: >> On Mon, 11 Jun 2018 20:00:08 PDT (-0700), luc.vanoostenryck@gmail.com wrote: >>> On Mon, Jun 11, 2018 at 12:01:37PM -0700, Palmer Dabbelt wrote: >>>> >>>> OK, I'll try and figure out what's going on. We've had a handful of >>>> headaches trying to get things like '.align 2; .align 2' to actually >>>> produce >>>> no NOPs for the second alignment directive, which is surprisingly >>>> complicated due to the aggressive linker relaxation we do. >>> >>> >>> OK. I imagine indeed but note that no linker is involved here so, >>> if the problem is still present, it must already be in the assembler. >> >> >> Ah, OK -- in that case then it's just not a bug. In RISC-V land we handle >> alignment as part of relaxation in the linker, so if you're looking at the >> output of the assembler then you'll always see a bunch of NOPs for every >> alignment directive. If you 'objdump -dr' you should be able to see the >> relocations that get emitted, there should be a R_RISCV_ALIGN that points to >> the run of NOPs. > > Ah OK. Indeed I see the R_RISCV_ALIGN. > Thanks for the explanation. No problem. There's heaps of info about this in some blog posts I made a while ago if you're interested.