lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Jul 2011 13:42:58 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	Greg KH <gregkh@...e.de>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH 2/7] debugfs: add debugfs_create_int

2011/7/5 Greg KH <gregkh@...e.de>:
> On Mon, Jul 04, 2011 at 02:31:25PM +0900, Akinobu Mita wrote:
>> 2011/7/4 Greg KH <gregkh@...e.de>:
>> > On Sun, Jul 03, 2011 at 11:16:16PM +0900, Akinobu Mita wrote:
>> >> Introduce debugfs_create_int() for creating a debugfs file that is used to
>> >> read and write an int value.
>> >
>> > Um, what's wrong with the existing s32 and s64 versions that debugfs
>> > already provides?
>>
>> I couldn't find s32 version in linux/debugfs.h
>>
>> > userspace doesn't know what "int" means for the kernel as it might be
>> > running in 32bit mode with a 64bit kernel.  That is why this isn't a
>> > good idea, so please convert your other patch to use the existing api
>> > and change the variable type in your patch.
>>
>> Shoud I add debugfs_create_s32() instead of debugfs_create_int() for
>> this?
>
> Does it have to be a signed value?  If not, just use the
> debugfs_create_u32() function.  Or use that and just cast the result,
> right?

The debugfs file that I want to use needs to contain an error code
like -ENOMEM.

Now I realized that I should create a custom simple attribute that
is only allowed to store a valid errno (-MAX_ERRNO <= errno <= 0).

So I don't add new function like debugfs_create_s32 for now.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ