Bakul Shah wrote this message on Sat, Mar 30, 2013 at 13:22 -0700:
> On Sat, 30 Mar 2013 09:14:34 PDT John-Mark Gurney wrote:
> >
> > As someone else pointed out in this thread, if a userland program
> > depends upon this behavior, it has a race condition in it
moving the race around, and letting people think that they
have solved the problem when they haven't...
I think I remeber another thread about this from a year or two ago,
but I couldn't find it... If someone finds it, posting a link would
be nice..
--
John-Mark Gurney
hackers-requ...@freebsd.org wrote:
> > > > From: John-Mark Gurney
> > > > To: hack...@freebsd.org
> > > > Subject: looking for someone to fix humanize_number (test cases
> > > > included)
> > > >
> > > > I'm look
sys/types.h include
I'll work to get the code into the tree once we get it in a good state.
Please cc me as I'm not subscribed to -hackers.
Thanks.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has
Intel's VT IOMMU and I
thought it was close to being committed, but I haven't been following
the work...
> If any of these ideas sound feasible, I'd be more than willing to help
> research/implement/test them.
--
John-Mark Gurney Voice: +1 415
ommand line iic program that I used to help debug my drivers..
The tool lets you start and then read/write from the device, and then
stop the bus...
I haven't committed it yet, because a few other developers want it under
tools, and I don't like it there, as no one knows about most of
you don't have a lock (such as Giant) held... By forcing
a timeout, you guarantee that it will check the condition sometime
in the future...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not
Victor Loureiro Lima wrote this message on Wed, Jul 25, 2007 at 12:14 -0300:
> 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>:
> >Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35
> >-0300:
> >> 2007/7/24, John-Mark Gurney <[EMAIL PROTECT
Victor Loureiro Lima wrote this message on Tue, Jul 24, 2007 at 16:35 -0300:
> 2007/7/24, John-Mark Gurney <[EMAIL PROTECTED]>:
> >Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52
> >-0400:
> >> a) Is there any function or variable that tell
gt;members against zero.
#include
uid == UID_ROOT
> b) Can normal users look for system processes or kernel threads?
Yes, ps does this...
> c) Can root look for system processes or kernel threads?
Yes, ps does this...
--
John-Mark Gurney Voice: +1 41
e for suspend/resume, I would hope
our pci layer would save the state, which it might not if you write
directly to the config registers.)
You should also use bus_get_dma_tag for getting the parent tag when
creating your own tag w/ bus_dma_tag_create...
Can't think of any others ri
, and the rest
> I will bounce somewhere else.
Why do you not want to let bus_dma do the bouncing for you? If it's
to save a copy to another buffer, why don't you load the final buffer
into bus_dma?
--
John-Mark Gurney Vo
Erik Trulsson wrote this message on Wed, Jun 27, 2007 at 10:12 +0200:
> On Tue, Jun 26, 2007 at 11:12:23PM -0700, John-Mark Gurney wrote:
> > [EMAIL PROTECTED] wrote this message on Tue, Jun 26, 2007 at 17:33 -0700:
> > > I'm having poor luck trying to use NFS over a
n that most people can't figure out to make jumbo frames work
reliabily and depend upon people just using 1500 byte frames...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
Daniel Molina Wegener wrote this message on Mon, May 21, 2007 at 09:48 -0400:
> On Monday 21 May 2007 03:57:58 John-Mark Gurney wrote:
> > Daniel Molina Wegener wrote this message on Sun, May 20, 2007
> at 18:31 -0400:
> > >I'm coding an application using the kqueue
I use to handle these kind of events?
I'm unsure what you mean by open and read events? Do you mean getting
an event when another process opens are file? or? As for read, they
work fine for sockets, as w/ select, files are always ready to read
even though they may block to read from disk
Ivan Voras wrote this message on Mon, May 07, 2007 at 20:12 +0200:
> John-Mark Gurney wrote:
> > Ivan Voras wrote this message on Mon, May 07, 2007 at 18:39 +0200:
> >> My proposal is to MIME-ify the Format fields, best presented in examples:
> >>
> >> "
orget to add the version of the field to the
mime-type as these structures change over time..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-h
lp capable programmers not
make mistakes...
There is always ugen if the driver developer doesn't want to deal w/
making their driver multithread safe...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has
> kqueue support to your kernel module and making ioctl/read/write's is very
> efficient. I'm a long time windows developer that has used I/O Completion
> Ports, and I'm real impressed with kqueue api. It was a little daunting
> figuring out the kernel module side
rror code 1
>
> The following patch against version 1.98 of kern.post.mk fixes the problem:
Thanks, committed the fix...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
have to answer this...
/me wishes he had machines w/ more pci slots so he could keep all his
cards attached for testing.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
__
> >the driver into FreeBSD...
>
> i suppose that will never happen:
> - hauppauge firmware is needed
Well, there was some work about getting licensing from Hauppauge to let
FreeBSD distribute it... But the original author disappeared, and I
haven't heard anything... I do have a
er...
> is there a howto somewhere?
There are man pages on how to use the various locking primitives, but
it is assumed that you have knowlege of concurrent programming... You
can take a look at books on pthreads and other related matierals for
info on using locks...
If you figure
David Xu wrote this message on Tue, Oct 17, 2006 at 17:17 +0800:
> work in the past. Also rfork() does not allow you to specify user stack, you
> have to add some tricky code to make it safe before new
> thread really can do real work, [...]
That's why you use rfork_thread(3)...
-
Jonathan Chen wrote this message on Mon, Oct 09, 2006 at 19:39 -0400:
> On Mon, Oct 09, 2006 at 04:26:50PM -0700, John-Mark Gurney wrote:
> > Jonathan Chen wrote this message on Mon, Oct 09, 2006 at 17:37 -0400:
> > > doesn't seem too useful a task for a video c
e intricacies of DMA, so someone with the expertise or the hardware
> should check my reasoning or test an exploit before panicing.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not.&quo
ontains comments describing them...
Good luck...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing list
http://lists.fre
nd any
> like this?
Usually this is due to depending upon symbols that another module
exports, but not having a MODULE_DEPEND line to let one module see
the other module's symbols...
--
John-Mark Gurney Voice: +1 415 2
ules, and the i2c bus module automaticly gets brought
in by either iic or bktr (as each depend upon the i2c bus)...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
_
Stanislav Sedov wrote this message on Mon, Aug 14, 2006 at 23:12 +0600:
> On Mon, 14 Aug 2006 11:15:22 -0700
> John-Mark Gurney <[EMAIL PROTECTED]> mentioned:
> >
> > You should make a MD API for reading these out (if one doesn't already
> > exist) that handle
lar for accessing PCI config registers
that don't exist and cause a fault...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hack
ouldn't the above examples do exactly the same thing?
No, read_multi reads from the same location every time.. This is for
things like a FIFO where the value can change each time, you want
bus_read_region_1... Read the bus_space(9) man page for more info
about the differences between the two
John Baldwin wrote this message on Tue, Aug 08, 2006 at 13:42 -0400:
> On Monday 07 August 2006 18:05, John-Mark Gurney wrote:
> > John Baldwin wrote this message on Mon, Aug 07, 2006 at 15:27 -0400:
> > > sc->cfg_table.signature = letoh32(bus_read_4(sc->
byte swapping to be done for you, there are the
_stream versions... The are useful for transfering data like disk
data that needs to maintain the same order...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, ha
Niki Denev wrote this message on Mon, Aug 07, 2006 at 22:03 +0300:
> On Monday 07 August 2006 21:34, John-Mark Gurney wrote:
> > Because for the most part it is only suppose to be used by MD code...
> >
> > The correct way to get device's memory is to use bus_alloc_res
iew the handbook on device driver writing:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedrivers.html
I did a presentation at BSDcan on writing devices drivers:
http://people.freebsd.org/~jmg/drivers/
The handout is a cheat sheet of useful functions for writing a device
driver...
--
John
over, and also saves trouble with
> porting shell script code :)
Helping people not be portable w/ other Unixes like Solaris is something
we should not do... Can anyone name another major Unix besides Linux that
has the -a option?
--
John-Mark Gurney Voice: +1 415 2
ces?
No one has written a d_kqfilter entry for tun... so, until someone
does, kqueue will not work on tun...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
__
would write hardware driver for FreeBSD.
I haven't seen this. The only case that I can think of is due to
developers not having the hardware, or a need to use said hardware,
so nothing happens...
Do you have a list of hardware that has documntation available that
needs device drivers to be written?
ansfer (which requires
writing a RISC program) and it works really well.. We are no longer in
the age where we need the kernel to do everything for us...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, ha
he case..
A number of years back, we used it to mirror 140GB of data between sites..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hack
Gerald Heinig wrote this message on Fri, Jun 30, 2006 at 10:41 +0200:
> On Fri, 2006-06-30 at 01:16 -0700, John-Mark Gurney wrote:
> > This has now been fixed by making the built in driver return a negative
> > value for the probe.. so your probe routine can return 0, and it will
&g
er physical address into kernel virtual address
> in FreeBSD:
That is what the bus_space api is for... The method you propose is a
hack and not very useful for ensuring that your driver run on other
platforms...
> --
> ??: John-Mark Gurney [mailto:[EMAIL PROTECTED]
&
... Are you
sure the memory resource is in the first bar possition?
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.
emory space is accessed by bus_space_read_1 and so on
> am i right sir?
Yep...
> On 5/24/06, John-Mark Gurney <[EMAIL PROTECTED]> wrote:
> >william wallace wrote this message on Wed, May 24, 2006 at 15:48 +0800:
> >> IN static device_method_t pci_methods[] = {
&
lementation has been done
> >recently, and that it should start getting wider circulation and review
> >soon. That's not to say that more work and design can't be done in this
> >area, but we should probably wait a bit and see what has been done
> >already.
--
sts
-bash-2.05b$ echo $?
1
-bash-2.05b$ ln -s z a
-bash-2.05b$ echo $?
0
-bash-2.05b$ uname -a
FreeBSD gate.funkthat.com 4.7-RELEASE FreeBSD 4.7-RELEASE #5: Tue Sep 9
02:05:39 PDT 2003 [EMAIL PROTECTED]:/usr/src/sys/compile/gate i386
Looks like the EEXIST is returning non-zero...
--
John-Ma
correct message cookie
> and number of messages.
Why not create a wrapper, and start at the highest requested, and slowly
work your way down as the requests are rejected.. since the number of
messages must be a power of two, it isn't than many rounds..
--
John-Mark Gurney
sh <[EMAIL PROTECTED]> wrote:
> >>
> >> > Busses create devices to represent hardware in the system. The bus
> >> > then causes these devices to be probed and attached. This latter
> >> > usage is for those cases. As
bus_space macros
to access the table.. you could use bus_space_write_region to copy
the table from kernel memory to your device, or just write the updated
values...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done,
ress */
>
> Why was u_char used instead of uint32_t? Aren't pointers always 32 bits
> on a 32 bit machine?
You're confusing the type of the pointer w/ a pointer... These are
correct, please read a basic intro to pointers in C...
--
John-Mark Gurney
ability of the heat sink to work...
/me just had a computer randomly crash due to this.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd
kev->data = 0;
> > kn->kn_kevent = *kev;
> > + kn->kn_kevent.flags &= ~EV_ADD;
> > kn->kn_status = KN_INFLUX|KN_DETACHED;
> >
> > error = knote_attach(kn, kq);
> &g
> dst disk have enough space to store all data currently in use in the
> source disk), and better (customizable new partitions) results when
> copying to a larger second disk, when compared to dd(1).
Though if you are using extended attributes, the dump/restore pair won't
transfer them... :(
)?
Most of the drivers have code in the default, that will reapply the
function to the parent, so you don't have to do the device_get_parent
in your driver.. They also implement their own lower case wrappers
too...
This very well could be due to the fact that you're including your
interface t
have bugs, etc...
This also means that we don't have to have code in the kernel to handle
detection of the different tuner types, and it'll be easier to make fixes
to the tuner drivers..
--
John-Mark Gurney
software exchange.
(why sun decided that the .txt version of the license should have a
column length >80 is beyond me)
That's why I started work on rewriting a allocated based upon the
paper so that it'd have a BSD license... I haven't worked on it much,
and now that jemalloc
dget the IEEE1284 device ID string to
> identify
> > the USB printer. Without that ioctl, HPLIP can't be ported over.
> >
> > Thanks,
> > Naram Qashat
> >
> > (Note: I'm not subscribed to the mailing list, so if anyone replies to
> this,
> > plea
se ttys(5) for this... You will get an extra argument
or two... but a wrapper script can handle that for you... Though you
need to have the daemon run in foreground mode, so that when it dies
init knows it did, and restarts it...
--
John-Mark Gurney Voice: +
I do it?
You look up the process with pfind(9), and then you can use uio(9) to
transfer data into kernel space... Don't forget to PROC_UNLOCK the
struct once you are done referencing it.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will
the complications of making it support UFS2, I abandoned it..
With a bit of work, ffsrecov.py can be taught this and handle both ufs1
and ufs2...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will
ill give you gunzip behavior because the gzip binary looks at argv[0]
and changes it's behavior based upon what it finds.. look at crunchgen
for the ability to combine different programs into one binary...
--
John-Mark Gurney Voice: +1 415 225 5579
"
Raaf wrote this message on Tue, Feb 07, 2006 at 01:42 +0100:
> John-Mark Gurney wrote:
> > Raaf wrote this message on Mon, Feb 06, 2006 at 22:54 +0100:
> >> Hi, i am working on a usb driver that allocates some memory when
> >> the device is opened using malloc.
> >
ed
until all the mmap's that are backed by the device are unmapped.. it
shouldn't be hard to test... the mapping should hold a reference to
the device until it's munmapped..
--
John-Mark Gurney Voice: +1 415 225 5579
"All tha
llocated userland buffers will..
This also has interesting possibilities for smarter ethernet cards
where the card can dump it directly into the userland buffer w/o having
to do the special page flipping thing we can do now...
definately some interesting ideas...
--
John-Mark Gurney
huncks, I doubt you'll see much of a difference...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing lis
s on a readable disk...
Recovery can be possible with ffsrecov.py:
http://people.freebsd.org/~jmg/ffsrecov/
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
__
descriptor.. Neither pipe nor socketpair documents that close can
be called on them...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebs
es)...
There is also jlemon's paper on kqueue:
http://people.freebsd.org/~jlemon/papers/kqueue.pdf
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebs
t my cleaning code in order to
> fulfill the reusement of data blocks?
If you are talking about in kernel land, take a look at zone(9)..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done
will end up with troubles like you have... you should make sure
to pass -B to fsck if you want to run fsck while the file system is
mounted... Though I've never done that manually (I let the rc scripts
handle that for me)...
--
John-Mark Gurney Voice: +1 415 225 5
have definitely no idea where the problem can be.
>
> This happens on FreeBSD 4.11-STABLE (cvsup'ed Nov 20 2005), SMP kernel,
> P4 with HT.
If you could post the parts of your code around kevent calls, I could
better help you...
--
John-Mark Gurney V
use /bin/bash doesn't exist on the system, as bash
is installed in /usr/local/bin/bash...
Please try with:
bash array.sh
instead, and see if that works..
> On 11/30/05, John-Mark Gurney <[EMAIL PROTECTED]> wrote:
> >
> > Jayesh Jayan wrote this message on Wed, Nov 30, 2005 a
is usually on Linux), and our sh doesn't have that
feature...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@
a bus.
> no .device_get_parent of a pci bus we get pcib
> > > we who r about to die,salute u!
so?? In FreeBSD land, a device_t is a bus if it has one or more
children.. To put it more simply, all busses are devices...
As for your example of device_get_parent.. you don't realize t
show us a word?:)
read device(9).. and devclass(9)..
I'm not quite sure what you are asking here, but take a look at a bunch
of the other drivers... My zoran driver
(http://people.freebsd.org/~jmg/zoran.html) is both a driver, and a bus
for i2c...
--
John-Mark Gurney
your filesystem with -f 65536 -b 65536... If you look at
my equation that I posted earlier, if you have a blocksize of 16384,
you end up with ~128TB as the max file size...
K M G T
(16384/8)^3*16384 / 1024 / 1024 / 1024 / 1024 == 128
--
John-Mark Gurney
ll take some kernel vm magic, and also not
be very portable across platforms, since each platform may/can have a
different code address (though we try to keep them the same)...
--
John-Mark Gurney Voice: +1 415 225 5579
&
John-Mark Gurney wrote this message on Sun, Nov 13, 2005 at 10:17 -0800:
> as for the file size, The approximate max can be calculated by
> (blocksize / sizeof(ufs2_daddr_t)) ^ 3 * blocksize
> the real max would add in addition:
> (blocksize / sizeof(ufs2_daddr_t)) ^ 2 * blocksize +
... UFS1 supports larger file
sizes (not file system sizes) due to the fact that the ufs_daddr_t
is smaller (32bits), means it can get more out of the indirect blocks
than UFS2 can... UFS1 can have files of 2^58 compared to UFS2's 2^55...
--
John-Mark Gurney Voi
he recent
mailing list messages talking about these issues...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing list
you
plug in a USB to serial adapter, MacOSX includes the serial number in
the device name: /dev/tty.usbserial-FTC8P121, which is convient...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
__
Frank Mayhar wrote this message on Mon, Sep 26, 2005 at 16:11 -0700:
> On Sun, 2005-09-25 at 21:23 -0700, John-Mark Gurney wrote:
> > Frank Mayhar wrote this message on Sat, Sep 24, 2005 at 20:26 -0700:
> > > I've been using libufs as the I/O mechanism for my (heavy) modific
put up a
preliminary copy up at:
http://people.freebsd.org/~jmg/ffsrecov/
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-h
..
Then you can adjust your partition table to be either at the start of
the x'th filesystem, or 16 sectors before that...
Hope this helps..
Though it might be easier to search for the disklabel magic block
directly... It wouldn't be too hard to modify the -f to search for a
disklabel magic
that
ntpd did over the previous reboot is lost...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing list
http:
ind.
The file that does the sending of SYN packets is sys/netinet/tcp_output.c
in the function tcp_output... but I'd highly recommend you look at ipfw
or divert sockets...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I
ng while
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/
Mike Meyer wrote this message on Thu, Jul 14, 2005 at 09:22 -0400:
> > passwd root
>
> Except you have to know the root password for that to work.
root is never asked what the old password is...
--
John-Mark Gurney Voice: +1 415 225 5579
"A
rland implementation of this done. Since someone
else has done kernel, I'll solely target userland for the code now.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
ependant way of accessing user's memory (for the current running
process)...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@fre
es at all.
> They all say that they do not protect against speculative reads.
> Bus-locked instructions don't seem to avoid speculative reads either.
have you put a SFENCE between write A and write B? You never tell us
where you've tried to put the various fence instructions.
lso
useful... Try replacing that last zero with UIO_SYSSPACE..
> st = keta_kern_sendit(td, control_so,&msg,0,0);
and possibly here...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
s, you should be using your own lock that's in sc for
this instead of using Giant...
Remeber that you can usually do some of the work before obtaining the
lock, and then swapping a few variables around... In fact, it's usually
better to do this since
ure
you use the correct types when handling them...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
___
freebsd-hackers@freebsd.org mailing list
htt
hat:
find [...] -print0 | xargs -0 rm
otherwise whitespace characters can cause problems... of course find
does have the -delete option which makes such mangling unnecessary..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, Al
Bernd Walter wrote this message on Fri, Apr 01, 2005 at 00:54 +0200:
> On Thu, Mar 31, 2005 at 02:33:48PM -0800, John-Mark Gurney wrote:
> > Bernd Walter wrote this message on Thu, Mar 31, 2005 at 23:06 +0200:
> > > And the 4526 doesn't need regulated power plu
Bernd Walter wrote this message on Thu, Mar 31, 2005 at 23:06 +0200:
> On Thu, Mar 31, 2005 at 11:12:05AM -0800, John-Mark Gurney wrote:
> > Bernd Walter wrote this message on Thu, Mar 31, 2005 at 12:36 +0200:
> > > But considered the small price distance to the smallest Soekris
#x27;s
smaller than a Soekris, and is slightly larger than the PC-104 form
factor.. Right now I have it netbooting, but I need to figure out why
I have some ethernet issues... The code is in p4, though if people
are really interested, I can generate a patch...
--
Jo
1 - 100 of 243 matches
Mail list logo