summaryrefslogtreecommitdiff
path: root/rnd.h
blob: 154fccfb75a42fcd89e56c197b0de8f2d997371d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef RND_H
#define RND_H

#define HIG_ENTROPY_SOURCE	"/dev/random"
#define LOW_ENTROPY_SOURCE	"/dev/urandom"

/* secrand is not really secure, but the name only suggests it's better to use
 * than rand(3) when transferring bytes over the network in non-security
 * critical structure members. secrand() is only used to fill up salts actually.
 */
extern int secrand(void);
extern void gen_key_bytes(unsigned char *area, size_t len);

#endif /* RND_H */
Martin <Dave.Martin@arm.com>2017-01-18 16:25:24 +0000 committerCatalin Marinas <catalin.marinas@arm.com>2017-01-18 18:05:12 +0000 commitad9e202aa1ce571b1d7fed969d06f66067f8a086 (patch) tree75379a242a506cf3d3195946e9c2c1b755708979 parentaeb1f39d814b2e21e5e5706a48834bfd553d0059 (diff)
arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
We cannot preserve partial fields for hardware breakpoints, because the values written by userspace to the hardware breakpoint registers can't subsequently be recovered intact from the hardware. So, just reject attempts to write incomplete fields with -EINVAL. Cc: <stable@vger.kernel.org> # 3.7.x- Fixes: 478fcb2cdb23 ("arm64: Debugging support") Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Will Deacon <Will.Deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat