Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3044317imj; Mon, 11 Feb 2019 12:51:21 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibloc/IXcNXIOwRAbrw8r5JypQyXv1Eeikq7bnTaL+m7goEH+K7deGZYeSdylonp2mJklZw X-Received: by 2002:a62:f54d:: with SMTP id n74mr182088pfh.98.1549918281553; Mon, 11 Feb 2019 12:51:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549918281; cv=none; d=google.com; s=arc-20160816; b=hJNe42MI6wSnQTBBPGS5W7JIIPf8ECo4aU+GuNc65apLzQ6PURSDBoCYnWEmvN49kg V822jtNKIshJzu1ayJdZA1oYzREDCQPJPIqwvpcPgZi/9zA9f4ts3QDSzBeL195OShkf bXpWc6uABGzpdsXS5DvIM20Zc3vy3k0C14b6N5/G3mXo7cO3mH2Z6tZiXWHZBH01Sz0B ipbuLoJypA9JLwORpJV/Tean7tQLCFE5kkff+CsA8O9j+htWiEd0aJc0FVcERe7GwOxU 4xqff3FAIvgzYk+IdmvMzwCYgHRGms+4lKoI8IfuAcNqUY1B7nPVEIR5qNUTYiaJ+Rl8 yYug== 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:subject:cc:to:from:date; bh=cmP9AzIq5sFP52f1mAS4QPdh/uQRCzXt6MVt32R+AsE=; b=bRecOSLzgJmAH1gd+C6V71pRqB1LktZ6LmaDksrUbpxMR0O122tgaLQGBORxdFWPsJ TU0Oc8H/9ZXqoxKjDpKF6abz0YLHjvfNJWehpmkvToX+STaHbVADYpluSTrYfej9PmBS cPxF/ZYNWwrUwB8J3z1I13LIiyB+kY6wNms9TY4zwQHNmbhJv2Mv0o8tAZitY7gRaGlL mVJ8WeRbAJG/zE835W3S6XtdChvDq32u7EcOqVd2Hwfl+MOY/pd0/eYmohKkaMlAkoql J6oAHDVcUL3q71T3t8tKMgyIt982oJp/C2SX78nlzsHr3uDwWNcao8h/evfJvjqbCM9/ PQ0w== ARC-Authentication-Results: i=1; mx.google.com; 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 s12si10754648plp.194.2019.02.11.12.51.05; Mon, 11 Feb 2019 12:51:21 -0800 (PST) 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; 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 S1726955AbfBKUtc (ORCPT + 99 others); Mon, 11 Feb 2019 15:49:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:56254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbfBKUtb (ORCPT ); Mon, 11 Feb 2019 15:49:31 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF543218D8; Mon, 11 Feb 2019 20:49:30 +0000 (UTC) Date: Mon, 11 Feb 2019 15:49:28 -0500 From: Steven Rostedt To: Andreas Ziegler Cc: Ingo Molnar , Masami Hiramatsu , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 RESEND] tracing: probeevent: Correctly update remaining space in dynamic area Message-ID: <20190211154928.6c99e4f2@gandalf.local.home> In-Reply-To: <20190206190013.16405-1-andreas.ziegler@fau.de> References: <20190122152634.18957-1-andreas.ziegler@fau.de> <20190206190013.16405-1-andreas.ziegler@fau.de> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Feb 2019 20:00:13 +0100 Andreas Ziegler wrote: > Commit 9178412ddf5a ("tracing: probeevent: Return consumed > bytes of dynamic area") improved the string fetching > mechanism by returning the number of required bytes after > copying the argument to the dynamic area. However, this > return value is now only used to increment the pointer > inside the dynamic area but misses updating the 'maxlen' > variable which indicates the remaining space in the dynamic > area. > > This means that fetch_store_string() always reads the *total* > size of the dynamic area from the data_loc pointer instead of > the *remaining* size (and passes it along to > strncpy_from_{user,unsafe}) even if we're already about to > copy data into the middle of the dynamic area. > > Fixes: 9178412ddf5a ("tracing: probeevent: Return consumed bytes of dynamic area") > Signed-off-by: Andreas Ziegler > Acked-by: Masami Hiramatsu > --- > I applied it and will start testing it. But just an FYI, please send new versions of a patch as a separate thread. Sending it as a reply to is likely to have it get missed, as maintainers usually search their inboxes threaded, and only look at patches that are the start of a thread. I just happened to have this one marked to look at. -- Steve