Kernel

共257篇文章。

malloc(3)换了!

Kernel

📜 历史文件已不具备现实意义

这次提交引入的正是后来大名鼎鼎的jemalloc,它取代了FreeBSD原有的phkmalloc,自FreeBSD 7.0起成为系统默认的malloc(3)实现(参见jemalloc(3)及Jason Evans在BSDCan 2006发表的设计论文),后来也被Firefox、Redis、Android等众多项目采用。

Jason Evans同学返回FreeBSD的第一件事就是把malloc(3)的实现换掉了。这个完全重写的malloc(3)实现带来了以下功能:

阅读全文…:malloc(3)换了!(本文约340字,阅读大致需要1分钟)

准备FreeBSD-SA-06:01

Security

受影响的版本:FreeBSD 6.0-RELEASE, FreeBSD 5.4-STABLE, FreeBSD 6.0-STABLE, FreeBSD 7.0-CURRENT
问题描述:已经确认,在内核中存在一处程序设计缺陷,这一缺陷会导致内核中的某个不确定位置的内存被返回给用户态应用程序。

阅读全文…:准备FreeBSD-SA-06:01(本文约174字,阅读大致需要1分钟)

一个不太明显的安全问题

Security

在内核里面,程序的结构大概是这样:

现在问题来了,上面这些东西的问题是什么?应该如何解决?

阅读全文…:一个不太明显的安全问题(本文约235字,阅读大致需要1分钟)

关于system call

Kernel

在FreeBSD开发手册中,有一部分内容介绍了关于系统调用。里面有这样一段话:

Linux is a UNIX like system. However, its kernel uses the same system-call convention of passing parameters in registers MS-DOS does. As with the UNIX convention, the function number is placed in EAX. The parameters, however, are not passed on the stack but in EBX, ECX, EDX, ESI, EDI, EBP:

open:
  mov eax, 5
  mov ebx, path
  mov ecx, flags
  mov edx, mode
  int 80h

This convention has a great disadvantage over the UNIX way, at least as far as assembly language programming is concerned: Every time you make a kernel call you must push the registers, then pop them later. This makes your code bulkier and slower. Nevertheless, FreeBSD gives you a choice.

可能有人会问了,为什么说UNIX way (将参数压栈) 更好呢?

阅读全文…:关于system call(本文约606字,阅读大致需要2分钟)

freefall is now running 6.0-STABLE

Kernel

After it has runned 4.x series for a too long time, finally kensmith@ has stepped up to upgrade it.

Needless to say what this means, just upgrade all your boxes to FreeBSD 6.x. FreeBSD 6.0-RELEASE is the best release we have released in the recent years, and the best .0 release ever, as proven by many installations and developers’ code review.

参与评论:freefall is now running 6.0-STABLE

Lazy blog updates

Life

In the last month we were busy working to repair the current system at corporation to make sure it would not get worse. Work range from in-depth code review, kernel debugging, to fix data hard disk driver by hand, etc. I am pleased to say that the situation was greatly improved.

阅读全文…:Lazy blog updates(本文约62字,阅读大致需要1分钟)

*BSD queue.h

Kernel

Derived from the ancient BSD Unix, *BSD has a set of queue related macros which are described in queue(3), and implemented in src/sys/sys/queue.h. These are primarily used in the kernel, but also useful for userland applications.

阅读全文…:*BSD queue.h(本文约100字,阅读大致需要1分钟)
搜索文章…(按ESC退出)