1. 13 11月, 2017 1 次提交
  2. 01 11月, 2017 3 次提交
    • Z
      quota: fix potential infinite loop · dd5f6279
      zhangyi (F) 提交于
      In dquot_writeback_dquots(), we write back dquot from dirty dquots
      list. There is a potential infinite loop if ->write_dquot() failure
      and forget remove dquot from the list. This patch clear dirty bit
      anyway to avoid it.
      Signed-off-by: Nzhangyi (F) <yi.zhang@huawei.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      dd5f6279
    • A
      isofs: use unsigned char types consistently · cb917757
      Arnd Bergmann 提交于
      Based on the discussion about the signed character field for the year,
      I went through all fields in the iso9660 and rockridge standards to see
      whether they should used signed or unsigned characters. Only a single
      8-bit value is defined as signed per 'section 7.1.2': the timezone
      offset in a timestamp, this has always been handled correctly through
      explicit sign-extension.
      
      All others are either '7.1.1 8-bit unsigned numerical values' or
      composite fields. I also read the linux source code and came to the
      same conclusion, also I could not find any other part of the
      implementation that actually behaves differently for signed or
      unsigned values.
      
      Since it is still ambigous to use plain 'char' in interface definitions,
      I'm changing all fields representing numbers and reserved bytes to
      the unambiguous '__u8'. Fields that hold actual strings are left as
      'char' arrays. I built the code with '-Wpointer-sign -Wsign-compare'
      to see if anything got left out, but couldn't find anything wrong
      with the remaining warnings.
      
      This patch should not change runtime behavior and does not need to
      be backported.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      cb917757
    • A
      isofs: fix timestamps beyond 2027 · 34be4dbf
      Arnd Bergmann 提交于
      isofs uses a 'char' variable to load the number of years since
      1900 for an inode timestamp. On architectures that use a signed
      char type by default, this results in an invalid date for
      anything beyond 2027.
      
      This changes the function argument to a 'u8' array, which
      is defined the same way on all architectures, and unambiguously
      lets us use years until 2155.
      
      This should be backported to all kernels that might still be
      in use by that date.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      34be4dbf
  3. 17 10月, 2017 3 次提交
    • S
      udf: Fix some sign-conversion warnings · 89a4d970
      Steve Magnani 提交于
      Fix some warnings that appear when compiling with -Wconversion.
      A sub-optimal choice of variable type leads to warnings about
      conversion in both directions between unsigned and signed.
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      89a4d970
    • S
      udf: Fix signed/unsigned format specifiers · fcbf7637
      Steve Magnani 提交于
      Fix problems noted in compilion with -Wformat=2 -Wformat-signedness.
      In particular, a mismatch between the signedness of a value and the
      signedness of its format specifier can result in unsigned values being
      printed as negative numbers, e.g.:
      
        Partition (0 type 1511) starts at physical 460, block length -1779968542
      
      ...which occurs when mounting a large (> 1 TiB) UDF partition.
      
      Changes since V1:
      * Fixed additional issues noted in udf_bitmap_free_blocks(),
        udf_get_fileident(), udf_show_options()
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      fcbf7637
    • S
      udf: Fix 64-bit sign extension issues affecting blocks > 0x7FFFFFFF · b490bdd6
      Steve Magnani 提交于
      Large (> 1 TiB) UDF filesystems appear subject to several problems when
      mounted on 64-bit systems:
      
      * readdir() can fail on a directory containing File Identifiers residing
        above 0x7FFFFFFF. This manifests as a 'ls' command failing with EIO.
      
      * FIBMAP on a file block located above 0x7FFFFFFF can return a negative
        value. The low 32 bits are correct, but applications that don't mask the
        high 32 bits of the result can perform incorrectly.
      
      Per suggestion by Jan Kara, introduce a udf_pblk_t type for representation
      of UDF block addresses. Ultimately, all driver functions that manipulate
      UDF block addresses should use this type; for now, deployment is limited
      to functions with actual or potential sign extension issues.
      
      Changes to udf_readdir() and udf_block_map() address the issues noted
      above; other changes address potential similar issues uncovered during
      audit of the driver code.
      Signed-off-by: NSteven J. Magnani <steve@digidescorp.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      b490bdd6
  4. 16 10月, 2017 1 次提交
  5. 11 10月, 2017 2 次提交
  6. 10 10月, 2017 2 次提交
    • J
      quota: Generate warnings for DQUOT_SPACE_NOFAIL allocations · ac3d7939
      Jan Kara 提交于
      Eryu has reported that since commit 7b9ca4c6 "quota: Reduce
      contention on dq_data_lock" test generic/233 occasionally fails. This is
      caused by the fact that since that commit we don't generate warning and
      set grace time for quota allocations that have DQUOT_SPACE_NOFAIL set
      (these are for example some metadata allocations in ext4). We need these
      allocations to behave regularly wrt warning generation and grace time
      setting so fix the code to return to the original behavior.
      Reported-and-tested-by: NEryu Guan <eguan@redhat.com>
      CC: stable@vger.kernel.org
      Fixes: 7b9ca4c6Signed-off-by: NJan Kara <jack@suse.cz>
      ac3d7939
    • S
      audit: Record fanotify access control decisions · de8cd83e
      Steve Grubb 提交于
      The fanotify interface allows user space daemons to make access
      control decisions. Under common criteria requirements, we need to
      optionally record decisions based on policy. This patch adds a bit mask,
      FAN_AUDIT, that a user space daemon can 'or' into the response decision
      which will tell the kernel that it made a decision and record it.
      
      It would be used something like this in user space code:
      
        response.response = FAN_DENY | FAN_AUDIT;
        write(fd, &response, sizeof(struct fanotify_response));
      
      When the syscall ends, the audit system will record the decision as a
      AUDIT_FANOTIFY auxiliary record to denote that the reason this event
      occurred is the result of an access control decision from fanotify
      rather than DAC or MAC policy.
      
      A sample event looks like this:
      
      type=PATH msg=audit(1504310584.332:290): item=0 name="./evil-ls"
      inode=1319561 dev=fc:03 mode=0100755 ouid=1000 ogid=1000 rdev=00:00
      obj=unconfined_u:object_r:user_home_t:s0 nametype=NORMAL
      type=CWD msg=audit(1504310584.332:290): cwd="/home/sgrubb"
      type=SYSCALL msg=audit(1504310584.332:290): arch=c000003e syscall=2
      success=no exit=-1 a0=32cb3fca90 a1=0 a2=43 a3=8 items=1 ppid=901
      pid=959 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000
      fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts1 ses=3 comm="bash"
      exe="/usr/bin/bash" subj=unconfined_u:unconfined_r:unconfined_t:
      s0-s0:c0.c1023 key=(null)
      type=FANOTIFY msg=audit(1504310584.332:290): resp=2
      
      Prior to using the audit flag, the developer needs to call
      fanotify_init or'ing in FAN_ENABLE_AUDIT to ensure that the kernel
      supports auditing. The calling process must also have the CAP_AUDIT_WRITE
      capability.
      Signed-off-by: Nsgrubb <sgrubb@redhat.com>
      Reviewed-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      de8cd83e
  7. 05 10月, 2017 6 次提交
  8. 04 10月, 2017 12 次提交
  9. 02 10月, 2017 2 次提交
  10. 29 9月, 2017 3 次提交
  11. 27 9月, 2017 5 次提交
新手
引导
客服 返回
顶部