Re: file as a directory

From: Jan Engelhardt (jengelh_at_linux01.gwdg.de)
Date: 11/23/04

  • Next message: Rui Nuno Capela: "Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-2"
    Date:	Tue, 23 Nov 2004 15:00:37 +0100 (MET)
    To: Amit Gud <amitgud1@gmail.com>
    
    

    >Correct me if I'm wrong, but the best way I know whether a file should
    >be treated as directory or as a file (atleast how I've implemented it)
    >depends upon the context (how the file is accessed) in the user-space
    >and this context is reflected in the kernel space in the flags of the
    >struct nameidata. So ...

    And there I see a problem! The open() call (kernel: sys_open) allows to open
    both files and directories in the standard operation.
    There is the O_DIRECTORY user-space flag, but which only says "it must be a
    directory". So there's something missing to say "must be a file".

    Hell will freeze over if a reiser4 "object" can be ANY type, blockdev,
    chardev, symlink, <think something up>.

    Jan Engelhardt

    -- 
    Gesellschaft für Wissenschaftliche Datenverarbeitung
    Am Fassberg, 37077 Göttingen, www.gwdg.de
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Rui Nuno Capela: "Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-2"

    Relevant Pages

    • Re: [RFC] SPI core -- revisited
      ... >DMA to copy data from user to kernel space? ... >cause page faults which ensure that the user space pages are paged in ... where dev is actually an SPI device. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [pm] fix oops after saving image
      ... The patch is simply a band-aid, ... seeing that line solely in the context on the rest of the source ... In the pmdisk code, I've statically declared the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [pm] fix oops after saving image
      ... > context of the email. ... > the reason for the patch, if they manipulated the BK tools correctly. ... When do you have a heart between your knees? ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: copy_from_user/copy_to_user question
      ... kernel space, there is no guarantee that the page is ... The main reason is that memory addresses passed from userspace might not be valid at all, and reading these addresses directly would cause a kernel oops in that case. ... These functions set up an exception handler so that ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: file as a directory
      ... depends upon the context in the user-space ... /* check if the archive is a path component or if last ... No more worries! ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)