Re: CVS commit: src/sys/kern

2014-07-03 Thread Maxime Villard
 Maxime Villard m...@netbsd.org wrote:
  |Module Name:  src
  |Committed By: maxv
  |Date: Tue Jun 24 07:28:23 UTC 2014
  |
  |Modified Files:
  | src/sys/kern: subr_kmem.c
  |
  |Log Message:
  |KMEM_REDZONE+KMEM_POISON is supposed to detect buffer overflows. But it only
  |poisons memory after kmem_roundup_size(), which means that if an overflow
  |occurs in the page padding, it won't be detected.
  |
  |Fix this by making KMEM_REDZONE independent from KMEM_POISON and making it
  |put a 2-byte pattern at the end of each requested buffer, and check it when
  |freeing memory to ensure the caller hasn't written outside \
  |the requested area.
 
 Interesting.
 Having no idea of kernel programming i blindly assume that those
 pages are somehow isolated against preceeding pages, so that no
 checks of the lower bound are necessary or even useful, and of
 course checking wether the address as such can be safely accessed
 is also not necessary / done differently.
 
 But, whereas i really think it is a smart idea to use
 a mathematically verifieable pattern, how can you be sure that the
 pattern doesn't generate values which are extremely common,
 especially at E-O-B, such as '\0'?  Shouldn't at least 0 be
 replaced with a different value?

That was in my TODO list, it's fixed in r1.59.


Re: CVS commit: src/sys/kern

2014-07-03 Thread Steffen Nurpmeso
Maxime Villard m...@m00nbsd.net wrote:
 |That was in my TODO list, it's fixed in r1.59.

Oh please, did you hear me complain?
It is NetBSD in the end.
(Cute :-)

--steffen


Re: CVS commit: src/sys/kern

2014-07-03 Thread Maxime Villard
Le 03/07/2014 16:47, Steffen Nurpmeso a écrit :
 
 Maxime Villard m...@m00nbsd.net wrote:
  |Le 03/07/2014 15:59, Steffen Nurpmeso a écrit :
  | 
  | Maxime Villard m...@m00nbsd.net wrote:
  ||That was in my TODO list, it's fixed in r1.59.
  | 
  | Oh please, did you hear me complain?
  | It is NetBSD in the end.
  | (Cute :-)
  |
  |What do you mean?
 
 Scratch the first two sentences of mine.
 

I'm not sure I understand what you mean, but if I understand what is to be
understood (or what you would like me to understand), then I would give the
following answer - which fully answers your question, with the same allusive
tone:

Is there a reference ID in the mail you received from me?

Understand what is to be understood. And if you want to keep fucking around,
then let's discuss privately, because I'm not sure people will be interested
in this discussion.