Re: [PATCH 1/2] vsprintf/sysctl: Bugfix, neaten and document %pK usages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2013-10-11 at 16:49 +1100, Ryan Mallon wrote:

> It doesn't matter what the value of kptr_restrict happens to be, the
> code is still broken. So, with your patch, values 0 and 2 of
> kptr_restrict will print a seemingly correct value, but when
> kptr_restrict is 1 then it will print 'pK-error'.

I think it's _wrong_ to break existing code.

And no, 0 and 2 will print "correct" values.

Only the relatively uncommon 1 use case is broken.
kptr_restrict is simply broken relative to interrupts.

%pK is used outside of seq and goes to dmesg too btw.
You can't simply check the process permissions at open.

> It should print 'pK-error' in all cases, so that any bugs where %pK is
> being used from interrupt content are identified regardless of the
> setting of kptr_restrict.
> 
> Anyway, with the approach that Eric and George suggested, this would
> become a non-issue. So probably just best to leave the code as is.

Or do as I did and shrink it and make it clearer
until your use cases might be implemented.


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux