From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 920BD17744 for ; Mon, 15 Jan 2024 14:26:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ru+awAXi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705328796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c+AgqPT1yRF7nplxdLHxfTFfqV6C8yg9/yypQbcOtfU=; b=Ru+awAXiokY1KBfWf5jKw6e6fdaFGLWPxjlaSnz+JDDkT61alPJZXI6x5mqzeKZ0yHGiph p/Rciudoqg/9GYPvGer2Zv1uumOjBCtpW9l2KJ8ayv6yc6o8sopL/sFMPVHvDUfpOaNwIZ OPFfYk6B6N+j/FuS6ZWyksb1ydg0Iw4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-XIHLj4hcNSWG5cYndluMWw-1; Mon, 15 Jan 2024 09:26:35 -0500 X-MC-Unique: XIHLj4hcNSWG5cYndluMWw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 769BC1025887; Mon, 15 Jan 2024 14:26:34 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.7]) by smtp.corp.redhat.com (Postfix) with SMTP id 007421C060B2; Mon, 15 Jan 2024 14:26:30 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 15 Jan 2024 15:25:22 +0100 (CET) Date: Mon, 15 Jan 2024 15:25:18 +0100 From: Oleg Nesterov To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Ryan Roberts , Andrew Morton , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Namhyung Kim , Ian Rogers , Adrian Hunter Subject: Re: [PATCH v1] uprobes: use pagesize-aligned virtual address when replacing pages Message-ID: <20240115142517.GB18072@redhat.com> References: <20240115100731.91007-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-perf-users@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: <20240115100731.91007-1-david@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 On 01/15, David Hildenbrand wrote: > > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -537,7 +537,7 @@ int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, > } > } > > - ret = __replace_page(vma, vaddr, old_page, new_page); > + ret = __replace_page(vma, vaddr & PAGE_MASK, old_page, new_page); Acked-by: Oleg Nesterov