From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964781AbcEXUPL (ORCPT ); Tue, 24 May 2016 16:15:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35711 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753771AbcEXUPK (ORCPT ); Tue, 24 May 2016 16:15:10 -0400 Date: Tue, 24 May 2016 13:15:08 -0700 From: Andrew Morton To: Andy Shevchenko Cc: "Theodore Ts'o" , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/1] sysctl: introduce uuid_le and uuid_be Message-Id: <20160524131508.7277546c9620a0ad080f1e19@linux-foundation.org> In-Reply-To: <1464110847-41097-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1464110847-41097-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 May 2016 20:27:27 +0300 Andy Shevchenko wrote: > By default the sysctl interface returns random UUID in big endian format. > Sometimes it's not suitable, e.g. using generated UUID for EFI variable name. > Provide uuid_le and uuid_be to comprehence that interface. > > ... > > drivers/char/random.c | 44 +++++++++++++++++++++++++++++++++++++++++ > include/uapi/linux/sysctl.h | 4 +++- > kernel/sysctl_binary.c | 48 ++++++++++++++++++++++++++++++++++++++++++++ Why does the kernel need to do this? If userspace wants a random uuid then it can grab a random number and cook up the UUID itself.