Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbbEJTm1 (ORCPT ); Sun, 10 May 2015 15:42:27 -0400 Received: from mail.sigma-star.at ([95.130.255.111]:14385 "EHLO mail.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbbEJTm0 (ORCPT ); Sun, 10 May 2015 15:42:26 -0400 From: Richard Weinberger To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org Subject: vsprintf: Add support for userspace strings Date: Sun, 10 May 2015 21:42:14 +0200 Message-Id: <1431286936-4333-1-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.8.4.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 775 Lines: 17 While debugging issues I often add (trace_)printks to strategic positions. Dealing with user provided string is complicated as an extra buffer a copy_from_user() is needed. This adds a new format string to allow direct printing of such strings. My initial plan was to use %pU but 'U' is already taken, therefore I used the next letter which comes in mind when one thinks of userpace, 'L'. The %pL format string works exactly like %s. [PATCH 1/2] Fix printk() on ERR_PTR() [PATCH 2/2] vsprintf: Add support for userspace strings -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/